maquinaweb-ui 2.67.0 → 2.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.js +3 -5
- package/dist/actions.js.map +1 -1
- package/dist/container-animation/container-animation.d.ts +2 -2
- package/dist/container-animation/container-animation.d.ts.map +1 -1
- package/dist/date-field/DateField.d.ts +2 -2
- package/dist/date-hour-field/DateHourField.d.ts +2 -2
- package/dist/input-suggest/input-suggest.d.ts +2 -2
- package/dist/landing-text/client-landing-text.js +2 -3
- package/dist/landing-text/client-landing-text.js.map +1 -1
- package/dist/landing-text/landing-content.d.ts.map +1 -1
- package/dist/landing-text/landing-content.js +4 -1
- package/dist/landing-text/landing-content.js.map +1 -1
- package/dist/landing-text/landing-text.d.ts +2 -2
- package/dist/landing-text/server-landing-text.d.ts +2 -2
- package/dist/landing-text/server-landing-text.d.ts.map +1 -1
- package/dist/page-header/page-header.d.ts +2 -2
- package/dist/remote-selector/remote-selector.d.ts +3 -3
- package/dist/text-field/TextField.d.ts +5 -5
- package/dist/toggle-field/ToggleGroup.d.ts +2 -2
- package/package.json +1 -1
- package/dist/_virtual/rolldown_runtime.js +0 -31
- package/dist/node_modules/next/cache.js +0 -79
- package/dist/node_modules/next/cache.js.map +0 -1
- package/dist/node_modules/next/dist/build/output/log.js +0 -119
- package/dist/node_modules/next/dist/build/output/log.js.map +0 -1
- package/dist/node_modules/next/dist/client/components/app-router-headers.js +0 -119
- package/dist/node_modules/next/dist/client/components/app-router-headers.js.map +0 -1
- package/dist/node_modules/next/dist/client/components/hooks-server-context.js +0 -41
- package/dist/node_modules/next/dist/client/components/hooks-server-context.js.map +0 -1
- package/dist/node_modules/next/dist/client/components/static-generation-bailout.js +0 -41
- package/dist/node_modules/next/dist/client/components/static-generation-bailout.js.map +0 -1
- package/dist/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +0 -312
- package/dist/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js.map +0 -1
- package/dist/node_modules/next/dist/compiled/@opentelemetry/api/index.js +0 -1286
- package/dist/node_modules/next/dist/compiled/@opentelemetry/api/index.js.map +0 -1
- package/dist/node_modules/next/dist/lib/batcher.js +0 -63
- package/dist/node_modules/next/dist/lib/batcher.js.map +0 -1
- package/dist/node_modules/next/dist/lib/constants.js +0 -325
- package/dist/node_modules/next/dist/lib/constants.js.map +0 -1
- package/dist/node_modules/next/dist/lib/detached-promise.js +0 -30
- package/dist/node_modules/next/dist/lib/detached-promise.js.map +0 -1
- package/dist/node_modules/next/dist/lib/framework/boundary-constants.js +0 -36
- package/dist/node_modules/next/dist/lib/framework/boundary-constants.js.map +0 -1
- package/dist/node_modules/next/dist/lib/picocolors.js +0 -141
- package/dist/node_modules/next/dist/lib/picocolors.js.map +0 -1
- package/dist/node_modules/next/dist/lib/scheduler.js +0 -49
- package/dist/node_modules/next/dist/lib/scheduler.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/async-local-storage.js +0 -67
- package/dist/node_modules/next/dist/server/app-render/async-local-storage.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js +0 -763
- package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +0 -19
- package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/staged-rendering.js +0 -215
- package/dist/node_modules/next/dist/server/app-render/staged-rendering.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js +0 -20
- package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js +0 -20
- package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +0 -20
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js.map +0 -1
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +0 -214
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js.map +0 -1
- package/dist/node_modules/next/dist/server/base-http/helpers.js +0 -36
- package/dist/node_modules/next/dist/server/base-http/helpers.js.map +0 -1
- package/dist/node_modules/next/dist/server/client-component-renderer-logger.js +0 -65
- package/dist/node_modules/next/dist/server/client-component-renderer-logger.js.map +0 -1
- package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js +0 -85
- package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js.map +0 -1
- package/dist/node_modules/next/dist/server/lib/clone-response.js +0 -55
- package/dist/node_modules/next/dist/server/lib/clone-response.js.map +0 -1
- package/dist/node_modules/next/dist/server/lib/dedupe-fetch.js +0 -106
- package/dist/node_modules/next/dist/server/lib/dedupe-fetch.js.map +0 -1
- package/dist/node_modules/next/dist/server/lib/lru-cache.js +0 -179
- package/dist/node_modules/next/dist/server/lib/lru-cache.js.map +0 -1
- package/dist/node_modules/next/dist/server/lib/patch-fetch.js +0 -703
- package/dist/node_modules/next/dist/server/lib/patch-fetch.js.map +0 -1
- package/dist/node_modules/next/dist/server/lib/trace/constants.js +0 -186
- package/dist/node_modules/next/dist/server/lib/trace/constants.js.map +0 -1
- package/dist/node_modules/next/dist/server/lib/trace/tracer.js +0 -229
- package/dist/node_modules/next/dist/server/lib/trace/tracer.js.map +0 -1
- package/dist/node_modules/next/dist/server/pipe-readable.js +0 -112
- package/dist/node_modules/next/dist/server/pipe-readable.js.map +0 -1
- package/dist/node_modules/next/dist/server/render-result.js +0 -156
- package/dist/node_modules/next/dist/server/render-result.js.map +0 -1
- package/dist/node_modules/next/dist/server/request-meta.js +0 -54
- package/dist/node_modules/next/dist/server/request-meta.js.map +0 -1
- package/dist/node_modules/next/dist/server/response-cache/index.js +0 -255
- package/dist/node_modules/next/dist/server/response-cache/index.js.map +0 -1
- package/dist/node_modules/next/dist/server/response-cache/types.js +0 -43
- package/dist/node_modules/next/dist/server/response-cache/types.js.map +0 -1
- package/dist/node_modules/next/dist/server/response-cache/utils.js +0 -100
- package/dist/node_modules/next/dist/server/response-cache/utils.js.map +0 -1
- package/dist/node_modules/next/dist/server/route-kind.js +0 -38
- package/dist/node_modules/next/dist/server/route-kind.js.map +0 -1
- package/dist/node_modules/next/dist/server/stream-utils/encoded-tags.js +0 -115
- package/dist/node_modules/next/dist/server/stream-utils/encoded-tags.js.map +0 -1
- package/dist/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +0 -635
- package/dist/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js.map +0 -1
- package/dist/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +0 -58
- package/dist/node_modules/next/dist/server/stream-utils/uint8array-helpers.js.map +0 -1
- package/dist/node_modules/next/dist/server/use-cache/cache-life.js +0 -140
- package/dist/node_modules/next/dist/server/use-cache/cache-life.js.map +0 -1
- package/dist/node_modules/next/dist/server/use-cache/cache-tag.js +0 -52
- package/dist/node_modules/next/dist/server/use-cache/cache-tag.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/error.js +0 -55
- package/dist/node_modules/next/dist/server/web/error.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/next-url.js +0 -203
- package/dist/node_modules/next/dist/server/web/next-url.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +0 -103
- package/dist/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/spec-extension/cookies.js +0 -31
- package/dist/node_modules/next/dist/server/web/spec-extension/cookies.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/spec-extension/request.js +0 -98
- package/dist/node_modules/next/dist/server/web/spec-extension/request.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/spec-extension/revalidate.js +0 -162
- package/dist/node_modules/next/dist/server/web/spec-extension/revalidate.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +0 -187
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-cache.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +0 -49
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js.map +0 -1
- package/dist/node_modules/next/dist/server/web/utils.js +0 -113
- package/dist/node_modules/next/dist/server/web/utils.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/action-revalidation-kind.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/action-revalidation-kind.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/errors/constants.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/errors/constants.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/get-hostname.js +0 -25
- package/dist/node_modules/next/dist/shared/lib/get-hostname.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/hash.js +0 -37
- package/dist/node_modules/next/dist/shared/lib/hash.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -23
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -43
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/is-thenable.js +0 -21
- package/dist/node_modules/next/dist/shared/lib/is-thenable.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +0 -36
- package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -21
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/promise-with-resolvers.js +0 -31
- package/dist/node_modules/next/dist/shared/lib/promise-with-resolvers.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -31
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -25
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +0 -25
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -52
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +0 -29
- package/dist/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +0 -52
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +0 -93
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -27
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -25
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +0 -26
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -21
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -168
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js.map +0 -1
- package/dist/node_modules/next/dist/shared/lib/segment.js +0 -85
- package/dist/node_modules/next/dist/shared/lib/segment.js.map +0 -1
|
@@ -1,635 +0,0 @@
|
|
|
1
|
-
import { __commonJS } from "../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_constants } from "../lib/trace/constants.js";
|
|
3
|
-
import { require_tracer } from "../lib/trace/tracer.js";
|
|
4
|
-
import { require_app_router_headers } from "../../client/components/app-router-headers.js";
|
|
5
|
-
import { require_scheduler } from "../../lib/scheduler.js";
|
|
6
|
-
import { require_detached_promise } from "../../lib/detached-promise.js";
|
|
7
|
-
import { require_encoded_tags } from "./encoded-tags.js";
|
|
8
|
-
import { require_uint8array_helpers } from "./uint8array-helpers.js";
|
|
9
|
-
import { require_constants as require_constants$1 } from "../../shared/lib/errors/constants.js";
|
|
10
|
-
import { require_cache_busting_search_param } from "../../shared/lib/router/utils/cache-busting-search-param.js";
|
|
11
|
-
|
|
12
|
-
//#region node_modules/next/dist/server/stream-utils/node-web-streams-helper.js
|
|
13
|
-
var require_node_web_streams_helper = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/server/stream-utils/node-web-streams-helper.js": ((exports) => {
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
function _export(target, all) {
|
|
16
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: all[name]
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
_export(exports, {
|
|
22
|
-
chainStreams: function() {
|
|
23
|
-
return chainStreams;
|
|
24
|
-
},
|
|
25
|
-
continueDynamicHTMLResume: function() {
|
|
26
|
-
return continueDynamicHTMLResume;
|
|
27
|
-
},
|
|
28
|
-
continueDynamicPrerender: function() {
|
|
29
|
-
return continueDynamicPrerender;
|
|
30
|
-
},
|
|
31
|
-
continueFizzStream: function() {
|
|
32
|
-
return continueFizzStream;
|
|
33
|
-
},
|
|
34
|
-
continueStaticFallbackPrerender: function() {
|
|
35
|
-
return continueStaticFallbackPrerender;
|
|
36
|
-
},
|
|
37
|
-
continueStaticPrerender: function() {
|
|
38
|
-
return continueStaticPrerender;
|
|
39
|
-
},
|
|
40
|
-
createBufferedTransformStream: function() {
|
|
41
|
-
return createBufferedTransformStream;
|
|
42
|
-
},
|
|
43
|
-
createDocumentClosingStream: function() {
|
|
44
|
-
return createDocumentClosingStream;
|
|
45
|
-
},
|
|
46
|
-
createInstantTestScriptInsertionTransformStream: function() {
|
|
47
|
-
return createInstantTestScriptInsertionTransformStream;
|
|
48
|
-
},
|
|
49
|
-
createRootLayoutValidatorStream: function() {
|
|
50
|
-
return createRootLayoutValidatorStream;
|
|
51
|
-
},
|
|
52
|
-
createRuntimePrefetchTransformStream: function() {
|
|
53
|
-
return createRuntimePrefetchTransformStream;
|
|
54
|
-
},
|
|
55
|
-
renderToInitialFizzStream: function() {
|
|
56
|
-
return renderToInitialFizzStream;
|
|
57
|
-
},
|
|
58
|
-
streamFromBuffer: function() {
|
|
59
|
-
return streamFromBuffer;
|
|
60
|
-
},
|
|
61
|
-
streamFromString: function() {
|
|
62
|
-
return streamFromString;
|
|
63
|
-
},
|
|
64
|
-
streamToBuffer: function() {
|
|
65
|
-
return streamToBuffer;
|
|
66
|
-
},
|
|
67
|
-
streamToString: function() {
|
|
68
|
-
return streamToString;
|
|
69
|
-
},
|
|
70
|
-
streamToUint8Array: function() {
|
|
71
|
-
return streamToUint8Array;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
const _tracer = require_tracer();
|
|
75
|
-
const _constants = require_constants();
|
|
76
|
-
const _detachedpromise = require_detached_promise();
|
|
77
|
-
const _scheduler = require_scheduler();
|
|
78
|
-
const _encodedtags = require_encoded_tags();
|
|
79
|
-
const _uint8arrayhelpers = require_uint8array_helpers();
|
|
80
|
-
const _constants1 = require_constants$1();
|
|
81
|
-
const _approuterheaders = require_app_router_headers();
|
|
82
|
-
const _cachebustingsearchparam = require_cache_busting_search_param();
|
|
83
|
-
function voidCatch() {}
|
|
84
|
-
const encoder = new TextEncoder();
|
|
85
|
-
function chainStreams(...streams) {
|
|
86
|
-
if (streams.length === 0) return new ReadableStream({ start(controller) {
|
|
87
|
-
controller.close();
|
|
88
|
-
} });
|
|
89
|
-
if (streams.length === 1) return streams[0];
|
|
90
|
-
const { readable, writable } = new TransformStream();
|
|
91
|
-
let promise = streams[0].pipeTo(writable, { preventClose: true });
|
|
92
|
-
let i = 1;
|
|
93
|
-
for (; i < streams.length - 1; i++) {
|
|
94
|
-
const nextStream = streams[i];
|
|
95
|
-
promise = promise.then(() => nextStream.pipeTo(writable, { preventClose: true }));
|
|
96
|
-
}
|
|
97
|
-
const lastStream = streams[i];
|
|
98
|
-
promise = promise.then(() => lastStream.pipeTo(writable));
|
|
99
|
-
promise.catch(voidCatch);
|
|
100
|
-
return readable;
|
|
101
|
-
}
|
|
102
|
-
function streamFromString(str) {
|
|
103
|
-
return new ReadableStream({ start(controller) {
|
|
104
|
-
controller.enqueue(encoder.encode(str));
|
|
105
|
-
controller.close();
|
|
106
|
-
} });
|
|
107
|
-
}
|
|
108
|
-
function streamFromBuffer(chunk) {
|
|
109
|
-
return new ReadableStream({ start(controller) {
|
|
110
|
-
controller.enqueue(chunk);
|
|
111
|
-
controller.close();
|
|
112
|
-
} });
|
|
113
|
-
}
|
|
114
|
-
async function streamToChunks(stream) {
|
|
115
|
-
const reader = stream.getReader();
|
|
116
|
-
const chunks = [];
|
|
117
|
-
while (true) {
|
|
118
|
-
const { done, value } = await reader.read();
|
|
119
|
-
if (done) break;
|
|
120
|
-
chunks.push(value);
|
|
121
|
-
}
|
|
122
|
-
return chunks;
|
|
123
|
-
}
|
|
124
|
-
function concatUint8Arrays(chunks) {
|
|
125
|
-
const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
|
|
126
|
-
const result = new Uint8Array(totalLength);
|
|
127
|
-
let offset = 0;
|
|
128
|
-
for (const chunk of chunks) {
|
|
129
|
-
result.set(chunk, offset);
|
|
130
|
-
offset += chunk.length;
|
|
131
|
-
}
|
|
132
|
-
return result;
|
|
133
|
-
}
|
|
134
|
-
async function streamToUint8Array(stream) {
|
|
135
|
-
return concatUint8Arrays(await streamToChunks(stream));
|
|
136
|
-
}
|
|
137
|
-
async function streamToBuffer(stream) {
|
|
138
|
-
return Buffer.concat(await streamToChunks(stream));
|
|
139
|
-
}
|
|
140
|
-
async function streamToString(stream, signal) {
|
|
141
|
-
const decoder = new TextDecoder("utf-8", { fatal: true });
|
|
142
|
-
let string = "";
|
|
143
|
-
for await (const chunk of stream) {
|
|
144
|
-
if (signal == null ? void 0 : signal.aborted) return string;
|
|
145
|
-
string += decoder.decode(chunk, { stream: true });
|
|
146
|
-
}
|
|
147
|
-
string += decoder.decode();
|
|
148
|
-
return string;
|
|
149
|
-
}
|
|
150
|
-
function createBufferedTransformStream(options = {}) {
|
|
151
|
-
const { maxBufferByteLength = Infinity } = options;
|
|
152
|
-
let bufferedChunks = [];
|
|
153
|
-
let bufferByteLength = 0;
|
|
154
|
-
let pending;
|
|
155
|
-
const flush = (controller) => {
|
|
156
|
-
try {
|
|
157
|
-
if (bufferedChunks.length === 0) return;
|
|
158
|
-
const chunk = new Uint8Array(bufferByteLength);
|
|
159
|
-
let copiedBytes = 0;
|
|
160
|
-
for (let i = 0; i < bufferedChunks.length; i++) {
|
|
161
|
-
const bufferedChunk = bufferedChunks[i];
|
|
162
|
-
chunk.set(bufferedChunk, copiedBytes);
|
|
163
|
-
copiedBytes += bufferedChunk.byteLength;
|
|
164
|
-
}
|
|
165
|
-
bufferedChunks.length = 0;
|
|
166
|
-
bufferByteLength = 0;
|
|
167
|
-
controller.enqueue(chunk);
|
|
168
|
-
} catch {}
|
|
169
|
-
};
|
|
170
|
-
const scheduleFlush = (controller) => {
|
|
171
|
-
if (pending) return;
|
|
172
|
-
const detached = new _detachedpromise.DetachedPromise();
|
|
173
|
-
pending = detached;
|
|
174
|
-
(0, _scheduler.scheduleImmediate)(() => {
|
|
175
|
-
try {
|
|
176
|
-
flush(controller);
|
|
177
|
-
} finally {
|
|
178
|
-
pending = void 0;
|
|
179
|
-
detached.resolve();
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
return new TransformStream({
|
|
184
|
-
transform(chunk, controller) {
|
|
185
|
-
bufferedChunks.push(chunk);
|
|
186
|
-
bufferByteLength += chunk.byteLength;
|
|
187
|
-
if (bufferByteLength >= maxBufferByteLength) flush(controller);
|
|
188
|
-
else scheduleFlush(controller);
|
|
189
|
-
},
|
|
190
|
-
flush() {
|
|
191
|
-
return pending == null ? void 0 : pending.promise;
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
function renderToInitialFizzStream({ ReactDOMServer, element, streamOptions }) {
|
|
196
|
-
return (0, _tracer.getTracer)().trace(_constants.AppRenderSpan.renderToReadableStream, async () => ReactDOMServer.renderToReadableStream(element, streamOptions));
|
|
197
|
-
}
|
|
198
|
-
function createMetadataTransformStream(insert) {
|
|
199
|
-
let chunkIndex = -1;
|
|
200
|
-
let isMarkRemoved = false;
|
|
201
|
-
return new TransformStream({ async transform(chunk, controller) {
|
|
202
|
-
let iconMarkIndex = -1;
|
|
203
|
-
let closedHeadIndex = -1;
|
|
204
|
-
chunkIndex++;
|
|
205
|
-
if (isMarkRemoved) {
|
|
206
|
-
controller.enqueue(chunk);
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
let iconMarkLength = 0;
|
|
210
|
-
if (iconMarkIndex === -1) {
|
|
211
|
-
iconMarkIndex = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.META.ICON_MARK);
|
|
212
|
-
if (iconMarkIndex === -1) {
|
|
213
|
-
controller.enqueue(chunk);
|
|
214
|
-
return;
|
|
215
|
-
} else {
|
|
216
|
-
iconMarkLength = _encodedtags.ENCODED_TAGS.META.ICON_MARK.length;
|
|
217
|
-
if (chunk[iconMarkIndex + iconMarkLength] === 47) iconMarkLength += 2;
|
|
218
|
-
else iconMarkLength++;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
if (chunkIndex === 0) {
|
|
222
|
-
closedHeadIndex = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.HEAD);
|
|
223
|
-
if (iconMarkIndex !== -1) {
|
|
224
|
-
if (iconMarkIndex < closedHeadIndex) {
|
|
225
|
-
const replaced = new Uint8Array(chunk.length - iconMarkLength);
|
|
226
|
-
replaced.set(chunk.subarray(0, iconMarkIndex));
|
|
227
|
-
replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex);
|
|
228
|
-
chunk = replaced;
|
|
229
|
-
} else {
|
|
230
|
-
const insertion = await insert();
|
|
231
|
-
const encodedInsertion = encoder.encode(insertion);
|
|
232
|
-
const insertionLength = encodedInsertion.length;
|
|
233
|
-
const replaced = new Uint8Array(chunk.length - iconMarkLength + insertionLength);
|
|
234
|
-
replaced.set(chunk.subarray(0, iconMarkIndex));
|
|
235
|
-
replaced.set(encodedInsertion, iconMarkIndex);
|
|
236
|
-
replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex + insertionLength);
|
|
237
|
-
chunk = replaced;
|
|
238
|
-
}
|
|
239
|
-
isMarkRemoved = true;
|
|
240
|
-
}
|
|
241
|
-
} else {
|
|
242
|
-
const insertion = await insert();
|
|
243
|
-
const encodedInsertion = encoder.encode(insertion);
|
|
244
|
-
const insertionLength = encodedInsertion.length;
|
|
245
|
-
const replaced = new Uint8Array(chunk.length - iconMarkLength + insertionLength);
|
|
246
|
-
replaced.set(chunk.subarray(0, iconMarkIndex));
|
|
247
|
-
replaced.set(encodedInsertion, iconMarkIndex);
|
|
248
|
-
replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex + insertionLength);
|
|
249
|
-
chunk = replaced;
|
|
250
|
-
isMarkRemoved = true;
|
|
251
|
-
}
|
|
252
|
-
controller.enqueue(chunk);
|
|
253
|
-
} });
|
|
254
|
-
}
|
|
255
|
-
function createHeadInsertionTransformStream(insert) {
|
|
256
|
-
let inserted = false;
|
|
257
|
-
let hasBytes = false;
|
|
258
|
-
return new TransformStream({
|
|
259
|
-
async transform(chunk, controller) {
|
|
260
|
-
hasBytes = true;
|
|
261
|
-
const insertion = await insert();
|
|
262
|
-
if (inserted) {
|
|
263
|
-
if (insertion) {
|
|
264
|
-
const encodedInsertion = encoder.encode(insertion);
|
|
265
|
-
controller.enqueue(encodedInsertion);
|
|
266
|
-
}
|
|
267
|
-
controller.enqueue(chunk);
|
|
268
|
-
} else {
|
|
269
|
-
const index = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.HEAD);
|
|
270
|
-
if (index !== -1) {
|
|
271
|
-
if (insertion) {
|
|
272
|
-
const encodedInsertion = encoder.encode(insertion);
|
|
273
|
-
const insertedHeadContent = new Uint8Array(chunk.length + encodedInsertion.length);
|
|
274
|
-
insertedHeadContent.set(chunk.slice(0, index));
|
|
275
|
-
insertedHeadContent.set(encodedInsertion, index);
|
|
276
|
-
insertedHeadContent.set(chunk.slice(index), index + encodedInsertion.length);
|
|
277
|
-
controller.enqueue(insertedHeadContent);
|
|
278
|
-
} else controller.enqueue(chunk);
|
|
279
|
-
inserted = true;
|
|
280
|
-
} else {
|
|
281
|
-
if (insertion) controller.enqueue(encoder.encode(insertion));
|
|
282
|
-
controller.enqueue(chunk);
|
|
283
|
-
inserted = true;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
async flush(controller) {
|
|
288
|
-
if (hasBytes) {
|
|
289
|
-
const insertion = await insert();
|
|
290
|
-
if (insertion) controller.enqueue(encoder.encode(insertion));
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
function createClientResumeScriptInsertionTransformStream() {
|
|
296
|
-
const segmentPath = "/_full";
|
|
297
|
-
const cacheBustingHeader = (0, _cachebustingsearchparam.computeCacheBustingSearchParam)("1", "/_full", void 0, void 0);
|
|
298
|
-
const NEXT_CLIENT_RESUME_SCRIPT = `<script>__NEXT_CLIENT_RESUME=fetch(location.pathname+'?${`${_approuterheaders.NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`}',{credentials:'same-origin',headers:{'${_approuterheaders.RSC_HEADER}': '1','${_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER}': '1','${_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}': '${segmentPath}'}})<\/script>`;
|
|
299
|
-
let didAlreadyInsert = false;
|
|
300
|
-
return new TransformStream({ transform(chunk, controller) {
|
|
301
|
-
if (didAlreadyInsert) {
|
|
302
|
-
controller.enqueue(chunk);
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
const headClosingTagIndex = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.HEAD);
|
|
306
|
-
if (headClosingTagIndex === -1) {
|
|
307
|
-
controller.enqueue(chunk);
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
const encodedInsertion = encoder.encode(NEXT_CLIENT_RESUME_SCRIPT);
|
|
311
|
-
const insertedHeadContent = new Uint8Array(chunk.length + encodedInsertion.length);
|
|
312
|
-
insertedHeadContent.set(chunk.slice(0, headClosingTagIndex));
|
|
313
|
-
insertedHeadContent.set(encodedInsertion, headClosingTagIndex);
|
|
314
|
-
insertedHeadContent.set(chunk.slice(headClosingTagIndex), headClosingTagIndex + encodedInsertion.length);
|
|
315
|
-
controller.enqueue(insertedHeadContent);
|
|
316
|
-
didAlreadyInsert = true;
|
|
317
|
-
} });
|
|
318
|
-
}
|
|
319
|
-
function createInstantTestScriptInsertionTransformStream(requestId) {
|
|
320
|
-
const segmentPath = "/_full";
|
|
321
|
-
const cacheBustingHeader = (0, _cachebustingsearchparam.computeCacheBustingSearchParam)("1", segmentPath, void 0, void 0);
|
|
322
|
-
const searchStr = `${_approuterheaders.NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`;
|
|
323
|
-
const INSTANT_TEST_SCRIPT = `<script>${requestId !== null ? `self.__next_r=${JSON.stringify(requestId)};` : ""}self.__next_instant_test=fetch(location.pathname+'?${searchStr}',{credentials:'same-origin',headers:{'${_approuterheaders.RSC_HEADER}':'1','${_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER}':'1','${_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}':'${segmentPath}','${_approuterheaders.NEXT_INSTANT_PREFETCH_HEADER}':'1'}})<\/script>`;
|
|
324
|
-
let didAlreadyInsert = false;
|
|
325
|
-
return new TransformStream({
|
|
326
|
-
transform(chunk, controller) {
|
|
327
|
-
if (didAlreadyInsert) {
|
|
328
|
-
controller.enqueue(chunk);
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
const headOpenIndex = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.OPENING.HEAD);
|
|
332
|
-
if (headOpenIndex === -1) {
|
|
333
|
-
controller.enqueue(chunk);
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
const headCloseAngle = chunk.indexOf(62, headOpenIndex + _encodedtags.ENCODED_TAGS.OPENING.HEAD.length);
|
|
337
|
-
if (headCloseAngle === -1) {
|
|
338
|
-
controller.enqueue(chunk);
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
const encodedInsertion = encoder.encode(INSTANT_TEST_SCRIPT);
|
|
342
|
-
const insertionPoint = headCloseAngle + 1;
|
|
343
|
-
const insertedHeadContent = new Uint8Array(chunk.length + encodedInsertion.length);
|
|
344
|
-
insertedHeadContent.set(chunk.slice(0, insertionPoint));
|
|
345
|
-
insertedHeadContent.set(encodedInsertion, insertionPoint);
|
|
346
|
-
insertedHeadContent.set(chunk.slice(insertionPoint), insertionPoint + encodedInsertion.length);
|
|
347
|
-
controller.enqueue(insertedHeadContent);
|
|
348
|
-
didAlreadyInsert = true;
|
|
349
|
-
},
|
|
350
|
-
flush(controller) {
|
|
351
|
-
controller.enqueue(_encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML);
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
function createDeferredSuffixStream(suffix) {
|
|
356
|
-
let flushed = false;
|
|
357
|
-
let pending;
|
|
358
|
-
const flush = (controller) => {
|
|
359
|
-
const detached = new _detachedpromise.DetachedPromise();
|
|
360
|
-
pending = detached;
|
|
361
|
-
(0, _scheduler.scheduleImmediate)(() => {
|
|
362
|
-
try {
|
|
363
|
-
controller.enqueue(encoder.encode(suffix));
|
|
364
|
-
} catch {} finally {
|
|
365
|
-
pending = void 0;
|
|
366
|
-
detached.resolve();
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
};
|
|
370
|
-
return new TransformStream({
|
|
371
|
-
transform(chunk, controller) {
|
|
372
|
-
controller.enqueue(chunk);
|
|
373
|
-
if (flushed) return;
|
|
374
|
-
flushed = true;
|
|
375
|
-
flush(controller);
|
|
376
|
-
},
|
|
377
|
-
flush(controller) {
|
|
378
|
-
if (pending) return pending.promise;
|
|
379
|
-
if (flushed) return;
|
|
380
|
-
controller.enqueue(encoder.encode(suffix));
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
function createFlightDataInjectionTransformStream(stream, delayDataUntilFirstHtmlChunk) {
|
|
385
|
-
let htmlStreamFinished = false;
|
|
386
|
-
let pull = null;
|
|
387
|
-
let donePulling = false;
|
|
388
|
-
function startOrContinuePulling(controller) {
|
|
389
|
-
if (!pull) pull = startPulling(controller);
|
|
390
|
-
return pull;
|
|
391
|
-
}
|
|
392
|
-
async function startPulling(controller) {
|
|
393
|
-
const reader = stream.getReader();
|
|
394
|
-
if (delayDataUntilFirstHtmlChunk) await (0, _scheduler.atLeastOneTask)();
|
|
395
|
-
try {
|
|
396
|
-
while (true) {
|
|
397
|
-
const { done, value } = await reader.read();
|
|
398
|
-
if (done) {
|
|
399
|
-
donePulling = true;
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
if (!delayDataUntilFirstHtmlChunk && !htmlStreamFinished) await (0, _scheduler.atLeastOneTask)();
|
|
403
|
-
controller.enqueue(value);
|
|
404
|
-
}
|
|
405
|
-
} catch (err) {
|
|
406
|
-
controller.error(err);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
return new TransformStream({
|
|
410
|
-
start(controller) {
|
|
411
|
-
if (!delayDataUntilFirstHtmlChunk) startOrContinuePulling(controller);
|
|
412
|
-
},
|
|
413
|
-
transform(chunk, controller) {
|
|
414
|
-
controller.enqueue(chunk);
|
|
415
|
-
if (delayDataUntilFirstHtmlChunk) startOrContinuePulling(controller);
|
|
416
|
-
},
|
|
417
|
-
flush(controller) {
|
|
418
|
-
htmlStreamFinished = true;
|
|
419
|
-
if (donePulling) return;
|
|
420
|
-
return startOrContinuePulling(controller);
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
const CLOSE_TAG = "</body></html>";
|
|
425
|
-
/**
|
|
426
|
-
* This transform stream moves the suffix to the end of the stream, so results
|
|
427
|
-
* like `</body></html><script>...<\/script>` will be transformed to
|
|
428
|
-
* `<script>...<\/script></body></html>`.
|
|
429
|
-
*/ function createMoveSuffixStream() {
|
|
430
|
-
let foundSuffix = false;
|
|
431
|
-
return new TransformStream({
|
|
432
|
-
transform(chunk, controller) {
|
|
433
|
-
if (foundSuffix) return controller.enqueue(chunk);
|
|
434
|
-
const index = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML);
|
|
435
|
-
if (index > -1) {
|
|
436
|
-
foundSuffix = true;
|
|
437
|
-
if (chunk.length === _encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length) return;
|
|
438
|
-
const before = chunk.slice(0, index);
|
|
439
|
-
controller.enqueue(before);
|
|
440
|
-
if (chunk.length > _encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length + index) {
|
|
441
|
-
const after = chunk.slice(index + _encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length);
|
|
442
|
-
controller.enqueue(after);
|
|
443
|
-
}
|
|
444
|
-
} else controller.enqueue(chunk);
|
|
445
|
-
},
|
|
446
|
-
flush(controller) {
|
|
447
|
-
controller.enqueue(_encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML);
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
function createStripDocumentClosingTagsTransform() {
|
|
452
|
-
return new TransformStream({ transform(chunk, controller) {
|
|
453
|
-
if ((0, _uint8arrayhelpers.isEquivalentUint8Arrays)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML) || (0, _uint8arrayhelpers.isEquivalentUint8Arrays)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.BODY) || (0, _uint8arrayhelpers.isEquivalentUint8Arrays)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.HTML)) return;
|
|
454
|
-
chunk = (0, _uint8arrayhelpers.removeFromUint8Array)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.BODY);
|
|
455
|
-
chunk = (0, _uint8arrayhelpers.removeFromUint8Array)(chunk, _encodedtags.ENCODED_TAGS.CLOSED.HTML);
|
|
456
|
-
controller.enqueue(chunk);
|
|
457
|
-
} });
|
|
458
|
-
}
|
|
459
|
-
function createHtmlDataDplIdTransformStream(dplId) {
|
|
460
|
-
let didTransform = false;
|
|
461
|
-
return new TransformStream({ transform(chunk, controller) {
|
|
462
|
-
if (didTransform) {
|
|
463
|
-
controller.enqueue(chunk);
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
const htmlTagIndex = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.OPENING.HTML);
|
|
467
|
-
if (htmlTagIndex === -1) {
|
|
468
|
-
controller.enqueue(chunk);
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
const insertionPoint = htmlTagIndex + _encodedtags.ENCODED_TAGS.OPENING.HTML.length;
|
|
472
|
-
const attribute = ` data-dpl-id="${dplId}"`;
|
|
473
|
-
const encodedAttribute = encoder.encode(attribute);
|
|
474
|
-
const modifiedChunk = new Uint8Array(chunk.length + encodedAttribute.length);
|
|
475
|
-
modifiedChunk.set(chunk.subarray(0, insertionPoint));
|
|
476
|
-
modifiedChunk.set(encodedAttribute, insertionPoint);
|
|
477
|
-
modifiedChunk.set(chunk.subarray(insertionPoint), insertionPoint + encodedAttribute.length);
|
|
478
|
-
controller.enqueue(modifiedChunk);
|
|
479
|
-
didTransform = true;
|
|
480
|
-
} });
|
|
481
|
-
}
|
|
482
|
-
function createRootLayoutValidatorStream() {
|
|
483
|
-
let foundHtml = false;
|
|
484
|
-
let foundBody = false;
|
|
485
|
-
return new TransformStream({
|
|
486
|
-
async transform(chunk, controller) {
|
|
487
|
-
if (!foundHtml && (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.OPENING.HTML) > -1) foundHtml = true;
|
|
488
|
-
if (!foundBody && (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.OPENING.BODY) > -1) foundBody = true;
|
|
489
|
-
controller.enqueue(chunk);
|
|
490
|
-
},
|
|
491
|
-
flush(controller) {
|
|
492
|
-
const missingTags = [];
|
|
493
|
-
if (!foundHtml) missingTags.push("html");
|
|
494
|
-
if (!foundBody) missingTags.push("body");
|
|
495
|
-
if (!missingTags.length) return;
|
|
496
|
-
controller.enqueue(encoder.encode(`<html id="__next_error__">
|
|
497
|
-
<template
|
|
498
|
-
data-next-error-message="Missing ${missingTags.map((c) => `<${c}>`).join(missingTags.length > 1 ? " and " : "")} tags in the root layout.\nRead more at https://nextjs.org/docs/messages/missing-root-layout-tags"
|
|
499
|
-
data-next-error-digest="${_constants1.MISSING_ROOT_TAGS_ERROR}"
|
|
500
|
-
data-next-error-stack=""
|
|
501
|
-
></template>
|
|
502
|
-
`));
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
function chainTransformers(readable, transformers) {
|
|
507
|
-
let stream = readable;
|
|
508
|
-
for (const transformer of transformers) {
|
|
509
|
-
if (!transformer) continue;
|
|
510
|
-
stream = stream.pipeThrough(transformer);
|
|
511
|
-
}
|
|
512
|
-
return stream;
|
|
513
|
-
}
|
|
514
|
-
async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isStaticGeneration, deploymentId, getServerInsertedHTML, getServerInsertedMetadata, validateRootLayout }) {
|
|
515
|
-
const suffixUnclosed = suffix ? suffix.split(CLOSE_TAG, 1)[0] : null;
|
|
516
|
-
if (isStaticGeneration) await renderStream.allReady;
|
|
517
|
-
else await (0, _scheduler.waitAtLeastOneReactRenderTask)();
|
|
518
|
-
return chainTransformers(renderStream, [
|
|
519
|
-
createBufferedTransformStream(),
|
|
520
|
-
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
521
|
-
createMetadataTransformStream(getServerInsertedMetadata),
|
|
522
|
-
suffixUnclosed != null && suffixUnclosed.length > 0 ? createDeferredSuffixStream(suffixUnclosed) : null,
|
|
523
|
-
inlinedDataStream ? createFlightDataInjectionTransformStream(inlinedDataStream, true) : null,
|
|
524
|
-
validateRootLayout ? createRootLayoutValidatorStream() : null,
|
|
525
|
-
createMoveSuffixStream(),
|
|
526
|
-
createHeadInsertionTransformStream(getServerInsertedHTML)
|
|
527
|
-
]);
|
|
528
|
-
}
|
|
529
|
-
async function continueDynamicPrerender(prerenderStream, { getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
530
|
-
return chainTransformers(prerenderStream, [
|
|
531
|
-
createBufferedTransformStream(),
|
|
532
|
-
createStripDocumentClosingTagsTransform(),
|
|
533
|
-
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
534
|
-
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
535
|
-
createMetadataTransformStream(getServerInsertedMetadata)
|
|
536
|
-
]);
|
|
537
|
-
}
|
|
538
|
-
async function continueStaticPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
539
|
-
return chainTransformers(prerenderStream, [
|
|
540
|
-
createBufferedTransformStream(),
|
|
541
|
-
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
542
|
-
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
543
|
-
createMetadataTransformStream(getServerInsertedMetadata),
|
|
544
|
-
createFlightDataInjectionTransformStream(inlinedDataStream, true),
|
|
545
|
-
createMoveSuffixStream()
|
|
546
|
-
]);
|
|
547
|
-
}
|
|
548
|
-
async function continueStaticFallbackPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
549
|
-
return chainTransformers(prerenderStream, [
|
|
550
|
-
createBufferedTransformStream(),
|
|
551
|
-
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
552
|
-
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
553
|
-
createClientResumeScriptInsertionTransformStream(),
|
|
554
|
-
createMetadataTransformStream(getServerInsertedMetadata),
|
|
555
|
-
createFlightDataInjectionTransformStream(inlinedDataStream, true),
|
|
556
|
-
createMoveSuffixStream()
|
|
557
|
-
]);
|
|
558
|
-
}
|
|
559
|
-
async function continueDynamicHTMLResume(renderStream, { delayDataUntilFirstHtmlChunk, inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
560
|
-
return chainTransformers(renderStream, [
|
|
561
|
-
createBufferedTransformStream(),
|
|
562
|
-
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
563
|
-
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
564
|
-
createMetadataTransformStream(getServerInsertedMetadata),
|
|
565
|
-
createFlightDataInjectionTransformStream(inlinedDataStream, delayDataUntilFirstHtmlChunk),
|
|
566
|
-
createMoveSuffixStream()
|
|
567
|
-
]);
|
|
568
|
-
}
|
|
569
|
-
function createDocumentClosingStream() {
|
|
570
|
-
return streamFromString(CLOSE_TAG);
|
|
571
|
-
}
|
|
572
|
-
function createRuntimePrefetchTransformStream(sentinel, isPartial, staleTime) {
|
|
573
|
-
const enc = new TextEncoder();
|
|
574
|
-
const search = enc.encode(`[${sentinel}]`);
|
|
575
|
-
const first = search[0];
|
|
576
|
-
const replace = enc.encode(`[${isPartial},${staleTime}]`);
|
|
577
|
-
const searchLen = search.length;
|
|
578
|
-
let currentChunk = null;
|
|
579
|
-
let found = false;
|
|
580
|
-
function processChunk(controller, nextChunk) {
|
|
581
|
-
if (found) {
|
|
582
|
-
if (nextChunk) controller.enqueue(nextChunk);
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
if (currentChunk) {
|
|
586
|
-
let exclusiveUpperBound = currentChunk.length - (searchLen - 1);
|
|
587
|
-
if (nextChunk) exclusiveUpperBound += Math.min(nextChunk.length, searchLen - 1);
|
|
588
|
-
if (exclusiveUpperBound < 1) {
|
|
589
|
-
controller.enqueue(currentChunk);
|
|
590
|
-
currentChunk = nextChunk;
|
|
591
|
-
return;
|
|
592
|
-
}
|
|
593
|
-
let currentIndex = currentChunk.indexOf(first);
|
|
594
|
-
candidateLoop: while (-1 < currentIndex && currentIndex < exclusiveUpperBound) {
|
|
595
|
-
let matchIndex = 1;
|
|
596
|
-
while (matchIndex < searchLen) {
|
|
597
|
-
const candidateIndex = currentIndex + matchIndex;
|
|
598
|
-
if ((candidateIndex < currentChunk.length ? currentChunk[candidateIndex] : nextChunk[candidateIndex - currentChunk.length]) !== search[matchIndex]) {
|
|
599
|
-
currentIndex = currentChunk.indexOf(first, currentIndex + 1);
|
|
600
|
-
continue candidateLoop;
|
|
601
|
-
}
|
|
602
|
-
matchIndex++;
|
|
603
|
-
}
|
|
604
|
-
found = true;
|
|
605
|
-
controller.enqueue(currentChunk.subarray(0, currentIndex));
|
|
606
|
-
controller.enqueue(replace);
|
|
607
|
-
if (currentIndex + searchLen < currentChunk.length) controller.enqueue(currentChunk.slice(currentIndex + searchLen));
|
|
608
|
-
if (nextChunk) {
|
|
609
|
-
const overflowBytes = currentIndex + searchLen - currentChunk.length;
|
|
610
|
-
const truncatedChunk = overflowBytes > 0 ? nextChunk.subarray(overflowBytes) : nextChunk;
|
|
611
|
-
controller.enqueue(truncatedChunk);
|
|
612
|
-
}
|
|
613
|
-
currentChunk = null;
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
controller.enqueue(currentChunk);
|
|
617
|
-
}
|
|
618
|
-
currentChunk = nextChunk;
|
|
619
|
-
}
|
|
620
|
-
return new TransformStream({
|
|
621
|
-
transform(chunk, controller) {
|
|
622
|
-
processChunk(controller, chunk);
|
|
623
|
-
},
|
|
624
|
-
flush(controller) {
|
|
625
|
-
processChunk(controller, null);
|
|
626
|
-
}
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
|
-
}) });
|
|
630
|
-
|
|
631
|
-
//#endregion
|
|
632
|
-
export default require_node_web_streams_helper();
|
|
633
|
-
|
|
634
|
-
export { require_node_web_streams_helper };
|
|
635
|
-
//# sourceMappingURL=node-web-streams-helper.js.map
|