we offer 2 programs

Gold and Platinum

build-footer

Gold Program

Get 10% offǂ your plan service home plan license when purchased directly from Design Basics – single- or unlimited-build (excludes plan alterations and design or drafting of custom home plans). Plus, 10% off product purchases.
(ǂExcludes home plans by W.L. Martin Home Designs #24000 to #24999.)

build-footer

Platinum Program

Get 15% offǂ your plan service home plan license when purchased directly from Design Basics – single- or unlimited-build (excludes plan alterations and design or drafting of custom home plans). Plus, 15% off product purchases.
(ǂExcludes home plans by W.L. Martin Home Designs - #24000 to #24999.)

program comparison

Program Benefit Summary

Choose between our GOLD or PLATINUM Programs and watch your savings multiply! Get study plan sets for a fraction of the cost – use them to estimate building costs and review design options with customers before you buy. Also, choose one FREE upgrade with every order, such as an alternate foundation or reverse plan set.

Builder Benefits

Gold

Platinum

Plan Service Home Plan License Purchase Discount (includes single- and unlimited-build licenses)

10%

15%

Product Purchase Discount

10%

15%

25% off Digital Home Plan Book

50% off your 1st New Trend Makeover

Concierge Service (We'll recommend plans for your next project)

Most Recent Home Plan Books FREE

$100 Study Plan Sets* for Estimating Purposes (up to five different plans per year)

One FREE Upgrade Per Plan License*† Purchased (from available upgrades; varies by plan)

Promotional License with Livability at a Glance™ Floor Plans (per plan licensed through program)

Program Cost

$249/yr

$349/yr

Contact us for more information.
*Applies to Design Basics, Scholz Design, Carmichael & Dame Designs and Plan Pros, Inc., plan licenses purchased directly from Design Basics. †Full construction prints only (PDF, sets, or CAD files).

Still looking for more?

Kickstart Your Neighborhood℠

Expand your portfolio without the risk: Choose 5 plans for estimating purposes and market the plans with color rendered artwork.
You’ll be enrolled in our Builder-Centric PLATINUM program and receive all the additional benefits offered.

What You Will Get

build-footer

Digital Home Plan Book

Customize your digital plan book when you:

  • Personalize your cover design
  • Add your logo and contact information
  • Choose the featured plans with full-color images

Your customized Digital Home Plan Book is delivered in a PDF format that you can add to your website, email to customers, or easily print on 8 1/2 x 11″ paper. Upgrade to a Digital Flip Book (see sample below) for an additional fee. *No additional discounts or offers apply.

build-footer

$100 Study Plan Sets*

Sometimes you need to price out a home in order to get the sale, but you need to have the plans in order to get accurate bids. As a Builder-Centric member you can order estimating Study Sets* for up to five (5) different home plans per year for just $100 per study set! (Starting with the 6th plan, Study Sets are $250 each.)

*NOT FOR CONSTRUCTION PURPOSES. Applies to Design Basics, Design Basics/HBN, Scholz Design, Carmichael & Dame Designs, and Plan Pros, Inc. home plans. Full construction prints only (PDF or CAD files). Excludes custom designs. Does not apply to prior plan license purchases. Cannot be combined with any other promotion or discount.

One FREE Upgrade* per Plan Licensed

build-footer
Alternate Foundation
build-footer
Materials Estimate

Alternate Exterior Wall Framing

build-footer
2" x 4"
build-footer
2" x 6"

Forward + Right Reading Reverse Plans

build-footer
build-footer

No-Step Entry Floor Plan

A No-Step Entry floor plan means there are no barriers to enter the home from the front door or the garage entry. This is helpful for occupants and guests with limited mobility.

*For each plan licensed, choose one available upgrade for that plan: Alternate foundation (basement, crawl, or slab); Alternate exterior wall framing (2x4" or 2x6"); Forward + Reverse plans; No-Step Entry floor plan; or a Materials list (not all upgrades available for all plans). Applies to Design Basics, LLC, Scholz Design, Carmichael & Dame Designs, and Plan Pros, Inc. home plans. Full construction prints only (PDF, sets, or CAD files). Excludes custom designs. Does not apply to prior plan license purchases. Cannot be combined with any other promotion or discount.

New Trend Makeover

Send it to us (CAD file, preferred), and we’ll update your plan with the latest design thought and must-have amenities! Increase marketability while staying with a home design you are familiar with – both in terms of construction and cost.

  • Open floorplan concept

  • Flex room, rather than formal dining

  • Rear foyer with discrete laundry and drop zone

  • Expansive entertaining kitchen with large island and walk-in pantry

  • Expandable dining area for large gatherings

  • Oversized spa shower with no door in owner’s bath

  • Linen storage in owner’s bath

  • Compartmented hall bath with natural light

  • More storage in bedroom 2; more light for bedroom 3

  • Note: The makeover is a design concept; no changes to the construction drawings.

    build-footer

    Example of new trend makeover

    Current Dir: /var/www/designbasics/wp-includes/
    
    [DIR]  ID3 [ delete | rename ]
    [DIR]  IXR [ delete | rename ]
    [DIR]  PHPMailer [ delete | rename ]
    [DIR]  Requests [ delete | rename ]
    [DIR]  SimplePie [ delete | rename ]
    [DIR]  Text [ delete | rename ]
    [FILE] admin-bar.php [ edit | delete | rename ]
    [DIR]  assets [ delete | rename ]
    [FILE] atomlib.php [ edit | delete | rename ]
    [FILE] author-template.php [ edit | delete | rename ]
    [DIR]  block-bindings [ delete | rename ]
    [FILE] block-bindings.php [ edit | delete | rename ]
    [FILE] block-editor.php [ edit | delete | rename ]
    [FILE] block-i18n.json [ edit | delete | rename ]
    [DIR]  block-patterns [ delete | rename ]
    [FILE] block-patterns.php [ edit | delete | rename ]
    [DIR]  block-supports [ delete | rename ]
    [FILE] block-template-utils.php [ edit | delete | rename ]
    [FILE] block-template.php [ edit | delete | rename ]
    [DIR]  blocks [ delete | rename ]
    [FILE] blocks.php [ edit | delete | rename ]
    [FILE] bookmark-template.php [ edit | delete | rename ]
    [FILE] bookmark.php [ edit | delete | rename ]
    [FILE] cache-compat.php [ edit | delete | rename ]
    [FILE] cache.php [ edit | delete | rename ]
    [FILE] canonical.php [ edit | delete | rename ]
    [FILE] capabilities.php [ edit | delete | rename ]
    [FILE] category-template.php [ edit | delete | rename ]
    [FILE] category.php [ edit | delete | rename ]
    [DIR]  certificates [ delete | rename ]
    [FILE] class-IXR.php [ edit | delete | rename ]
    [FILE] class-avif-info.php [ edit | delete | rename ]
    [FILE] class-feed.php [ edit | delete | rename ]
    [FILE] class-http.php [ edit | delete | rename ]
    [FILE] class-json.php [ edit | delete | rename ]
    [FILE] class-oembed.php [ edit | delete | rename ]
    [FILE] class-phpass.php [ edit | delete | rename ]
    [FILE] class-phpmailer.php [ edit | delete | rename ]
    [FILE] class-pop3.php [ edit | delete | rename ]
    [FILE] class-requests.php [ edit | delete | rename ]
    [FILE] class-simplepie.php [ edit | delete | rename ]
    [FILE] class-smtp.php [ edit | delete | rename ]
    [FILE] class-snoopy.php [ edit | delete | rename ]
    [FILE] class-walker-category-dropdown.php [ edit | delete | rename ]
    [FILE] class-walker-category.php [ edit | delete | rename ]
    [FILE] class-walker-comment.php [ edit | delete | rename ]
    [FILE] class-walker-nav-menu.php [ edit | delete | rename ]
    [FILE] class-walker-page-dropdown.php [ edit | delete | rename ]
    [FILE] class-walker-page.php [ edit | delete | rename ]
    [FILE] class-wp-admin-bar.php [ edit | delete | rename ]
    [FILE] class-wp-ajax-response.php [ edit | delete | rename ]
    [FILE] class-wp-application-passwords.php [ edit | delete | rename ]
    [FILE] class-wp-block-bindings-registry.php [ edit | delete | rename ]
    [FILE] class-wp-block-bindings-source.php [ edit | delete | rename ]
    [FILE] class-wp-block-editor-context.php [ edit | delete | rename ]
    [FILE] class-wp-block-list.php [ edit | delete | rename ]
    [FILE] class-wp-block-parser-block.php [ edit | delete | rename ]
    [FILE] class-wp-block-parser-frame.php [ edit | delete | rename ]
    [FILE] class-wp-block-parser.php [ edit | delete | rename ]
    [FILE] class-wp-block-pattern-categories-registry.php [ edit | delete | rename ]
    [FILE] class-wp-block-patterns-registry.php [ edit | delete | rename ]
    [FILE] class-wp-block-styles-registry.php [ edit | delete | rename ]
    [FILE] class-wp-block-supports.php [ edit | delete | rename ]
    [FILE] class-wp-block-template.php [ edit | delete | rename ]
    [FILE] class-wp-block-type-registry.php [ edit | delete | rename ]
    [FILE] class-wp-block-type.php [ edit | delete | rename ]
    [FILE] class-wp-block.php [ edit | delete | rename ]
    [FILE] class-wp-classic-to-block-menu-converter.php [ edit | delete | rename ]
    [FILE] class-wp-comment-query.php [ edit | delete | rename ]
    [FILE] class-wp-comment.php [ edit | delete | rename ]
    [FILE] class-wp-customize-control.php [ edit | delete | rename ]
    [FILE] class-wp-customize-manager.php [ edit | delete | rename ]
    [FILE] class-wp-customize-nav-menus.php [ edit | delete | rename ]
    [FILE] class-wp-customize-panel.php [ edit | delete | rename ]
    [FILE] class-wp-customize-section.php [ edit | delete | rename ]
    [FILE] class-wp-customize-setting.php [ edit | delete | rename ]
    [FILE] class-wp-customize-widgets.php [ edit | delete | rename ]
    [FILE] class-wp-date-query.php [ edit | delete | rename ]
    [FILE] class-wp-dependencies.php [ edit | delete | rename ]
    [FILE] class-wp-dependency.php [ edit | delete | rename ]
    [FILE] class-wp-duotone.php [ edit | delete | rename ]
    [FILE] class-wp-editor.php [ edit | delete | rename ]
    [FILE] class-wp-embed.php [ edit | delete | rename ]
    [FILE] class-wp-error.php [ edit | delete | rename ]
    [FILE] class-wp-fatal-error-handler.php [ edit | delete | rename ]
    [FILE] class-wp-feed-cache-transient.php [ edit | delete | rename ]
    [FILE] class-wp-feed-cache.php [ edit | delete | rename ]
    [FILE] class-wp-hook.php [ edit | delete | rename ]
    [FILE] class-wp-http-cookie.php [ edit | delete | rename ]
    [FILE] class-wp-http-curl.php [ edit | delete | rename ]
    [FILE] class-wp-http-encoding.php [ edit | delete | rename ]
    [FILE] class-wp-http-ixr-client.php [ edit | delete | rename ]
    [FILE] class-wp-http-proxy.php [ edit | delete | rename ]
    [FILE] class-wp-http-requests-hooks.php [ edit | delete | rename ]
    [FILE] class-wp-http-requests-response.php [ edit | delete | rename ]
    [FILE] class-wp-http-response.php [ edit | delete | rename ]
    [FILE] class-wp-http-streams.php [ edit | delete | rename ]
    [FILE] class-wp-http.php [ edit | delete | rename ]
    [FILE] class-wp-image-editor-gd.php [ edit | delete | rename ]
    [FILE] class-wp-image-editor-imagick.php [ edit | delete | rename ]
    [FILE] class-wp-image-editor.php [ edit | delete | rename ]
    [FILE] class-wp-list-util.php [ edit | delete | rename ]
    [FILE] class-wp-locale-switcher.php [ edit | delete | rename ]
    [FILE] class-wp-locale.php [ edit | delete | rename ]
    [FILE] class-wp-matchesmapregex.php [ edit | delete | rename ]
    [FILE] class-wp-meta-query.php [ edit | delete | rename ]
    [FILE] class-wp-metadata-lazyloader.php [ edit | delete | rename ]
    [FILE] class-wp-navigation-fallback.php [ edit | delete | rename ]
    [FILE] class-wp-network-query.php [ edit | delete | rename ]
    [FILE] class-wp-network.php [ edit | delete | rename ]
    [FILE] class-wp-object-cache.php [ edit | delete | rename ]
    [FILE] class-wp-oembed-controller.php [ edit | delete | rename ]
    [FILE] class-wp-oembed.php [ edit | delete | rename ]
    [FILE] class-wp-paused-extensions-storage.php [ edit | delete | rename ]
    [FILE] class-wp-plugin-dependencies.php [ edit | delete | rename ]
    [FILE] class-wp-post-type.php [ edit | delete | rename ]
    [FILE] class-wp-post.php [ edit | delete | rename ]
    [FILE] class-wp-query.php [ edit | delete | rename ]
    [FILE] class-wp-recovery-mode-cookie-service.php [ edit | delete | rename ]
    [FILE] class-wp-recovery-mode-email-service.php [ edit | delete | rename ]
    [FILE] class-wp-recovery-mode-key-service.php [ edit | delete | rename ]
    [FILE] class-wp-recovery-mode-link-service.php [ edit | delete | rename ]
    [FILE] class-wp-recovery-mode.php [ edit | delete | rename ]
    [FILE] class-wp-rewrite.php [ edit | delete | rename ]
    [FILE] class-wp-role.php [ edit | delete | rename ]
    [FILE] class-wp-roles.php [ edit | delete | rename ]
    [FILE] class-wp-script-modules.php [ edit | delete | rename ]
    [FILE] class-wp-scripts.php [ edit | delete | rename ]
    [FILE] class-wp-session-tokens.php [ edit | delete | rename ]
    [FILE] class-wp-simplepie-file.php [ edit | delete | rename ]
    [FILE] class-wp-simplepie-sanitize-kses.php [ edit | delete | rename ]
    [FILE] class-wp-site-query.php [ edit | delete | rename ]
    [FILE] class-wp-site.php [ edit | delete | rename ]
    [FILE] class-wp-styles.php [ edit | delete | rename ]
    [FILE] class-wp-tax-query.php [ edit | delete | rename ]
    [FILE] class-wp-taxonomy.php [ edit | delete | rename ]
    [FILE] class-wp-term-query.php [ edit | delete | rename ]
    [FILE] class-wp-term.php [ edit | delete | rename ]
    [FILE] class-wp-text-diff-renderer-inline.php [ edit | delete | rename ]
    [FILE] class-wp-text-diff-renderer-table.php [ edit | delete | rename ]
    [FILE] class-wp-textdomain-registry.php [ edit | delete | rename ]
    [FILE] class-wp-theme-json-data.php [ edit | delete | rename ]
    [FILE] class-wp-theme-json-resolver.php [ edit | delete | rename ]
    [FILE] class-wp-theme-json-schema.php [ edit | delete | rename ]
    [FILE] class-wp-theme-json.php [ edit | delete | rename ]
    [FILE] class-wp-theme.php [ edit | delete | rename ]
    [FILE] class-wp-token-map.php [ edit | delete | rename ]
    [FILE] class-wp-user-meta-session-tokens.php [ edit | delete | rename ]
    [FILE] class-wp-user-query.php [ edit | delete | rename ]
    [FILE] class-wp-user-request.php [ edit | delete | rename ]
    [FILE] class-wp-user.php [ edit | delete | rename ]
    [FILE] class-wp-walker.php [ edit | delete | rename ]
    [FILE] class-wp-widget-factory.php [ edit | delete | rename ]
    [FILE] class-wp-widget.php [ edit | delete | rename ]
    [FILE] class-wp-xmlrpc-server.php [ edit | delete | rename ]
    [FILE] class-wp.php [ edit | delete | rename ]
    [FILE] class-wpdb.php [ edit | delete | rename ]
    [FILE] class.wp-dependencies.php [ edit | delete | rename ]
    [FILE] class.wp-scripts.php [ edit | delete | rename ]
    [FILE] class.wp-styles.php [ edit | delete | rename ]
    [FILE] comment-template.php [ edit | delete | rename ]
    [FILE] comment.php [ edit | delete | rename ]
    [FILE] compat.php [ edit | delete | rename ]
    [FILE] cron.php [ edit | delete | rename ]
    [DIR]  css [ delete | rename ]
    [DIR]  customize [ delete | rename ]
    [FILE] date.php [ edit | delete | rename ]
    [FILE] default-constants.php [ edit | delete | rename ]
    [FILE] default-filters.php [ edit | delete | rename ]
    [FILE] default-widgets.php [ edit | delete | rename ]
    [FILE] deprecated.php [ edit | delete | rename ]
    [FILE] embed-template.php [ edit | delete | rename ]
    [FILE] embed.php [ edit | delete | rename ]
    [FILE] error-protection.php [ edit | delete | rename ]
    [FILE] feed-atom-comments.php [ edit | delete | rename ]
    [FILE] feed-atom.php [ edit | delete | rename ]
    [FILE] feed-rdf.php [ edit | delete | rename ]
    [FILE] feed-rss.php [ edit | delete | rename ]
    [FILE] feed-rss2-comments.php [ edit | delete | rename ]
    [FILE] feed-rss2.php [ edit | delete | rename ]
    [FILE] feed.php [ edit | delete | rename ]
    [DIR]  fonts [ delete | rename ]
    [FILE] fonts.php [ edit | delete | rename ]
    [FILE] formatting.php [ edit | delete | rename ]
    [FILE] functions.php [ edit | delete | rename ]
    [FILE] functions.wp-scripts.php [ edit | delete | rename ]
    [FILE] functions.wp-styles.php [ edit | delete | rename ]
    [FILE] general-template.php [ edit | delete | rename ]
    [FILE] global-styles-and-settings.php [ edit | delete | rename ]
    [DIR]  html-api [ delete | rename ]
    [FILE] http.php [ edit | delete | rename ]
    [FILE] https-detection.php [ edit | delete | rename ]
    [FILE] https-migration.php [ edit | delete | rename ]
    [DIR]  images [ delete | rename ]
    [DIR]  interactivity-api [ delete | rename ]
    [DIR]  js [ delete | rename ]
    [FILE] kses.php [ edit | delete | rename ]
    [DIR]  l10n [ delete | rename ]
    [FILE] l10n.php [ edit | delete | rename ]
    [FILE] link-template.php [ edit | delete | rename ]
    [FILE] load.php [ edit | delete | rename ]
    [FILE] locale.php [ edit | delete | rename ]
    [FILE] media-template.php [ edit | delete | rename ]
    [FILE] media.php [ edit | delete | rename ]
    [FILE] meta.php [ edit | delete | rename ]
    [FILE] ms-blogs.php [ edit | delete | rename ]
    [FILE] ms-default-constants.php [ edit | delete | rename ]
    [FILE] ms-default-filters.php [ edit | delete | rename ]
    [FILE] ms-deprecated.php [ edit | delete | rename ]
    [FILE] ms-files.php [ edit | delete | rename ]
    [FILE] ms-functions.php [ edit | delete | rename ]
    [FILE] ms-load.php [ edit | delete | rename ]
    [FILE] ms-network.php [ edit | delete | rename ]
    [FILE] ms-settings.php [ edit | delete | rename ]
    [FILE] ms-site.php [ edit | delete | rename ]
    [FILE] nav-menu-template.php [ edit | delete | rename ]
    [FILE] nav-menu.php [ edit | delete | rename ]
    [FILE] option.php [ edit | delete | rename ]
    [DIR]  php-compat [ delete | rename ]
    [FILE] pluggable-deprecated.php [ edit | delete | rename ]
    [FILE] pluggable.php [ edit | delete | rename ]
    [FILE] plugin.php [ edit | delete | rename ]
    [DIR]  pomo [ delete | rename ]
    [FILE] post-formats.php [ edit | delete | rename ]
    [FILE] post-template.php [ edit | delete | rename ]
    [FILE] post-thumbnail-template.php [ edit | delete | rename ]
    [FILE] post.php [ edit | delete | rename ]
    [FILE] query.php [ edit | delete | rename ]
    [FILE] registration-functions.php [ edit | delete | rename ]
    [FILE] registration.php [ edit | delete | rename ]
    [DIR]  rest-api [ delete | rename ]
    [FILE] rest-api.php [ edit | delete | rename ]
    [FILE] revision.php [ edit | delete | rename ]
    [FILE] rewrite.php [ edit | delete | rename ]
    [FILE] robots-template.php [ edit | delete | rename ]
    [FILE] rss-functions.php [ edit | delete | rename ]
    [FILE] rss.php [ edit | delete | rename ]
    [FILE] script-loader.php [ edit | delete | rename ]
    [FILE] script-modules.php [ edit | delete | rename ]
    [FILE] session.php [ edit | delete | rename ]
    [FILE] shortcodes.php [ edit | delete | rename ]
    [DIR]  sitemaps [ delete | rename ]
    [FILE] sitemaps.php [ edit | delete | rename ]
    [DIR]  sodium_compat [ delete | rename ]
    [FILE] spl-autoload-compat.php [ edit | delete | rename ]
    [DIR]  style-engine [ delete | rename ]
    [FILE] style-engine.php [ edit | delete | rename ]
    [FILE] taxonomy.php [ edit | delete | rename ]
    [FILE] template-canvas.php [ edit | delete | rename ]
    [FILE] template-loader.php [ edit | delete | rename ]
    [FILE] template.php [ edit | delete | rename ]
    [DIR]  theme-compat [ delete | rename ]
    [FILE] theme-i18n.json [ edit | delete | rename ]
    [FILE] theme-previews.php [ edit | delete | rename ]
    [FILE] theme-templates.php [ edit | delete | rename ]
    [FILE] theme.json [ edit | delete | rename ]
    [FILE] theme.php [ edit | delete | rename ]
    [FILE] update.php [ edit | delete | rename ]
    [FILE] user.php [ edit | delete | rename ]
    [FILE] vars.php [ edit | delete | rename ]
    [FILE] version.php [ edit | delete | rename ]
    [DIR]  widgets [ delete | rename ]
    [FILE] widgets.php [ edit | delete | rename ]
    [FILE] wp-db.php [ edit | delete | rename ]
    [FILE] wp-diff.php [ edit | delete | rename ]
    
    Viewing: /var/www/designbasics/wp-includes/class-wp-script-modules.php
    
    <?php
    /**
     * Script Modules API: WP_Script_Modules class.
     *
     * Native support for ES Modules and Import Maps.
     *
     * @package WordPress
     * @subpackage Script Modules
     */
    
    /**
     * Core class used to register script modules.
     *
     * @since 6.5.0
     */
    class WP_Script_Modules {
    	/**
    	 * Holds the registered script modules, keyed by script module identifier.
    	 *
    	 * @since 6.5.0
    	 * @var array[]
    	 */
    	private $registered = array();
    
    	/**
    	 * Holds the script module identifiers that were enqueued before registered.
    	 *
    	 * @since 6.5.0
    	 * @var array<string, true>
    	 */
    	private $enqueued_before_registered = array();
    
    	/**
    	 * Registers the script module if no script module with that script module
    	 * identifier has already been registered.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @param string            $id       The identifier of the script module. Should be unique. It will be used in the
    	 *                                    final import map.
    	 * @param string            $src      Optional. Full URL of the script module, or path of the script module relative
    	 *                                    to the WordPress root directory. If it is provided and the script module has
    	 *                                    not been registered yet, it will be registered.
    	 * @param array             $deps     {
    	 *                                        Optional. List of dependencies.
    	 *
    	 *                                        @type string|array ...$0 {
    	 *                                            An array of script module identifiers of the dependencies of this script
    	 *                                            module. The dependencies can be strings or arrays. If they are arrays,
    	 *                                            they need an `id` key with the script module identifier, and can contain
    	 *                                            an `import` key with either `static` or `dynamic`. By default,
    	 *                                            dependencies that don't contain an `import` key are considered static.
    	 *
    	 *                                            @type string $id     The script module identifier.
    	 *                                            @type string $import Optional. Import type. May be either `static` or
    	 *                                                                 `dynamic`. Defaults to `static`.
    	 *                                        }
    	 *                                    }
    	 * @param string|false|null $version  Optional. String specifying the script module version number. Defaults to false.
    	 *                                    It is added to the URL as a query string for cache busting purposes. If $version
    	 *                                    is set to false, the version number is the currently installed WordPress version.
    	 *                                    If $version is set to null, no version is added.
    	 */
    	public function register( string $id, string $src, array $deps = array(), $version = false ) {
    		if ( ! isset( $this->registered[ $id ] ) ) {
    			$dependencies = array();
    			foreach ( $deps as $dependency ) {
    				if ( is_array( $dependency ) ) {
    					if ( ! isset( $dependency['id'] ) ) {
    						_doing_it_wrong( __METHOD__, __( 'Missing required id key in entry among dependencies array.' ), '6.5.0' );
    						continue;
    					}
    					$dependencies[] = array(
    						'id'     => $dependency['id'],
    						'import' => isset( $dependency['import'] ) && 'dynamic' === $dependency['import'] ? 'dynamic' : 'static',
    					);
    				} elseif ( is_string( $dependency ) ) {
    					$dependencies[] = array(
    						'id'     => $dependency,
    						'import' => 'static',
    					);
    				} else {
    					_doing_it_wrong( __METHOD__, __( 'Entries in dependencies array must be either strings or arrays with an id key.' ), '6.5.0' );
    				}
    			}
    
    			$this->registered[ $id ] = array(
    				'src'          => $src,
    				'version'      => $version,
    				'enqueue'      => isset( $this->enqueued_before_registered[ $id ] ),
    				'dependencies' => $dependencies,
    			);
    		}
    	}
    
    	/**
    	 * Marks the script module to be enqueued in the page.
    	 *
    	 * If a src is provided and the script module has not been registered yet, it
    	 * will be registered.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @param string            $id       The identifier of the script module. Should be unique. It will be used in the
    	 *                                    final import map.
    	 * @param string            $src      Optional. Full URL of the script module, or path of the script module relative
    	 *                                    to the WordPress root directory. If it is provided and the script module has
    	 *                                    not been registered yet, it will be registered.
    	 * @param array             $deps     {
    	 *                                        Optional. List of dependencies.
    	 *
    	 *                                        @type string|array ...$0 {
    	 *                                            An array of script module identifiers of the dependencies of this script
    	 *                                            module. The dependencies can be strings or arrays. If they are arrays,
    	 *                                            they need an `id` key with the script module identifier, and can contain
    	 *                                            an `import` key with either `static` or `dynamic`. By default,
    	 *                                            dependencies that don't contain an `import` key are considered static.
    	 *
    	 *                                            @type string $id     The script module identifier.
    	 *                                            @type string $import Optional. Import type. May be either `static` or
    	 *                                                                 `dynamic`. Defaults to `static`.
    	 *                                        }
    	 *                                    }
    	 * @param string|false|null $version  Optional. String specifying the script module version number. Defaults to false.
    	 *                                    It is added to the URL as a query string for cache busting purposes. If $version
    	 *                                    is set to false, the version number is the currently installed WordPress version.
    	 *                                    If $version is set to null, no version is added.
    	 */
    	public function enqueue( string $id, string $src = '', array $deps = array(), $version = false ) {
    		if ( isset( $this->registered[ $id ] ) ) {
    			$this->registered[ $id ]['enqueue'] = true;
    		} elseif ( $src ) {
    			$this->register( $id, $src, $deps, $version );
    			$this->registered[ $id ]['enqueue'] = true;
    		} else {
    			$this->enqueued_before_registered[ $id ] = true;
    		}
    	}
    
    	/**
    	 * Unmarks the script module so it will no longer be enqueued in the page.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @param string $id The identifier of the script module.
    	 */
    	public function dequeue( string $id ) {
    		if ( isset( $this->registered[ $id ] ) ) {
    			$this->registered[ $id ]['enqueue'] = false;
    		}
    		unset( $this->enqueued_before_registered[ $id ] );
    	}
    
    	/**
    	 * Removes a registered script module.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @param string $id The identifier of the script module.
    	 */
    	public function deregister( string $id ) {
    		unset( $this->registered[ $id ] );
    		unset( $this->enqueued_before_registered[ $id ] );
    	}
    
    	/**
    	 * Adds the hooks to print the import map, enqueued script modules and script
    	 * module preloads.
    	 *
    	 * In classic themes, the script modules used by the blocks are not yet known
    	 * when the `wp_head` actions is fired, so it needs to print everything in the
    	 * footer.
    	 *
    	 * @since 6.5.0
    	 */
    	public function add_hooks() {
    		$position = wp_is_block_theme() ? 'wp_head' : 'wp_footer';
    		add_action( $position, array( $this, 'print_import_map' ) );
    		add_action( $position, array( $this, 'print_enqueued_script_modules' ) );
    		add_action( $position, array( $this, 'print_script_module_preloads' ) );
    
    		add_action( 'admin_print_footer_scripts', array( $this, 'print_import_map' ) );
    		add_action( 'admin_print_footer_scripts', array( $this, 'print_enqueued_script_modules' ) );
    		add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_preloads' ) );
    	}
    
    	/**
    	 * Prints the enqueued script modules using script tags with type="module"
    	 * attributes.
    	 *
    	 * @since 6.5.0
    	 */
    	public function print_enqueued_script_modules() {
    		foreach ( $this->get_marked_for_enqueue() as $id => $script_module ) {
    			wp_print_script_tag(
    				array(
    					'type' => 'module',
    					'src'  => $this->get_src( $id ),
    					'id'   => $id . '-js-module',
    				)
    			);
    		}
    	}
    
    	/**
    	 * Prints the the static dependencies of the enqueued script modules using
    	 * link tags with rel="modulepreload" attributes.
    	 *
    	 * If a script module is marked for enqueue, it will not be preloaded.
    	 *
    	 * @since 6.5.0
    	 */
    	public function print_script_module_preloads() {
    		foreach ( $this->get_dependencies( array_keys( $this->get_marked_for_enqueue() ), array( 'static' ) ) as $id => $script_module ) {
    			// Don't preload if it's marked for enqueue.
    			if ( true !== $script_module['enqueue'] ) {
    				echo sprintf(
    					'<link rel="modulepreload" href="%s" id="%s">',
    					esc_url( $this->get_src( $id ) ),
    					esc_attr( $id . '-js-modulepreload' )
    				);
    			}
    		}
    	}
    
    	/**
    	 * Prints the import map using a script tag with a type="importmap" attribute.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @global WP_Scripts $wp_scripts The WP_Scripts object for printing the polyfill.
    	 */
    	public function print_import_map() {
    		$import_map = $this->get_import_map();
    		if ( ! empty( $import_map['imports'] ) ) {
    			global $wp_scripts;
    			if ( isset( $wp_scripts ) ) {
    				wp_print_inline_script_tag(
    					wp_get_script_polyfill(
    						$wp_scripts,
    						array(
    							'HTMLScriptElement.supports && HTMLScriptElement.supports("importmap")' => 'wp-polyfill-importmap',
    						)
    					),
    					array(
    						'id' => 'wp-load-polyfill-importmap',
    					)
    				);
    			}
    			wp_print_inline_script_tag(
    				wp_json_encode( $import_map, JSON_HEX_TAG | JSON_HEX_AMP ),
    				array(
    					'type' => 'importmap',
    					'id'   => 'wp-importmap',
    				)
    			);
    		}
    	}
    
    	/**
    	 * Returns the import map array.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @return array Array with an `imports` key mapping to an array of script module identifiers and their respective
    	 *               URLs, including the version query.
    	 */
    	private function get_import_map(): array {
    		$imports = array();
    		foreach ( $this->get_dependencies( array_keys( $this->get_marked_for_enqueue() ) ) as $id => $script_module ) {
    			$imports[ $id ] = $this->get_src( $id );
    		}
    		return array( 'imports' => $imports );
    	}
    
    	/**
    	 * Retrieves the list of script modules marked for enqueue.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @return array[] Script modules marked for enqueue, keyed by script module identifier.
    	 */
    	private function get_marked_for_enqueue(): array {
    		$enqueued = array();
    		foreach ( $this->registered as $id => $script_module ) {
    			if ( true === $script_module['enqueue'] ) {
    				$enqueued[ $id ] = $script_module;
    			}
    		}
    		return $enqueued;
    	}
    
    	/**
    	 * Retrieves all the dependencies for the given script module identifiers,
    	 * filtered by import types.
    	 *
    	 * It will consolidate an array containing a set of unique dependencies based
    	 * on the requested import types: 'static', 'dynamic', or both. This method is
    	 * recursive and also retrieves dependencies of the dependencies.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @param string[] $ids          The identifiers of the script modules for which to gather dependencies.
    	 * @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both.
    	 *                               Default is both.
    	 * @return array[] List of dependencies, keyed by script module identifier.
    	 */
    	private function get_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ) {
    		return array_reduce(
    			$ids,
    			function ( $dependency_script_modules, $id ) use ( $import_types ) {
    				$dependencies = array();
    				foreach ( $this->registered[ $id ]['dependencies'] as $dependency ) {
    					if (
    					in_array( $dependency['import'], $import_types, true ) &&
    					isset( $this->registered[ $dependency['id'] ] ) &&
    					! isset( $dependency_script_modules[ $dependency['id'] ] )
    					) {
    						$dependencies[ $dependency['id'] ] = $this->registered[ $dependency['id'] ];
    					}
    				}
    				return array_merge( $dependency_script_modules, $dependencies, $this->get_dependencies( array_keys( $dependencies ), $import_types ) );
    			},
    			array()
    		);
    	}
    
    	/**
    	 * Gets the versioned URL for a script module src.
    	 *
    	 * If $version is set to false, the version number is the currently installed
    	 * WordPress version. If $version is set to null, no version is added.
    	 * Otherwise, the string passed in $version is used.
    	 *
    	 * @since 6.5.0
    	 *
    	 * @param string $id The script module identifier.
    	 * @return string The script module src with a version if relevant.
    	 */
    	private function get_src( string $id ): string {
    		if ( ! isset( $this->registered[ $id ] ) ) {
    			return '';
    		}
    
    		$script_module = $this->registered[ $id ];
    		$src           = $script_module['src'];
    
    		if ( false === $script_module['version'] ) {
    			$src = add_query_arg( 'ver', get_bloginfo( 'version' ), $src );
    		} elseif ( null !== $script_module['version'] ) {
    			$src = add_query_arg( 'ver', $script_module['version'], $src );
    		}
    
    		/**
    		 * Filters the script module source.
    		 *
    		 * @since 6.5.0
    		 *
    		 * @param string $src Module source URL.
    		 * @param string $id  Module identifier.
    		 */
    		$src = apply_filters( 'script_module_loader_src', $src, $id );
    
    		return $src;
    	}
    }
    
    Upload File: