| 1 | /**
|
|---|
| 2 | * @license React
|
|---|
| 3 | * react-dom.react-server.production.js
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) Meta Platforms, Inc. and affiliates.
|
|---|
| 6 | *
|
|---|
| 7 | * This source code is licensed under the MIT license found in the
|
|---|
| 8 | * LICENSE file in the root directory of this source tree.
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | "use strict";
|
|---|
| 12 | var React = require("react");
|
|---|
| 13 | function noop() {}
|
|---|
| 14 | var Internals = {
|
|---|
| 15 | d: {
|
|---|
| 16 | f: noop,
|
|---|
| 17 | r: function () {
|
|---|
| 18 | throw Error(
|
|---|
| 19 | "Invalid form element. requestFormReset must be passed a form that was rendered by React."
|
|---|
| 20 | );
|
|---|
| 21 | },
|
|---|
| 22 | D: noop,
|
|---|
| 23 | C: noop,
|
|---|
| 24 | L: noop,
|
|---|
| 25 | m: noop,
|
|---|
| 26 | X: noop,
|
|---|
| 27 | S: noop,
|
|---|
| 28 | M: noop
|
|---|
| 29 | },
|
|---|
| 30 | p: 0,
|
|---|
| 31 | findDOMNode: null
|
|---|
| 32 | };
|
|---|
| 33 | if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
|
|---|
| 34 | throw Error(
|
|---|
| 35 | 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
|
|---|
| 36 | );
|
|---|
| 37 | function getCrossOriginStringAs(as, input) {
|
|---|
| 38 | if ("font" === as) return "";
|
|---|
| 39 | if ("string" === typeof input)
|
|---|
| 40 | return "use-credentials" === input ? input : "";
|
|---|
| 41 | }
|
|---|
| 42 | exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|---|
| 43 | Internals;
|
|---|
| 44 | exports.preconnect = function (href, options) {
|
|---|
| 45 | "string" === typeof href &&
|
|---|
| 46 | (options
|
|---|
| 47 | ? ((options = options.crossOrigin),
|
|---|
| 48 | (options =
|
|---|
| 49 | "string" === typeof options
|
|---|
| 50 | ? "use-credentials" === options
|
|---|
| 51 | ? options
|
|---|
| 52 | : ""
|
|---|
| 53 | : void 0))
|
|---|
| 54 | : (options = null),
|
|---|
| 55 | Internals.d.C(href, options));
|
|---|
| 56 | };
|
|---|
| 57 | exports.prefetchDNS = function (href) {
|
|---|
| 58 | "string" === typeof href && Internals.d.D(href);
|
|---|
| 59 | };
|
|---|
| 60 | exports.preinit = function (href, options) {
|
|---|
| 61 | if ("string" === typeof href && options && "string" === typeof options.as) {
|
|---|
| 62 | var as = options.as,
|
|---|
| 63 | crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
|
|---|
| 64 | integrity =
|
|---|
| 65 | "string" === typeof options.integrity ? options.integrity : void 0,
|
|---|
| 66 | fetchPriority =
|
|---|
| 67 | "string" === typeof options.fetchPriority
|
|---|
| 68 | ? options.fetchPriority
|
|---|
| 69 | : void 0;
|
|---|
| 70 | "style" === as
|
|---|
| 71 | ? Internals.d.S(
|
|---|
| 72 | href,
|
|---|
| 73 | "string" === typeof options.precedence ? options.precedence : void 0,
|
|---|
| 74 | {
|
|---|
| 75 | crossOrigin: crossOrigin,
|
|---|
| 76 | integrity: integrity,
|
|---|
| 77 | fetchPriority: fetchPriority
|
|---|
| 78 | }
|
|---|
| 79 | )
|
|---|
| 80 | : "script" === as &&
|
|---|
| 81 | Internals.d.X(href, {
|
|---|
| 82 | crossOrigin: crossOrigin,
|
|---|
| 83 | integrity: integrity,
|
|---|
| 84 | fetchPriority: fetchPriority,
|
|---|
| 85 | nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
|---|
| 86 | });
|
|---|
| 87 | }
|
|---|
| 88 | };
|
|---|
| 89 | exports.preinitModule = function (href, options) {
|
|---|
| 90 | if ("string" === typeof href)
|
|---|
| 91 | if ("object" === typeof options && null !== options) {
|
|---|
| 92 | if (null == options.as || "script" === options.as) {
|
|---|
| 93 | var crossOrigin = getCrossOriginStringAs(
|
|---|
| 94 | options.as,
|
|---|
| 95 | options.crossOrigin
|
|---|
| 96 | );
|
|---|
| 97 | Internals.d.M(href, {
|
|---|
| 98 | crossOrigin: crossOrigin,
|
|---|
| 99 | integrity:
|
|---|
| 100 | "string" === typeof options.integrity ? options.integrity : void 0,
|
|---|
| 101 | nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
|---|
| 102 | });
|
|---|
| 103 | }
|
|---|
| 104 | } else null == options && Internals.d.M(href);
|
|---|
| 105 | };
|
|---|
| 106 | exports.preload = function (href, options) {
|
|---|
| 107 | if (
|
|---|
| 108 | "string" === typeof href &&
|
|---|
| 109 | "object" === typeof options &&
|
|---|
| 110 | null !== options &&
|
|---|
| 111 | "string" === typeof options.as
|
|---|
| 112 | ) {
|
|---|
| 113 | var as = options.as,
|
|---|
| 114 | crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
|
|---|
| 115 | Internals.d.L(href, as, {
|
|---|
| 116 | crossOrigin: crossOrigin,
|
|---|
| 117 | integrity:
|
|---|
| 118 | "string" === typeof options.integrity ? options.integrity : void 0,
|
|---|
| 119 | nonce: "string" === typeof options.nonce ? options.nonce : void 0,
|
|---|
| 120 | type: "string" === typeof options.type ? options.type : void 0,
|
|---|
| 121 | fetchPriority:
|
|---|
| 122 | "string" === typeof options.fetchPriority
|
|---|
| 123 | ? options.fetchPriority
|
|---|
| 124 | : void 0,
|
|---|
| 125 | referrerPolicy:
|
|---|
| 126 | "string" === typeof options.referrerPolicy
|
|---|
| 127 | ? options.referrerPolicy
|
|---|
| 128 | : void 0,
|
|---|
| 129 | imageSrcSet:
|
|---|
| 130 | "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
|
|---|
| 131 | imageSizes:
|
|---|
| 132 | "string" === typeof options.imageSizes ? options.imageSizes : void 0,
|
|---|
| 133 | media: "string" === typeof options.media ? options.media : void 0
|
|---|
| 134 | });
|
|---|
| 135 | }
|
|---|
| 136 | };
|
|---|
| 137 | exports.preloadModule = function (href, options) {
|
|---|
| 138 | if ("string" === typeof href)
|
|---|
| 139 | if (options) {
|
|---|
| 140 | var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
|
|---|
| 141 | Internals.d.m(href, {
|
|---|
| 142 | as:
|
|---|
| 143 | "string" === typeof options.as && "script" !== options.as
|
|---|
| 144 | ? options.as
|
|---|
| 145 | : void 0,
|
|---|
| 146 | crossOrigin: crossOrigin,
|
|---|
| 147 | integrity:
|
|---|
| 148 | "string" === typeof options.integrity ? options.integrity : void 0
|
|---|
| 149 | });
|
|---|
| 150 | } else Internals.d.m(href);
|
|---|
| 151 | };
|
|---|
| 152 | exports.version = "19.2.3";
|
|---|