diff --git a/.socket/blob/007cd9ac47a59960f81f934f4e221462011ff581d941f8287865e8059e2bfb41 b/.socket/blob/007cd9ac47a59960f81f934f4e221462011ff581d941f8287865e8059e2bfb41 new file mode 100644 index 0000000..67cec9b --- /dev/null +++ b/.socket/blob/007cd9ac47a59960f81f934f4e221462011ff581d941f8287865e8059e2bfb41 @@ -0,0 +1,3096 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-webpack-server.edge.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 strict"; +var ReactDOM = require("react-dom"), + React = require("react"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); +Symbol.for("react.postpone"); +var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; +} +var ASYNC_ITERATOR = Symbol.asyncIterator; +function handleErrorInNextTick(error) { + setTimeout(function () { + throw error; + }); +} +var LocalPromise = Promise, + scheduleMicrotask = + "function" === typeof queueMicrotask + ? queueMicrotask + : function (callback) { + LocalPromise.resolve(null) + .then(callback) + .catch(handleErrorInNextTick); + }, + currentView = null, + writtenBytes = 0; +function writeChunkAndReturn(destination, chunk) { + if (0 !== chunk.byteLength) + if (4096 < chunk.byteLength) + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + destination.enqueue(chunk); + else { + var allowableBytes = currentView.length - writtenBytes; + allowableBytes < chunk.byteLength && + (0 === allowableBytes + ? destination.enqueue(currentView) + : (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes), + destination.enqueue(currentView), + (chunk = chunk.subarray(allowableBytes))), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)); + currentView.set(chunk, writtenBytes); + writtenBytes += chunk.byteLength; + } + return !0; +} +var textEncoder = new TextEncoder(); +function stringToChunk(content) { + return textEncoder.encode(content); +} +function byteLengthOfChunk(chunk) { + return chunk.byteLength; +} +function closeWithError(destination, error) { + "function" === typeof destination.error + ? destination.error(error) + : destination.close(); +} +var CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"); +function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); +} +var FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice; +function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; +} +var PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }; +function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl({}, target.$$id, !0), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; +} +var proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; +ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: prefetchDNS, + C: preconnect, + L: preload, + m: preloadModule$1, + X: preinitScript, + S: preinitStyle, + M: preinitModuleScript +}; +function prefetchDNS(href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } +} +function preconnect(href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "C|" + (null == crossOrigin ? "null" : crossOrigin) + "|" + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } +} +function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } +} +function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } +} +function preinitStyle(href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } +} +function preinitScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } +} +function preinitModuleScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } +} +function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } +} +var supportsRequestStorage = "function" === typeof AsyncLocalStorage, + requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null, + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }; +function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; +} +function noop() {} +var SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." +); +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; +} +var currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null; +function getThenableStateAfterSuspending() { + var state = thenableState || []; + thenableState = null; + return state; +} +var HooksDispatcher = { + readContext: unsupportedContext, + use: use, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: useId, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } +}; +HooksDispatcher.useEffectEvent = unsupportedHook; +function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); +} +function unsupportedRefresh() { + throw Error("Refreshing the cache is not supported in Server Components."); +} +function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); +} +function useId() { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return "_" + currentRequest$1.identifierPrefix + "S_" + id.toString(32) + "_"; +} +function use(usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (usable.$$typeof === CLIENT_REFERENCE_TAG$1) { + if (null != usable.value && usable.value.$$typeof === REACT_CONTEXT_TYPE) + throw Error("Cannot read a Client Context from a Server Component."); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error("An unsupported type was passed to use(): " + String(usable)); +} +var DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var JSCompiler_inline_result = (JSCompiler_inline_result = + resolveRequest()) + ? JSCompiler_inline_result.cache + : new Map(); + var entry = JSCompiler_inline_result.get(resourceType); + void 0 === entry && + ((entry = resourceType()), + JSCompiler_inline_result.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }, + ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); +var isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf; +function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); +} +function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } +} +function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; +} +var CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); +function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + objKind = -1; + var length = 0; + if (isArrayImpl(objectOrArray)) { + var str = "["; + for (var i = 0; i < objectOrArray.length; i++) { + 0 < i && (str += ", "); + var value = objectOrArray[i]; + value = + "object" === typeof value && null !== value + ? describeObjectForErrorMessage(value) + : describeValueForErrorMessage(value); + "" + i === expandedName + ? ((objKind = str.length), (length = value.length), (str += value)) + : (str = + 10 > value.length && 40 > str.length + value.length + ? str + value + : str + "..."); + } + str += "]"; + } else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + str = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + str = "{"; + i = Object.keys(objectOrArray); + for (value = 0; value < i.length; value++) { + 0 < value && (str += ", "); + var name = i[value], + encodedKey = JSON.stringify(name); + str += ('"' + name + '"' === encodedKey ? name : encodedKey) + ": "; + encodedKey = objectOrArray[name]; + encodedKey = + "object" === typeof encodedKey && null !== encodedKey + ? describeObjectForErrorMessage(encodedKey) + : describeValueForErrorMessage(encodedKey); + name === expandedName + ? ((objKind = str.length), + (length = encodedKey.length), + (str += encodedKey)) + : (str = + 10 > encodedKey.length && 40 > str.length + encodedKey.length + ? str + encodedKey + : str + "..."); + } + str += "}"; + } + return void 0 === expandedName + ? str + : -1 < objKind && 0 < length + ? ((objectOrArray = " ".repeat(objKind) + "^".repeat(length)), + "\n " + str + "\n " + objectOrArray) + : "\n " + str; +} +var hasOwnProperty = Object.prototype.hasOwnProperty, + ObjectPrototype = Object.prototype, + stringify = JSON.stringify; +function defaultErrorHandler(error) { + console.error(error); +} +function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences +) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error("Currently React only supports one RSC renderer at a time."); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + var abortSet = new Set(), + pingedTasks = [], + hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = []; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = void 0 === onPostpone ? noop : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + type = createTask(this, model, null, !1, 0, abortSet); + pingedTasks.push(type); +} +var currentRequest = null; +function resolveRequest() { + if (currentRequest) return currentRequest; + if (supportsRequestStorage) { + var store = requestStorage.getStore(); + if (store) return store; + } + return null; +} +function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + switch (thenable.status) { + case "fulfilled": + return ( + (newTask.model = thenable.value), pingTask(request, newTask), newTask.id + ); + case "rejected": + return erroredTask(request, newTask, thenable.reason), newTask.id; + default: + if (12 === request.status) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + (erroredTask(request, newTask, reason), enqueueFlush(request)); + } + ); + return newTask.id; +} +function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(stringToChunk(entry)), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$8) { + error(x$8); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener("abort", abortStream), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); +} +function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModelWithFormatContext( + request, + entry.value, + 0 + ); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(stringToChunk(endStreamRow)); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + iterator.next().then(progress, error); + } catch (x$9) { + error(x$9); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + iterable = iterable === iterator; + var streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (iterable ? "x" : "X") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortIterable); + iterator.next().then(progress, error); + return serializeByValueID(streamTask.id); +} +function emitHint(request, code, model) { + model = stringify(model); + code = stringToChunk(":H" + code + model + "\n"); + request.completedHintChunks.push(code); + enqueueFlush(request); +} +function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; +} +function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return wakeable.value; + case "rejected": + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { $$typeof: REACT_LAZY_TYPE, _payload: wakeable, _init: readThenable }; +} +function voidHandler() {} +function processServerComponentReturnValue(request, task, Component, result) { + if ( + "object" !== typeof result || + null === result || + result.$$typeof === CLIENT_REFERENCE_TAG$1 + ) + return result; + if ("function" === typeof result.then) + return createLazyWrapperAroundWakeable(request, task, result); + var iteratorFn = getIteratorFn(result); + return iteratorFn + ? ((request = {}), + (request[Symbol.iterator] = function () { + return iteratorFn.call(result); + }), + request) + : "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((request = {}), + (request[ASYNC_ITERATOR] = function () { + return result[ASYNC_ITERATOR](); + }), + request); +} +function renderFunctionComponent(request, task, key, Component, props) { + var prevThenableState = task.thenableState; + task.thenableState = null; + thenableIndexCounter = 0; + thenableState = prevThenableState; + props = Component(props, void 0); + if (12 === request.status) + throw ( + ("object" === typeof props && + null !== props && + "function" === typeof props.then && + props.$$typeof !== CLIENT_REFERENCE_TAG$1 && + props.then(voidHandler, voidHandler), + null) + ); + props = processServerComponentReturnValue(request, task, Component, props); + Component = task.keyPath; + prevThenableState = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = prevThenableState; + return request; +} +function renderFragment(request, task, children) { + return null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children } + ]), + task.implicitSlot ? [request] : request) + : children; +} +var serializedSize = 0; +function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + pingTask(request, task); + return serializeLazyID(task.id); +} +function renderElement(request, task, type, key, ref, props) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + if ( + "function" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 && + type.$$typeof !== TEMPORARY_REFERENCE_TAG + ) + return renderFunctionComponent(request, task, key, type, props); + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + (type = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (props = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = type), + props + ); + if ( + null != type && + "object" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + var init = type._init; + type = init(type._payload); + if (12 === request.status) throw null; + return renderElement(request, task, type, key, ref, props); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent(request, task, key, type.render, props); + case REACT_MEMO_TYPE: + return renderElement(request, task, type.type, key, ref, props); + } + else + "string" === typeof type && + ((ref = task.formatContext), + (init = getChildFormatContext(ref, type, props)), + ref !== init && + null != props.children && + outlineModelWithFormatContext(request, props.children, init)); + request = key; + key = task.keyPath; + null === request + ? (request = key) + : null !== key && (request = key + "," + request); + props = [REACT_ELEMENT_TYPE, type, request, props]; + task = task.implicitSlot && null !== request ? [props] : props; + return task; +} +function pingTask(request, task) { + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : setTimeout(function () { + return performWork(request); + }, 0)); +} +function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet +) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + serializedSize += parentPropertyName.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + var JSCompiler_inline_result = renderModelDestructive( + request, + task, + this, + parentPropertyName, + value + ); + } catch (thrownValue) { + if ( + ((parentPropertyName = task.model), + (parentPropertyName = + "object" === typeof parentPropertyName && + null !== parentPropertyName && + (parentPropertyName.$$typeof === REACT_ELEMENT_TYPE || + parentPropertyName.$$typeof === REACT_LAZY_TYPE)), + 12 === request.status) + ) + (task.status = 3), + 21 === request.type + ? ((prevKeyPath = request.nextChunkId++), + (prevKeyPath = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)), + (JSCompiler_inline_result = prevKeyPath)) + : ((prevKeyPath = request.fatalError), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath))); + else if ( + ((value = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue), + "object" === typeof value && + null !== value && + "function" === typeof value.then) + ) { + JSCompiler_inline_result = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + var ping = JSCompiler_inline_result.ping; + value.then(ping, ping); + JSCompiler_inline_result.thenableState = + getThenableStateAfterSuspending(); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(JSCompiler_inline_result.id) + : serializeByValueID(JSCompiler_inline_result.id); + } else + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + request.pendingChunks++, + (prevKeyPath = request.nextChunkId++), + (prevImplicitSlot = logRecoverableError(request, value, task)), + emitErrorChunk(request, prevKeyPath, prevImplicitSlot), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)); + } + return JSCompiler_inline_result; + }, + thenableState: null + }; + abortSet.add(task); + return task; +} +function serializeByValueID(id) { + return "$" + id.toString(16); +} +function serializeLazyID(id) { + return "$L" + id.toString(16); +} +function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + id = id.toString(16) + ":" + request + "\n"; + return stringToChunk(id); +} +function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference +) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var config = request.bundlerConfig, + modulePath = clientReference.$$id; + existingId = ""; + var resolvedModuleData = config[modulePath]; + if (resolvedModuleData) existingId = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((existingId = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + var JSCompiler_inline_result = + !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, existingId, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, existingId]; + request.pendingChunks++; + var importId = request.nextChunkId++, + json = stringify(JSCompiler_inline_result), + row = importId.toString(16) + ":I" + json + "\n", + processedChunk = stringToChunk(row); + request.completedImportChunks.push(processedChunk); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName), + serializeByValueID(parent) + ); + } +} +function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks + ); + retryTask(request, value); + return value.id; +} +function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); +} +function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener("abort", abortBlob), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener("abort", abortBlob), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask(request, model, null, !1, 0, request.abortableTasks), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); +} +var modelRoot = !1; +function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value +) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var existingReference = writtenObjects.get(value); + if (void 0 !== existingReference) + if (modelRoot === value) modelRoot = null; + else return existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((parent = writtenObjects.get(parent)), + void 0 !== parent && + ((elementReference = parent + ":" + parentPropertyName), + writtenObjects.set(value, elementReference))); + } + if (3200 < serializedSize) return deferTask(request, task); + parentPropertyName = value.props; + parent = parentPropertyName.ref; + request = renderElement( + request, + task, + value.type, + value.key, + void 0 !== parent ? parent : null, + parentPropertyName + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (writtenObjects.has(request) || + writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (3200 < serializedSize) return deferTask(request, task); + task.thenableState = null; + parentPropertyName = value._init; + value = parentPropertyName(value._payload); + if (12 === request.status) throw null; + return renderModelDestructive(request, task, emptyRoot, "", value); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = request.writtenObjects; + writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return "$@" + serializeThenable(request, task, value).toString(16); + if (modelRoot === value) modelRoot = null; + else return writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== writtenObjects) + if (modelRoot === value) { + if (writtenObjects !== serializeByValueID(task.id)) + return writtenObjects; + modelRoot = null; + } else return writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((writtenObjects = elementReference.get(parent)), + void 0 !== writtenObjects) + ) { + existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + existingReference = "type"; + break; + case "2": + existingReference = "key"; + break; + case "3": + existingReference = "props"; + break; + case "4": + existingReference = "_owner"; + } + elementReference.set(value, writtenObjects + ":" + existingReference); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) + return ( + (value = Array.from(value)), + "$Q" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Set) + return ( + (value = Array.from(value)), + "$W" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Error) return "$Z"; + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (parentPropertyName = elementReference.call(value)), + parentPropertyName === value + ? ((value = Array.from(parentPropertyName)), + "$i" + + outlineModelWithFormatContext(request, value, 0).toString(16)) + : renderFragment(request, task, Array.from(parentPropertyName)) + ); + if ("function" === typeof ReadableStream && value instanceof ReadableStream) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return ( + null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: value } + ]), + (request = task.implicitSlot ? [request] : request)) + : ((parentPropertyName = elementReference.call(value)), + (request = serializeAsyncIterable( + request, + task, + value, + parentPropertyName + ))), + request + ); + if (value instanceof Date) return "$D" + value.toJSON(); + request = getPrototypeOf(value); + if ( + request !== ObjectPrototype && + (null === request || null !== getPrototypeOf(request)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + return value; + } + if ("string" === typeof value) { + serializedSize += value.length; + if ( + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ) + return "$D" + value; + if (1024 <= value.length && null !== byteLengthOfChunk) + return ( + request.pendingChunks++, + (task = request.nextChunkId++), + emitTextChunk(request, task, value, !1), + serializeByValueID(task) + ); + request = "$" === value[0] ? "$" + value : value; + return request; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) + return Number.isFinite(value) + ? 0 === value && -Infinity === 1 / value + ? "$-0" + : value + : Infinity === value + ? "$Infinity" + : -Infinity === value + ? "$-Infinity" + : "$NaN"; + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return ( + (task = request.writtenServerReferences), + (parentPropertyName = task.get(value)), + void 0 !== parentPropertyName + ? (request = "$F" + parentPropertyName.toString(16)) + : ((parentPropertyName = value.$$bound), + (parentPropertyName = + null === parentPropertyName + ? null + : Promise.resolve(parentPropertyName)), + (request = outlineModelWithFormatContext( + request, + { id: value.$$id, bound: parentPropertyName }, + 0 + )), + task.set(value, request), + (request = "$F" + request.toString(16))), + request + ); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), void 0 !== request) + ) + return "$T" + request; + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + parentPropertyName = request.nextChunkId++; + parent = encodeReferenceChunk( + request, + parentPropertyName, + "$S" + elementReference + ); + request.completedImportChunks.push(parent); + task.set(value, parentPropertyName); + return serializeByValueID(parentPropertyName); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); +} +function logRecoverableError(request, error) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onError = request.onError; + var errorDigest = supportsRequestStorage + ? requestStorage.run(void 0, onError, error) + : onError(error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; +} +function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + null !== request.destination + ? ((request.status = 14), closeWithError(request.destination, error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); +} +function emitErrorChunk(request, id, digest) { + digest = { digest: digest }; + id = id.toString(16) + ":E" + stringify(digest) + "\n"; + id = stringToChunk(id); + request.completedErrorChunks.push(id); +} +function emitModelChunk(request, id, json) { + id = id.toString(16) + ":" + json + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); +} +function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + typedArray = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + debug = typedArray.byteLength; + id = id.toString(16) + ":" + tag + debug.toString(16) + ","; + id = stringToChunk(id); + request.completedRegularChunks.push(id, typedArray); +} +function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + text = stringToChunk(text); + debug = text.byteLength; + id = id.toString(16) + ":T" + debug.toString(16) + ","; + id = stringToChunk(id); + request.completedRegularChunks.push(id, text); +} +function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? emitTextChunk(request, id, value, !1) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk(request, id, "m", value, !1) + : value instanceof DataView + ? emitTypedArrayChunk(request, id, "V", value, !1) + : ((value = stringify(value, task.toJSON)), + emitModelChunk(request, task.id, value)); +} +function erroredTask(request, task, error) { + task.status = 4; + error = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, error); + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); +} +var emptyRoot = {}; +function retryTask(request, task) { + if (0 === task.status) { + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set(resolvedModel, serializeByValueID(task.id)), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel); + emitModelChunk(request, task.id, json); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (12 === request.status) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + serializedSize = parentSerializedSize; + } + } +} +function tryStreamTask(request, task) { + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + serializedSize = parentSerializedSize; + } +} +function performWork(request) { + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } +} +function abortTask(task) { + 0 === task.status && (task.status = 3); +} +function finishAbortedTask(task, request, errorId) { + 3 === task.status && + ((errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); +} +function haltTask(task) { + 0 === task.status && (task.status = 3); +} +function finishHaltedTask(task, request) { + 3 === task.status && request.pendingChunks--; +} +function flushCompletedChunks(request) { + var destination = request.destination; + if (null !== destination) { + currentView = new Uint8Array(4096); + writtenBytes = 0; + try { + for ( + var importsChunks = request.completedImportChunks, i = 0; + i < importsChunks.length; + i++ + ) + request.pendingChunks--, + writeChunkAndReturn(destination, importsChunks[i]); + importsChunks.splice(0, i); + var hintChunks = request.completedHintChunks; + for (i = 0; i < hintChunks.length; i++) + writeChunkAndReturn(destination, hintChunks[i]); + hintChunks.splice(0, i); + var regularChunks = request.completedRegularChunks; + for (i = 0; i < regularChunks.length; i++) + request.pendingChunks--, + writeChunkAndReturn(destination, regularChunks[i]); + regularChunks.splice(0, i); + var errorChunks = request.completedErrorChunks; + for (i = 0; i < errorChunks.length; i++) + request.pendingChunks--, + writeChunkAndReturn(destination, errorChunks[i]); + errorChunks.splice(0, i); + } finally { + (request.flushScheduled = !1), + currentView && + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = null), + (writtenBytes = 0)); + } + } + 0 === request.pendingChunks && + (12 > request.status && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = 14), + request.destination.close(), + (request.destination = null))); +} +function startWork(request) { + request.flushScheduled = null !== request.destination; + supportsRequestStorage + ? scheduleMicrotask(function () { + requestStorage.run(request, performWork, request); + }) + : scheduleMicrotask(function () { + return performWork(request); + }); + setTimeout(function () { + 10 === request.status && (request.status = 11); + }, 0); +} +function enqueueFlush(request) { + !1 === request.flushScheduled && + 0 === request.pingedTasks.length && + null !== request.destination && + ((request.flushScheduled = !0), + setTimeout(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + }, 0)); +} +function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); +} +function startFlowing(request, destination) { + if (13 === request.status) + (request.status = 14), closeWithError(destination, request.fatalError); + else if (14 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} +function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = 12; + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + setTimeout(function () { + return finishHalt(request, abortableTasks); + }, 0); + else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + errorId = request.nextChunkId++; + request.fatalError = errorId; + request.pendingChunks++; + emitErrorChunk(request, errorId, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId); + }); + setTimeout(function () { + return finishAbort(request, abortableTasks, errorId); + }, 0); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$23) { + logRecoverableError(request, error$23, null), + fatalError(request, error$23); + } +} +function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; +} +var chunkCache = new Map(); +function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; +} +function ignoreReject() {} +function preloadModule(metadata) { + for (var chunks = metadata[1], promises = [], i = 0; i < chunks.length; ) { + var chunkId = chunks[i++]; + chunks[i++]; + var entry = chunkCache.get(chunkId); + if (void 0 === entry) { + entry = __webpack_chunk_load__(chunkId); + promises.push(entry); + var resolve = chunkCache.set.bind(chunkCache, chunkId, null); + entry.then(resolve, ignoreReject); + chunkCache.set(chunkId, entry); + } else null !== entry && promises.push(entry); + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; +} +function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); +} +function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; +} +Chunk.prototype = Object.create(Promise.prototype); +Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), this.reason.push(reject)); + break; + default: + reject(this.reason); + } +}; +function createPendingChunk(response) { + return new Chunk("pending", null, null, response); +} +function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); +} +function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } +} +function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } +} +function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1, + response + ); +} +function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1 + ); +} +function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key +) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; +} +function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString(response, parentObj, parentKey, value, reference); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel(response, value, i, value[i], parentObj)), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; +} +var initializingChunk = null, + initializingChunkBlockedModel = null; +function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } +} +function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); +} +function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; +} +function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path +) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && null === blocked.value && (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; +} +function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; +} +function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } +} +function createMap(response, model) { + return new Map(model); +} +function createSet(response, model) { + return new Set(model); +} +function extractIterator(response, model) { + return model[Symbol.iterator](); +} +function createModel(response, model) { + return model; +} +function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey +) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; +} +function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close("C" === chunks ? '"$undefined"' : chunks.slice(1)) + : controller.enqueueModel(chunks); +} +function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var chunk$26 = createPendingChunk(response); + chunk$26.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = chunk$26; + chunk.then(function () { + previousBlockedChunk === chunk$26 && (previousBlockedChunk = null); + resolveModelChunk(chunk$26, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; +} +function asyncIterator() { + return this; +} +function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; +} +function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + $jscomp$compprop2 = {}; + $jscomp$compprop2 = + (($jscomp$compprop2[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }), + $jscomp$compprop2); + iterator = iterator ? $jscomp$compprop2[ASYNC_ITERATOR]() : $jscomp$compprop2; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; +} +function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return (obj = parseInt(value.slice(2), 16)), getChunk(response, obj); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel(response, value, obj, key, createModel)), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if (void 0 === reference || void 0 === response._temporaryReferences) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray(response, value, Uint8ClampedArray, 1, obj, key); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray(response, value, BigUint64Array, 8, obj, key); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; +} +function createResponse(bundlerConfig, formFieldPrefix, temporaryReferences) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; +} +function close(response) { + reportGlobalError(response, Error("Connection closed.")); +} +function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); +} +function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; +} +exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); +}; +exports.createTemporaryReferenceSet = function () { + return new WeakMap(); +}; +exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference(serverManifest, value.id, value.bound))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); +}; +exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); +}; +exports.decodeReply = function (body, webpackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + webpackMap = getChunk(body, 0); + close(body); + return webpackMap; +}; +exports.decodeReplyFromAsyncIterable = function ( + iterable, + webpackMap, + options +) { + function progress(entry) { + if (entry.done) close(response); + else { + entry = entry.value; + var name = entry[0]; + entry = entry[1]; + if ("string" === typeof entry) { + response._formData.append(name, entry); + var prefix = response._prefix; + if (name.startsWith(prefix)) { + var chunks = response._chunks; + name = +name.slice(prefix.length); + (chunks = chunks.get(name)) && resolveModelChunk(chunks, entry, name); + } + } else response._formData.append(name, entry); + iterator.next().then(progress, error); + } + } + function error(reason) { + reportGlobalError(response, reason); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + var iterator = iterable[ASYNC_ITERATOR](), + response = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0 + ); + iterator.next().then(progress, error); + return getChunk(response, 0); +}; +exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + 21, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; +exports.registerClientReference = function ( + proxyImplementation, + id, + exportName +) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); +}; +exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); +}; +exports.renderToReadableStream = function (model, webpackMap, options) { + var request = new RequestInstance( + 20, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + noop, + noop, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + return new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); +}; diff --git a/.socket/blob/00913293de95209144b392bf55f9cfd12e0fc0e3eb88e45b7af7ca1a502307f2 b/.socket/blob/00913293de95209144b392bf55f9cfd12e0fc0e3eb88e45b7af7ca1a502307f2 new file mode 100644 index 0000000..41e630d --- /dev/null +++ b/.socket/blob/00913293de95209144b392bf55f9cfd12e0fc0e3eb88e45b7af7ca1a502307f2 @@ -0,0 +1,5452 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-webpack-server.browser.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function voidHandler() {} + function _defineProperty(obj, key, value) { + a: if ("object" == typeof key && key) { + var e = key[Symbol.toPrimitive]; + if (void 0 !== e) { + key = e.call(key, "string"); + if ("object" != typeof key) break a; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + key = String(key); + } + key = "symbol" == typeof key ? key : key + ""; + key in obj + ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) + : (obj[key] = value); + return obj; + } + function scheduleWork(callback) { + taskQueue.push(callback); + channel.port2.postMessage(null); + } + function handleErrorInNextTick(error) { + setTimeout(function () { + throw error; + }); + } + function writeChunkAndReturn(destination, chunk) { + if (0 !== chunk.byteLength) + if (2048 < chunk.byteLength) + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = new Uint8Array(2048)), + (writtenBytes = 0)), + destination.enqueue(chunk); + else { + var allowableBytes = currentView.length - writtenBytes; + allowableBytes < chunk.byteLength && + (0 === allowableBytes + ? destination.enqueue(currentView) + : (currentView.set( + chunk.subarray(0, allowableBytes), + writtenBytes + ), + destination.enqueue(currentView), + (chunk = chunk.subarray(allowableBytes))), + (currentView = new Uint8Array(2048)), + (writtenBytes = 0)); + currentView.set(chunk, writtenBytes); + writtenBytes += chunk.byteLength; + } + return !0; + } + function completeWriting(destination) { + currentView && + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = null), + (writtenBytes = 0)); + } + function stringToChunk(content) { + return textEncoder.encode(content); + } + function byteLengthOfChunk(chunk) { + return chunk.byteLength; + } + function closeWithError(destination, error) { + "function" === typeof destination.error + ? destination.error(error) + : destination.close(); + } + function isClientReference(reference) { + return reference.$$typeof === CLIENT_REFERENCE_TAG$1; + } + function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); + } + function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + null != arguments[0] && + console.error( + 'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().' + ); + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + $$location: { value: this.$$location, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; + } + function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl( + {}, + target.$$id, + !0 + ), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; + } + function resolveClientReferenceMetadata(config, clientReference) { + var modulePath = clientReference.$$id, + name = "", + resolvedModuleData = config[modulePath]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((name = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + return !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } + } + function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } + } + function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; + } + function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } + } + function collectStackTracePrivate(error, structuredStackTrace) { + error = []; + for (var i = framesToSkip; i < structuredStackTrace.length; i++) { + var callSite = structuredStackTrace[i], + name = callSite.getFunctionName() || ""; + if (name.includes("react_stack_bottom_frame")) break; + else if (callSite.isNative()) + (callSite = callSite.isAsync()), + error.push([name, "", 0, 0, 0, 0, callSite]); + else { + if (callSite.isConstructor()) name = "new " + name; + else if (!callSite.isToplevel()) { + var callSite$jscomp$0 = callSite; + name = callSite$jscomp$0.getTypeName(); + var methodName = callSite$jscomp$0.getMethodName(); + callSite$jscomp$0 = callSite$jscomp$0.getFunctionName(); + var result = ""; + callSite$jscomp$0 + ? (name && + identifierRegExp.test(callSite$jscomp$0) && + callSite$jscomp$0 !== name && + (result += name + "."), + (result += callSite$jscomp$0), + !methodName || + callSite$jscomp$0 === methodName || + callSite$jscomp$0.endsWith("." + methodName) || + callSite$jscomp$0.endsWith(" " + methodName) || + (result += " [as " + methodName + "]")) + : (name && (result += name + "."), + (result = methodName + ? result + methodName + : result + "")); + name = result; + } + "" === name && (name = ""); + methodName = callSite.getScriptNameOrSourceURL() || ""; + "" === methodName && + ((methodName = ""), + callSite.isEval() && + (callSite$jscomp$0 = callSite.getEvalOrigin()) && + (methodName = callSite$jscomp$0.toString() + ", ")); + callSite$jscomp$0 = callSite.getLineNumber() || 0; + result = callSite.getColumnNumber() || 0; + var enclosingLine = + "function" === typeof callSite.getEnclosingLineNumber + ? callSite.getEnclosingLineNumber() || 0 + : 0, + enclosingCol = + "function" === typeof callSite.getEnclosingColumnNumber + ? callSite.getEnclosingColumnNumber() || 0 + : 0; + callSite = callSite.isAsync(); + error.push([ + name, + methodName, + callSite$jscomp$0, + result, + enclosingLine, + enclosingCol, + callSite + ]); + } + } + collectedStackTrace = error; + return ""; + } + function collectStackTrace(error, structuredStackTrace) { + collectStackTracePrivate(error, structuredStackTrace); + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function parseStackTrace(error, skipFrames) { + var existing = stackTraceCache.get(error); + if (void 0 !== existing) return existing; + collectedStackTrace = null; + framesToSkip = skipFrames; + existing = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTrace; + try { + var stack = String(error.stack); + } finally { + Error.prepareStackTrace = existing; + } + if (null !== collectedStackTrace) + return ( + (stack = collectedStackTrace), + (collectedStackTrace = null), + stackTraceCache.set(error, stack), + stack + ); + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + existing = stack.indexOf("react_stack_bottom_frame"); + -1 !== existing && (existing = stack.lastIndexOf("\n", existing)); + -1 !== existing && (stack = stack.slice(0, existing)); + stack = stack.split("\n"); + for (existing = []; skipFrames < stack.length; skipFrames++) { + var parsed = frameRegExp.exec(stack[skipFrames]); + if (parsed) { + var name = parsed[1] || "", + isAsync = "async " === parsed[8]; + "" === name + ? (name = "") + : name.startsWith("async ") && + ((name = name.slice(5)), (isAsync = !0)); + var filename = parsed[2] || parsed[5] || ""; + "" === filename && (filename = ""); + existing.push([ + name, + filename, + +(parsed[3] || parsed[6]), + +(parsed[4] || parsed[7]), + 0, + 0, + isAsync + ]); + } + } + stackTraceCache.set(error, existing); + return existing; + } + function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? (thenableState.push(thenable), + (thenableState._stacks || (thenableState._stacks = [])).push(Error())) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; + } + function getThenableStateAfterSuspending() { + var state = thenableState || []; + state._componentDebugInfo = currentComponentDebugInfo; + thenableState = currentComponentDebugInfo = null; + return state; + } + function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); + } + function unsupportedRefresh() { + throw Error( + "Refreshing the cache is not supported in Server Components." + ); + } + function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); + } + function resolveOwner() { + return currentOwner ? currentOwner : null; + } + function resetOwnerStackLimit() { + var now = getCurrentTime(); + 1e3 < now - lastResetTime && + ((ReactSharedInternalsServer.recentlyCreatedOwnerStacks = 0), + (lastResetTime = now)); + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isGetter(object, name) { + if (object === Object.prototype || null === object) return !1; + var descriptor = Object.getOwnPropertyDescriptor(object, name); + return void 0 === descriptor + ? isGetter(getPrototypeOf(object), name) + : "function" === typeof descriptor.get; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function defaultFilterStackFrame(filename) { + return ( + "" !== filename && + !filename.startsWith("node:") && + !filename.includes("node_modules") + ); + } + function filterStackTrace(request, stack) { + request = request.filterStackFrame; + for (var filteredStack = [], i = 0; i < stack.length; i++) { + var callsite = stack[i], + functionName = callsite[0]; + var url = callsite[1]; + if (url.startsWith("about://React/")) { + var envIdx = url.indexOf("/", 14), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = decodeURI(url.slice(envIdx + 1, suffixIdx))); + } + request(url, functionName, callsite[2], callsite[3]) && + ((callsite = callsite.slice(0)), + (callsite[1] = url), + filteredStack.push(callsite)); + } + return filteredStack; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + a: { + var error = Error("react-stack-top-frame"); + collectedStackTrace = null; + framesToSkip = 1; + var previousPrepare = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTracePrivate; + try { + if ("" !== error.stack) { + var JSCompiler_inline_result = null; + break a; + } + } finally { + Error.prepareStackTrace = previousPrepare; + } + JSCompiler_inline_result = collectedStackTrace; + } + JSCompiler_inline_result = filterStackTrace( + request, + JSCompiler_inline_result || [] + ); + request.pendingDebugChunks++; + error = resolveOwner(); + previousPrepare = Array.from(arguments); + a: { + var env = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + env = null; + break a; + case "assert": + env = 1; + } + var format = previousPrepare[env], + style = previousPrepare[env + 1], + badge = previousPrepare[env + 2]; + "string" === typeof format && + format.startsWith("%c%s%c") && + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px" === + style && + "string" === typeof badge + ? ((format = format.slice(6)), + " " === format[0] && (format = format.slice(1)), + previousPrepare.splice(env, 4, format), + (env = badge.slice(1, badge.length - 1))) + : (env = null); + } + null === env && (env = (0, request.environmentName)()); + null != error && outlineComponentInfo(request, error); + badge = [methodName, JSCompiler_inline_result, error, env]; + badge.push.apply(badge, previousPrepare); + previousPrepare = serializeDebugModel( + request, + (null === request.deferredDebugObjects ? 500 : 10) + + JSCompiler_inline_result.length, + badge + ); + "[" !== previousPrepare[0] && + (previousPrepare = serializeDebugModel( + request, + 10 + JSCompiler_inline_result.length, + [ + methodName, + JSCompiler_inline_result, + error, + env, + "Unknown Value: React could not send it from the server." + ] + )); + JSCompiler_inline_result = stringToChunk( + ":W" + previousPrepare + "\n" + ); + request.completedDebugChunks.push(JSCompiler_inline_result); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } + function getCurrentStackInDEV() { + var owner = resolveOwner(); + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function throwTaintViolation(message) { + throw Error(message); + } + function cleanupTaintQueue(request) { + request = request.taintCleanupQueue; + TaintRegistryPendingRequests.delete(request); + for (var i = 0; i < request.length; i++) { + var entryValue = request[i], + entry = TaintRegistryValues.get(entryValue); + void 0 !== entry && + (1 === entry.count + ? TaintRegistryValues.delete(entryValue) + : entry.count--); + } + request.length = 0; + } + function defaultErrorHandler(error) { + console.error(error); + } + function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error( + "Currently React only supports one RSC renderer at a time." + ); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + ReactSharedInternalsServer.getCurrentStack = getCurrentStackInDEV; + var abortSet = new Set(), + pingedTasks = [], + cleanupQueue = []; + TaintRegistryPendingRequests.add(cleanupQueue); + var hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = cleanupQueue; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = + void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + this.pendingDebugChunks = 0; + this.completedDebugChunks = []; + this.debugDestination = null; + this.environmentName = + void 0 === environmentName + ? function () { + return "Server"; + } + : "function" !== typeof environmentName + ? function () { + return environmentName; + } + : environmentName; + this.filterStackFrame = + void 0 === filterStackFrame + ? defaultFilterStackFrame + : filterStackFrame; + this.didWarnForKey = null; + this.writtenDebugObjects = new WeakMap(); + this.deferredDebugObjects = keepDebugAlive + ? { retained: new Map(), existing: new Map() } + : null; + type = this.timeOrigin = performance.now(); + emitTimeOriginChunk(this, type + performance.timeOrigin); + this.abortTime = -0; + model = createTask( + this, + model, + null, + !1, + 0, + abortSet, + type, + null, + null, + null + ); + pingedTasks.push(model); + } + function createRequest( + model, + bundlerConfig, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 20, + model, + bundlerConfig, + onError, + onPostpone, + noop, + noop, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function createPrerenderRequest( + model, + bundlerConfig, + onAllReady, + onFatalError, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 21, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function resolveRequest() { + return currentRequest ? currentRequest : null; + } + function serializeDebugThenable(request, counter, thenable) { + request.pendingDebugChunks++; + var id = request.nextChunkId++, + ref = "$@" + id.toString(16); + request.writtenDebugObjects.set(thenable, ref); + switch (thenable.status) { + case "fulfilled": + return ( + emitOutlinedDebugModelChunk(request, id, counter, thenable.value), + ref + ); + case "rejected": + return ( + emitErrorChunk(request, id, "", thenable.reason, !0, null), ref + ); + } + if (request.status === ABORTING) + return emitDebugHaltChunk(request, id), ref; + var deferredDebugObjects = request.deferredDebugObjects; + if (null !== deferredDebugObjects) + return ( + deferredDebugObjects.retained.set(id, thenable), + (ref = "$Y@" + id.toString(16)), + request.writtenDebugObjects.set(thenable, ref), + ref + ); + var cancelled = !1; + thenable.then( + function (value) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : (isArrayImpl(value) && 200 < value.length) || + ((value instanceof ArrayBuffer || + value instanceof Int8Array || + value instanceof Uint8Array || + value instanceof Uint8ClampedArray || + value instanceof Int16Array || + value instanceof Uint16Array || + value instanceof Int32Array || + value instanceof Uint32Array || + value instanceof Float32Array || + value instanceof Float64Array || + value instanceof BigInt64Array || + value instanceof BigUint64Array || + value instanceof DataView) && + 1e3 < value.byteLength) + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value), + enqueueFlush(request)); + }, + function (reason) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null), + enqueueFlush(request)); + } + ); + Promise.resolve().then(function () { + cancelled || + ((cancelled = !0), + emitDebugHaltChunk(request, id), + enqueueFlush(request), + (counter = request = null)); + }); + return ref; + } + function emitRequestedDebugThenable(request, id, counter, thenable) { + thenable.then( + function (value) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value); + enqueueFlush(request); + }, + function (reason) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + } + ); + } + function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + switch (thenable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + (newTask.model = thenable.value), + pingTask(request, newTask), + newTask.id + ); + case "rejected": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + erroredTask(request, newTask, thenable.reason), + newTask.id + ); + default: + if (request.status === ABORTING) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + forwardDebugInfoFromCurrentContext(request, newTask, thenable); + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + ((newTask.timed = !0), + erroredTask(request, newTask, reason), + enqueueFlush(request)); + } + ); + return newTask.id; + } + function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(stringToChunk(entry)), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$0) { + error(x$0); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + request.pendingChunks++; + task = + streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); + } + function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModel(request, entry.value); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(stringToChunk(endStreamRow)); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + callIteratorInDEV(iterator, progress, error); + } catch (x$1) { + error(x$1); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + var isIterator = iterable === iterator, + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + (task = iterable._debugInfo) && + forwardDebugInfo(request, streamTask, task); + request.pendingChunks++; + isIterator = + streamTask.id.toString(16) + ":" + (isIterator ? "x" : "X") + "\n"; + request.completedRegularChunks.push(stringToChunk(isIterator)); + request.cacheController.signal.addEventListener("abort", abortIterable); + callIteratorInDEV(iterator, progress, error); + return serializeByValueID(streamTask.id); + } + function emitHint(request, code, model) { + model = stringify(model); + code = stringToChunk(":H" + code + model + "\n"); + request.completedHintChunks.push(code); + enqueueFlush(request); + } + function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; + } + function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable(request, task, wakeable, null, null), + wakeable.value + ); + case "rejected": + forwardDebugInfoFromThenable(request, task, wakeable, null, null); + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { + $$typeof: REACT_LAZY_TYPE, + _payload: wakeable, + _init: readThenable + }; + } + function callWithDebugContextInDEV(request, task, callback, arg) { + var componentDebugInfo = { + name: "", + env: task.environmentName, + key: null, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.debugStack = task.debugStack; + request = componentDebugInfo.debugTask = task.debugTask; + currentOwner = componentDebugInfo; + try { + return request ? request.run(callback.bind(null, arg)) : callback(arg); + } finally { + currentOwner = null; + } + } + function processServerComponentReturnValue( + request, + task, + Component, + result + ) { + if ( + "object" !== typeof result || + null === result || + isClientReference(result) + ) + return result; + if ("function" === typeof result.then) + return ( + result.then(function (resolvedValue) { + "object" === typeof resolvedValue && + null !== resolvedValue && + resolvedValue.$$typeof === REACT_ELEMENT_TYPE && + (resolvedValue._store.validated = 1); + }, voidHandler), + createLazyWrapperAroundWakeable(request, task, result) + ); + result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1); + var iteratorFn = getIteratorFn(result); + if (iteratorFn) { + var multiShot = _defineProperty({}, Symbol.iterator, function () { + var iterator = iteratorFn.call(result); + iterator !== result || + ("[object GeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object Generator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + }); + multiShot._debugInfo = result._debugInfo; + return multiShot; + } + return "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((multiShot = _defineProperty({}, ASYNC_ITERATOR, function () { + var iterator = result[ASYNC_ITERATOR](); + iterator !== result || + ("[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object AsyncGenerator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + })), + (multiShot._debugInfo = result._debugInfo), + multiShot); + } + function renderFunctionComponent( + request, + task, + key, + Component, + props, + validated + ) { + var prevThenableState = task.thenableState; + task.thenableState = null; + if (canEmitDebugInfo) + if (null !== prevThenableState) + var componentDebugInfo = prevThenableState._componentDebugInfo; + else { + var componentDebugID = task.id; + componentDebugInfo = Component.displayName || Component.name || ""; + var componentEnv = (0, request.environmentName)(); + request.pendingChunks++; + componentDebugInfo = { + name: componentDebugInfo, + env: componentEnv, + key: key, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.props = props; + componentDebugInfo.debugStack = task.debugStack; + componentDebugInfo.debugTask = task.debugTask; + outlineComponentInfo(request, componentDebugInfo); + var timestamp = performance.now(); + timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : task.timed || emitTimingChunk(request, task.id, task.time); + task.timed = !0; + emitDebugChunk(request, componentDebugID, componentDebugInfo); + task.environmentName = componentEnv; + 2 === validated && + warnForMissingKey(request, key, componentDebugInfo, task.debugTask); + } + else return outlineTask(request, task); + thenableIndexCounter = 0; + thenableState = prevThenableState; + currentComponentDebugInfo = componentDebugInfo; + props = task.debugTask + ? task.debugTask.run( + callComponentInDEV.bind(null, Component, props, componentDebugInfo) + ) + : callComponentInDEV(Component, props, componentDebugInfo); + if (request.status === ABORTING) + throw ( + ("object" !== typeof props || + null === props || + "function" !== typeof props.then || + isClientReference(props) || + props.then(voidHandler, voidHandler), + null) + ); + validated = thenableState; + if (null !== validated) + for ( + prevThenableState = validated._stacks || (validated._stacks = []), + componentDebugID = 0; + componentDebugID < validated.length; + componentDebugID++ + ) + forwardDebugInfoFromThenable( + request, + task, + validated[componentDebugID], + componentDebugInfo, + prevThenableState[componentDebugID] + ); + props = processServerComponentReturnValue( + request, + task, + Component, + props + ); + task.debugOwner = componentDebugInfo; + task.debugStack = null; + task.debugTask = null; + Component = task.keyPath; + componentDebugInfo = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = componentDebugInfo; + return request; + } + function warnForMissingKey(request, key, componentDebugInfo, debugTask) { + function logKeyError() { + console.error( + 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', + "", + "" + ); + } + key = request.didWarnForKey; + null == key && (key = request.didWarnForKey = new WeakSet()); + request = componentDebugInfo.owner; + if (null != request) { + if (key.has(request)) return; + key.add(request); + } + debugTask + ? debugTask.run( + callComponentInDEV.bind(null, logKeyError, null, componentDebugInfo) + ) + : callComponentInDEV(logKeyError, null, componentDebugInfo); + } + function renderFragment(request, task, children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + null === child || + "object" !== typeof child || + child.$$typeof !== REACT_ELEMENT_TYPE || + null !== child.key || + child._store.validated || + (child._store.validated = 2); + } + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + if ((i = children._debugInfo)) { + if (canEmitDebugInfo) forwardDebugInfo(request, task, i); + else return outlineTask(request, task); + children = Array.from(children); + } + return children; + } + function renderAsyncFragment(request, task, children, getAsyncIterator) { + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + getAsyncIterator = getAsyncIterator.call(children); + return serializeAsyncIterable(request, task, children, getAsyncIterator); + } + function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + pingTask(request, task); + return serializeLazyID(task.id); + } + function outlineTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + retryTask(request, task); + return 1 === task.status + ? serializeByValueID(task.id) + : serializeLazyID(task.id); + } + function renderElement(request, task, type, key, ref, props, validated) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + jsxPropsParents.set(props, type); + "object" === typeof props.children && + null !== props.children && + jsxChildrenParents.set(props.children, type); + if ( + "function" !== typeof type || + isClientReference(type) || + type.$$typeof === TEMPORARY_REFERENCE_TAG + ) { + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + 2 === validated && + ((validated = { + name: "Fragment", + env: (0, request.environmentName)(), + key: key, + owner: task.debugOwner, + stack: + null === task.debugStack + ? null + : filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ), + props: props, + debugStack: task.debugStack, + debugTask: task.debugTask + }), + warnForMissingKey(request, key, validated, task.debugTask)), + (validated = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (request = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = validated), + request + ); + if ( + null != type && + "object" === typeof type && + !isClientReference(type) + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + type = callLazyInitInDEV(type); + if (request.status === ABORTING) throw null; + return renderElement( + request, + task, + type, + key, + ref, + props, + validated + ); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent( + request, + task, + key, + type.render, + props, + validated + ); + case REACT_MEMO_TYPE: + return renderElement( + request, + task, + type.type, + key, + ref, + props, + validated + ); + case REACT_ELEMENT_TYPE: + type._store.validated = 1; + } + else if ("string" === typeof type) { + ref = task.formatContext; + var newFormatContext = getChildFormatContext(ref, type, props); + ref !== newFormatContext && + null != props.children && + outlineModelWithFormatContext( + request, + props.children, + newFormatContext + ); + } + } else + return renderFunctionComponent( + request, + task, + key, + type, + props, + validated + ); + ref = task.keyPath; + null === key ? (key = ref) : null !== ref && (key = ref + "," + key); + newFormatContext = null; + ref = task.debugOwner; + null !== ref && outlineComponentInfo(request, ref); + if (null !== task.debugStack) { + newFormatContext = filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ); + var id = outlineDebugModel( + request, + { objectLimit: 2 * newFormatContext.length + 1 }, + newFormatContext + ); + request.writtenObjects.set(newFormatContext, serializeByValueID(id)); + } + request = [ + REACT_ELEMENT_TYPE, + type, + key, + props, + ref, + newFormatContext, + validated + ]; + task = task.implicitSlot && null !== key ? [request] : request; + return task; + } + function pingTask(request, task) { + task.timed = !0; + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : scheduleWork(function () { + return performWork(request); + })); + } + function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet, + lastTimestamp, + debugOwner, + debugStack, + debugTask + ) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + var parent = this, + originalValue = parent[parentPropertyName]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + callWithDebugContextInDEV(request, task, function () { + "Object" !== objectName(originalValue) + ? "string" === typeof jsxChildrenParents.get(parent) + ? console.error( + "%s objects cannot be rendered as text children. Try formatting it using toString().%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + return renderModel(request, task, parent, parentPropertyName, value); + }, + thenableState: null, + timed: !1 + }; + task.time = lastTimestamp; + task.environmentName = request.environmentName(); + task.debugOwner = debugOwner; + task.debugStack = debugStack; + task.debugTask = debugTask; + abortSet.add(task); + return task; + } + function serializeByValueID(id) { + return "$" + id.toString(16); + } + function serializeLazyID(id) { + return "$L" + id.toString(16); + } + function serializeDeferredObject(request, value) { + var deferredDebugObjects = request.deferredDebugObjects; + return null !== deferredDebugObjects + ? (request.pendingDebugChunks++, + (request = request.nextChunkId++), + deferredDebugObjects.existing.set(value, request), + deferredDebugObjects.retained.set(request, value), + "$Y" + request.toString(16)) + : "$Y"; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } + function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + id = id.toString(16) + ":" + request + "\n"; + return stringToChunk(id); + } + function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !1); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !1, null), + serializeByValueID(parent) + ); + } + } + function serializeDebugClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var existingId = request.writtenClientReferences.get( + clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id + ); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingDebugChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !0); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingDebugChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !0, null), + serializeByValueID(parent) + ); + } + } + function outlineModel(request, value) { + return outlineModelWithFormatContext(request, value, 0); + } + function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks, + performance.now(), + null, + null, + null + ); + retryTask(request, value); + return value.id; + } + function serializeServerReference(request, serverReference) { + var writtenServerReferences = request.writtenServerReferences, + existingId = writtenServerReferences.get(serverReference); + if (void 0 !== existingId) return "$F" + existingId.toString(16); + existingId = serverReference.$$bound; + existingId = null === existingId ? null : Promise.resolve(existingId); + var id = serverReference.$$id, + location = null, + error = serverReference.$$location; + error && + ((error = parseStackTrace(error, 1)), + 0 < error.length && + ((location = error[0]), + (location = [location[0], location[1], location[2], location[3]]))); + existingId = + null !== location + ? { + id: id, + bound: existingId, + name: + "function" === typeof serverReference + ? serverReference.name + : "", + env: (0, request.environmentName)(), + location: location + } + : { id: id, bound: existingId }; + request = outlineModel(request, existingId); + writtenServerReferences.set(serverReference, request); + return "$F" + request.toString(16); + } + function serializeLargeTextString(request, text) { + request.pendingChunks++; + var textId = request.nextChunkId++; + emitTextChunk(request, textId, text, !1); + return serializeByValueID(textId); + } + function serializeMap(request, map) { + map = Array.from(map); + return "$Q" + outlineModel(request, map).toString(16); + } + function serializeFormData(request, formData) { + formData = Array.from(formData.entries()); + return "$K" + outlineModel(request, formData).toString(16); + } + function serializeSet(request, set) { + set = Array.from(set); + return "$W" + outlineModel(request, set).toString(16); + } + function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); + } + function serializeDebugTypedArray(request, tag, typedArray) { + if (1e3 < typedArray.byteLength && !doNotLimit.has(typedArray)) + return serializeDeferredObject(request, typedArray); + request.pendingDebugChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !0); + return serializeByValueID(bufferId); + } + function serializeDebugBlob(request, blob) { + function progress(entry) { + if (entry.done) + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: model.length + 2 }, + model + ), + enqueueFlush(request); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + reader.cancel(reason).then(noop, noop); + } + var model = [blob.type], + reader = blob.stream().getReader(); + request.pendingDebugChunks++; + var id = request.nextChunkId++; + reader.read().then(progress).catch(error); + return "$B" + id.toString(16); + } + function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask( + request, + model, + null, + !1, + 0, + request.abortableTasks, + performance.now(), + null, + null, + null + ), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); + } + function renderModel(request, task, parent, key, value) { + serializedSize += key.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + return renderModelDestructive(request, task, parent, key, value); + } catch (thrownValue) { + parent = task.model; + parent = + "object" === typeof parent && + null !== parent && + (parent.$$typeof === REACT_ELEMENT_TYPE || + parent.$$typeof === REACT_LAZY_TYPE); + if (request.status === ABORTING) { + task.status = 3; + if (21 === request.type) + return ( + (task = request.nextChunkId++), + (task = parent + ? serializeLazyID(task) + : serializeByValueID(task)), + task + ); + task = request.fatalError; + return parent ? serializeLazyID(task) : serializeByValueID(task); + } + key = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof key && + null !== key && + "function" === typeof key.then + ) + return ( + (request = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + )), + (value = request.ping), + key.then(value, value), + (request.thenableState = getThenableStateAfterSuspending()), + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + parent + ? serializeLazyID(request.id) + : serializeByValueID(request.id) + ); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + request.pendingChunks++; + prevKeyPath = request.nextChunkId++; + "object" === typeof key && + null !== key && + key.$$typeof === REACT_POSTPONE_TYPE + ? (logPostpone(request, key.message, task), + emitPostponeChunk(request, prevKeyPath, key)) + : ((prevImplicitSlot = logRecoverableError(request, key, task)), + emitErrorChunk( + request, + prevKeyPath, + prevImplicitSlot, + key, + !1, + task.debugOwner + )); + return parent + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath); + } + } + function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value + ) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + _writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var _existingReference = _writtenObjects.get(value); + if (void 0 !== _existingReference) + if (modelRoot === value) modelRoot = null; + else return _existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((_existingReference = _writtenObjects.get(parent)), + void 0 !== _existingReference && + ((elementReference = + _existingReference + ":" + parentPropertyName), + _writtenObjects.set(value, elementReference))); + } + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + if ((_existingReference = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _existingReference); + else return outlineTask(request, task); + _existingReference = value.props; + var refProp = _existingReference.ref; + refProp = void 0 !== refProp ? refProp : null; + task.debugOwner = value._owner; + task.debugStack = value._debugStack; + task.debugTask = value._debugTask; + if ( + void 0 === value._owner || + void 0 === value._debugStack || + void 0 === value._debugTask + ) { + var key = ""; + null !== value.key && (key = ' key="' + value.key + '"'); + console.error( + "Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\n- The element is created with a production version of React but rendered in development.\n- The element was cloned with a custom function instead of `React.cloneElement`.\nThe props of this element may help locate this element: %o", + value.type, + key, + value.props + ); + } + request = renderElement( + request, + task, + value.type, + value.key, + refProp, + _existingReference, + value._store.validated + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (_writtenObjects.has(request) || + _writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + task.thenableState = null; + elementReference = callLazyInitInDEV(value); + if (request.status === ABORTING) throw null; + if ((_writtenObjects = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _writtenObjects); + else return outlineTask(request, task); + return renderModelDestructive( + request, + task, + emptyRoot, + "", + elementReference + ); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = TaintRegistryObjects.get(value); + void 0 !== elementReference && throwTaintViolation(elementReference); + elementReference = request.writtenObjects; + _writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== _writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return ( + "$@" + serializeThenable(request, task, value).toString(16) + ); + if (modelRoot === value) modelRoot = null; + else return _writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== _writtenObjects) + if (modelRoot === value) { + if (_writtenObjects !== serializeByValueID(task.id)) + return _writtenObjects; + modelRoot = null; + } else return _writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((_writtenObjects = elementReference.get(parent)), + void 0 !== _writtenObjects) + ) { + _existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + _existingReference = "type"; + break; + case "2": + _existingReference = "key"; + break; + case "3": + _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; + } + elementReference.set( + value, + _writtenObjects + ":" + _existingReference + ); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) return serializeMap(request, value); + if (value instanceof Set) return serializeSet(request, value); + if ("function" === typeof FormData && value instanceof FormData) + return serializeFormData(request, value); + if (value instanceof Error) return serializeErrorValue(request, value); + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (elementReference = elementReference.call(value)), + elementReference === value + ? "$i" + + outlineModel(request, Array.from(elementReference)).toString(16) + : renderFragment(request, task, Array.from(elementReference)) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return renderAsyncFragment(request, task, value, elementReference); + if (value instanceof Date) return "$D" + value.toJSON(); + elementReference = getPrototypeOf(value); + if ( + elementReference !== ObjectPrototype && + (null === elementReference || + null !== getPrototypeOf(elementReference)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + if ("Object" !== objectName(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (!isSimpleObject(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(value); + 0 < symbols.length && + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like %s are not supported.%s", + symbols[0].description, + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + } + return value; + } + if ("string" === typeof value) + return ( + (task = TaintRegistryValues.get(value)), + void 0 !== task && throwTaintViolation(task.message), + (serializedSize += value.length), + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ? "$D" + value + : 1024 <= value.length && null !== byteLengthOfChunk + ? serializeLargeTextString(request, value) + : "$" === value[0] + ? "$" + value + : value + ); + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return serializeServerReference(request, value); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), + void 0 !== request) + ) + return "$T" + request; + request = TaintRegistryObjects.get(value); + void 0 !== request && throwTaintViolation(request); + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + if ( + jsxChildrenParents.has(parent) || + (jsxPropsParents.has(parent) && "children" === parentPropertyName) + ) + throw ( + ((request = value.displayName || value.name || "Component"), + Error( + "Functions are not valid as a child of Client Components. This may happen if you return " + + request + + " instead of <" + + request + + " /> from render. Or maybe you meant to call this function rather than return it." + + describeObjectForErrorMessage(parent, parentPropertyName) + )) + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + _writtenObjects = request.nextChunkId++; + emitSymbolChunk(request, _writtenObjects, elementReference); + task.set(value, _writtenObjects); + return serializeByValueID(_writtenObjects); + } + if ("bigint" === typeof value) + return ( + (request = TaintRegistryValues.get(value)), + void 0 !== request && throwTaintViolation(request.message), + "$n" + value.toString(10) + ); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + function logPostpone(request, reason, task) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onPostpone = request.onPostpone; + null !== task + ? callWithDebugContextInDEV(request, task, onPostpone, reason) + : onPostpone(reason); + } finally { + currentRequest = prevRequest; + } + } + function logRecoverableError(request, error, task) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onError = request.onError; + var errorDigest = + null !== task + ? callWithDebugContextInDEV(request, task, onError, error) + : onError(error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; + } + function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + cleanupTaintQueue(request); + null !== request.destination + ? ((request.status = CLOSED), + closeWithError(request.destination, error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); + } + function emitPostponeChunk(request, id, postponeInstance) { + var reason = "", + env = request.environmentName(); + try { + reason = String(postponeInstance.message); + var stack = filterStackTrace( + request, + parseStackTrace(postponeInstance, 0) + ); + } catch (x) { + stack = []; + } + id = + serializeRowHeader("P", id) + + stringify({ reason: reason, stack: stack, env: env }) + + "\n"; + id = stringToChunk(id); + request.completedErrorChunks.push(id); + } + function serializeErrorValue(request, error) { + var name = "Error", + env = (0, request.environmentName)(); + try { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + return ( + "$Z" + + outlineModel(request, { + name: name, + message: message, + stack: stack, + env: env + }).toString(16) + ); + } + function emitErrorChunk(request, id, digest, error, debug, owner) { + var name = "Error", + env = (0, request.environmentName)(); + try { + if (error instanceof Error) { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } else + (message = + "object" === typeof error && null !== error + ? describeObjectForErrorMessage(error) + : String(error)), + (stack = []); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + error = null == owner ? null : outlineComponentInfo(request, owner); + digest = { + digest: digest, + name: name, + message: message, + stack: stack, + env: env, + owner: error + }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id) + : request.completedErrorChunks.push(id); + } + function emitImportChunk(request, id, clientReferenceMetadata, debug) { + clientReferenceMetadata = stringify(clientReferenceMetadata); + id = serializeRowHeader("I", id) + clientReferenceMetadata + "\n"; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id) + : request.completedImportChunks.push(id); + } + function emitSymbolChunk(request, id, name) { + id = encodeReferenceChunk(request, id, "$S" + name); + request.completedImportChunks.push(id); + } + function emitModelChunk(request, id, json) { + id = id.toString(16) + ":" + json + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); + } + function emitDebugHaltChunk(request, id) { + id = id.toString(16) + ":\n"; + id = stringToChunk(id); + request.completedDebugChunks.push(id); + } + function emitDebugChunk(request, id, debugInfo) { + var json = serializeDebugModel(request, 500, debugInfo); + null !== request.debugDestination + ? '"' === json[0] && "$" === json[1] + ? ((id = serializeRowHeader("D", id) + json + "\n"), + request.completedRegularChunks.push(stringToChunk(id))) + : ((debugInfo = request.nextChunkId++), + (json = debugInfo.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(stringToChunk(json)), + (id = + serializeRowHeader("D", id) + + '"$' + + debugInfo.toString(16) + + '"\n'), + request.completedRegularChunks.push(stringToChunk(id))) + : ((id = serializeRowHeader("D", id) + json + "\n"), + request.completedRegularChunks.push(stringToChunk(id))); + } + function outlineComponentInfo(request, componentInfo) { + var existingRef = request.writtenDebugObjects.get(componentInfo); + if (void 0 !== existingRef) return existingRef; + null != componentInfo.owner && + outlineComponentInfo(request, componentInfo.owner); + existingRef = 10; + null != componentInfo.stack && + (existingRef += componentInfo.stack.length); + existingRef = { objectLimit: existingRef }; + var componentDebugInfo = { + name: componentInfo.name, + key: componentInfo.key + }; + null != componentInfo.env && (componentDebugInfo.env = componentInfo.env); + null != componentInfo.owner && + (componentDebugInfo.owner = componentInfo.owner); + null == componentInfo.stack && null != componentInfo.debugStack + ? (componentDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(componentInfo.debugStack, 1) + )) + : null != componentInfo.stack && + (componentDebugInfo.stack = componentInfo.stack); + componentDebugInfo.props = componentInfo.props; + existingRef = outlineDebugModel(request, existingRef, componentDebugInfo); + existingRef = serializeByValueID(existingRef); + request.writtenDebugObjects.set(componentInfo, existingRef); + request.writtenObjects.set(componentInfo, existingRef); + return existingRef; + } + function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + if (TaintRegistryByteLengths.has(typedArray.byteLength)) { + var tainted = TaintRegistryValues.get( + String.fromCharCode.apply( + String, + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ) + ); + void 0 !== tainted && throwTaintViolation(tainted.message); + } + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + tainted = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + typedArray = 2048 < typedArray.byteLength ? tainted.slice() : tainted; + tainted = typedArray.byteLength; + id = id.toString(16) + ":" + tag + tainted.toString(16) + ","; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id, typedArray) + : request.completedRegularChunks.push(id, typedArray); + } + function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + text = stringToChunk(text); + var binaryLength = text.byteLength; + id = id.toString(16) + ":T" + binaryLength.toString(16) + ","; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id, text) + : request.completedRegularChunks.push(id, text); + } + function renderDebugModel( + request, + counter, + parent, + parentPropertyName, + value + ) { + if (null === value) return null; + if (value === REACT_ELEMENT_TYPE) return "$"; + if ("object" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === CONSTRUCTOR_MARKER) { + value = value.constructor; + var ref = request.writtenDebugObjects.get(value); + void 0 === ref && + ((request = outlineDebugModel(request, counter, value)), + (ref = serializeByValueID(request))); + return "$P" + ref.slice(1); + } + if (void 0 !== request.temporaryReferences) { + var tempRef = request.temporaryReferences.get(value); + if (void 0 !== tempRef) return "$T" + tempRef; + } + tempRef = request.writtenDebugObjects; + var existingDebugReference = tempRef.get(value); + if (void 0 !== existingDebugReference) + if (debugModelRoot === value) debugModelRoot = null; + else return existingDebugReference; + else if (-1 === parentPropertyName.indexOf(":")) + if ( + ((existingDebugReference = tempRef.get(parent)), + void 0 !== existingDebugReference) + ) { + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + var propertyName = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + propertyName = "type"; + break; + case "2": + propertyName = "key"; + break; + case "3": + propertyName = "props"; + break; + case "4": + propertyName = "_owner"; + } + tempRef.set(value, existingDebugReference + ":" + propertyName); + } else if (debugNoOutline !== value) { + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + request = outlineDebugModel(request, counter, value); + return serializeByValueID(request); + } + parent = request.writtenObjects.get(value); + if (void 0 !== parent) return parent; + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + counter.objectLimit--; + parent = request.deferredDebugObjects; + if ( + null !== parent && + ((parentPropertyName = parent.existing.get(value)), + void 0 !== parentPropertyName) + ) + return ( + parent.existing.delete(value), + parent.retained.delete(parentPropertyName), + emitOutlinedDebugModelChunk( + request, + parentPropertyName, + counter, + value + ), + serializeByValueID(parentPropertyName) + ); + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + null != value._owner && outlineComponentInfo(request, value._owner); + "object" === typeof value.type && + null !== value.type && + doNotLimit.add(value.type); + "object" === typeof value.key && + null !== value.key && + doNotLimit.add(value.key); + doNotLimit.add(value.props); + null !== value._owner && doNotLimit.add(value._owner); + counter = null; + if (null != value._debugStack) + for ( + counter = filterStackTrace( + request, + parseStackTrace(value._debugStack, 1) + ), + doNotLimit.add(counter), + request = 0; + request < counter.length; + request++ + ) + doNotLimit.add(counter[request]); + return [ + REACT_ELEMENT_TYPE, + value.type, + value.key, + value.props, + value._owner, + counter, + value._store.validated + ]; + case REACT_LAZY_TYPE: + value = value._payload; + if (null !== value && "object" === typeof value) { + switch (value._status) { + case 1: + return ( + (request = outlineDebugModel( + request, + counter, + value._result + )), + serializeLazyID(request) + ); + case 2: + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value._result, + !0, + null + ), + serializeLazyID(counter) + ); + } + switch (value.status) { + case "fulfilled": + return ( + (request = outlineDebugModel( + request, + counter, + value.value + )), + serializeLazyID(request) + ); + case "rejected": + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value.reason, + !0, + null + ), + serializeLazyID(counter) + ); + } + } + request.pendingDebugChunks++; + value = request.nextChunkId++; + emitDebugHaltChunk(request, value); + return serializeLazyID(value); + } + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + if (isArrayImpl(value)) + return 200 < value.length && !doNotLimit.has(value) + ? serializeDeferredObject(request, value) + : value; + if (value instanceof Date) return "$D" + value.toJSON(); + if (value instanceof Map) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) { + var entry = value[ref]; + doNotLimit.add(entry); + var key = entry[0]; + entry = entry[1]; + "object" === typeof key && null !== key && doNotLimit.add(key); + "object" === typeof entry && + null !== entry && + doNotLimit.add(entry); + } + return "$Q" + outlineDebugModel(request, counter, value).toString(16); + } + if (value instanceof Set) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) + (key = value[ref]), + "object" === typeof key && null !== key && doNotLimit.add(key); + return "$W" + outlineDebugModel(request, counter, value).toString(16); + } + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + + outlineDebugModel( + request, + { objectLimit: 2 * value.length + 1 }, + value + ).toString(16) + ); + if (value instanceof Error) { + counter = "Error"; + var env = (0, request.environmentName)(); + try { + (counter = value.name), + (ref = String(value.message)), + (key = filterStackTrace(request, parseStackTrace(value, 0))), + (entry = value.environmentName), + "string" === typeof entry && (env = entry); + } catch (x) { + (ref = + "An error occurred but serializing the error message failed."), + (key = []); + } + request = + "$Z" + + outlineDebugModel( + request, + { objectLimit: 2 * key.length + 1 }, + { name: counter, message: ref, stack: key, env: env } + ).toString(16); + return request; + } + if (value instanceof ArrayBuffer) + return serializeDebugTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeDebugTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeDebugTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeDebugTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeDebugTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeDebugTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeDebugTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeDebugTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeDebugTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeDebugTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeDebugTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeDebugTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeDebugTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeDebugBlob(request, value); + if (getIteratorFn(value)) return Array.from(value); + request = getPrototypeOf(value); + if (request !== ObjectPrototype && null !== request) { + counter = Object.create(null); + for (env in value) + if (hasOwnProperty.call(value, env) || isGetter(request, env)) + counter[env] = value[env]; + ref = request.constructor; + "function" !== typeof ref || + ref.prototype !== request || + hasOwnProperty.call(value, "") || + isGetter(request, "") || + (counter[""] = { $$typeof: CONSTRUCTOR_MARKER, constructor: ref }); + return counter; + } + return value; + } + if ("string" === typeof value) { + if (1024 <= value.length) { + if (0 >= counter.objectLimit) + return serializeDeferredObject(request, value); + counter.objectLimit--; + request.pendingDebugChunks++; + counter = request.nextChunkId++; + emitTextChunk(request, counter, value, !0); + return serializeByValueID(counter); + } + return "$" === value[0] ? "$" + value : value; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((counter = request.temporaryReferences.get(value)), + void 0 !== counter) + ) + return "$T" + counter; + counter = request.writtenDebugObjects; + ref = counter.get(value); + if (void 0 !== ref) return ref; + ref = Function.prototype.toString.call(value); + key = value.name; + key = + "$E" + + ("string" === typeof key + ? "Object.defineProperty(" + + ref + + ',"name",{value:' + + JSON.stringify(key) + + "})" + : "(" + ref + ")"); + request.pendingDebugChunks++; + ref = request.nextChunkId++; + key = encodeReferenceChunk(request, ref, key); + request.completedDebugChunks.push(key); + request = serializeByValueID(ref); + counter.set(value, request); + return request; + } + if ("symbol" === typeof value) { + counter = request.writtenSymbols.get(value); + if (void 0 !== counter) return serializeByValueID(counter); + value = value.description; + request.pendingChunks++; + counter = request.nextChunkId++; + emitSymbolChunk(request, counter, value); + return serializeByValueID(counter); + } + return "bigint" === typeof value + ? "$n" + value.toString(10) + : "unknown type " + typeof value; + } + function serializeDebugModel(request, objectLimit, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + var counter = { objectLimit: objectLimit }; + objectLimit = debugNoOutline; + debugNoOutline = model; + try { + return stringify(model, replacer); + } catch (x) { + return stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugNoOutline = objectLimit; + } + } + function emitOutlinedDebugModelChunk(request, id, counter, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + "object" === typeof model && null !== model && doNotLimit.add(model); + var prevModelRoot = debugModelRoot; + debugModelRoot = model; + "object" === typeof model && + null !== model && + request.writtenDebugObjects.set(model, serializeByValueID(id)); + try { + var json = stringify(model, replacer); + } catch (x) { + json = stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugModelRoot = prevModelRoot; + } + id = id.toString(16) + ":" + json + "\n"; + id = stringToChunk(id); + request.completedDebugChunks.push(id); + } + function outlineDebugModel(request, counter, model) { + var id = request.nextChunkId++; + request.pendingDebugChunks++; + emitOutlinedDebugModelChunk(request, id, counter, model); + return id; + } + function emitTimeOriginChunk(request, timeOrigin) { + request.pendingDebugChunks++; + timeOrigin = stringToChunk(":N" + timeOrigin + "\n"); + request.completedDebugChunks.push(timeOrigin); + } + function forwardDebugInfo(request$jscomp$1, task, debugInfo) { + for (var id = task.id, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + if ("number" === typeof info.time) + markOperationEndTime(request$jscomp$1, task, info.time); + else if ("string" === typeof info.name) + outlineComponentInfo(request$jscomp$1, info), + request$jscomp$1.pendingChunks++, + emitDebugChunk(request$jscomp$1, id, info); + else if (info.awaited) { + var ioInfo = info.awaited; + if (!(ioInfo.end <= request$jscomp$1.timeOrigin)) { + var request = request$jscomp$1, + ioInfo$jscomp$0 = ioInfo; + if (!request.writtenObjects.has(ioInfo$jscomp$0)) { + request.pendingDebugChunks++; + var id$jscomp$0 = request.nextChunkId++, + owner = ioInfo$jscomp$0.owner; + null != owner && outlineComponentInfo(request, owner); + var debugStack = + null == ioInfo$jscomp$0.stack && + null != ioInfo$jscomp$0.debugStack + ? filterStackTrace( + request, + parseStackTrace(ioInfo$jscomp$0.debugStack, 1) + ) + : ioInfo$jscomp$0.stack; + var env = ioInfo$jscomp$0.env; + null == env && (env = (0, request.environmentName)()); + var request$jscomp$0 = request, + id$jscomp$1 = id$jscomp$0, + value = ioInfo$jscomp$0.value, + objectLimit = 10; + debugStack && (objectLimit += debugStack.length); + var debugIOInfo = { + name: ioInfo$jscomp$0.name, + start: ioInfo$jscomp$0.start - request$jscomp$0.timeOrigin, + end: ioInfo$jscomp$0.end - request$jscomp$0.timeOrigin + }; + null != env && (debugIOInfo.env = env); + null != debugStack && (debugIOInfo.stack = debugStack); + null != owner && (debugIOInfo.owner = owner); + void 0 !== value && (debugIOInfo.value = value); + env = serializeDebugModel( + request$jscomp$0, + objectLimit, + debugIOInfo + ); + id$jscomp$1 = id$jscomp$1.toString(16) + ":J" + env + "\n"; + id$jscomp$1 = stringToChunk(id$jscomp$1); + request$jscomp$0.completedDebugChunks.push(id$jscomp$1); + request.writtenDebugObjects.set( + ioInfo$jscomp$0, + serializeByValueID(id$jscomp$0) + ); + } + null != info.owner && + outlineComponentInfo(request$jscomp$1, info.owner); + request = + null == info.stack && null != info.debugStack + ? filterStackTrace( + request$jscomp$1, + parseStackTrace(info.debugStack, 1) + ) + : info.stack; + ioInfo = { awaited: ioInfo }; + ioInfo.env = + null != info.env + ? info.env + : (0, request$jscomp$1.environmentName)(); + null != info.owner && (ioInfo.owner = info.owner); + null != request && (ioInfo.stack = request); + request$jscomp$1.pendingChunks++; + emitDebugChunk(request$jscomp$1, id, ioInfo); + } + } else + request$jscomp$1.pendingChunks++, + emitDebugChunk(request$jscomp$1, id, info); + } + } + function forwardDebugInfoFromThenable(request, task, thenable) { + (thenable = thenable._debugInfo) && + forwardDebugInfo(request, task, thenable); + } + function forwardDebugInfoFromCurrentContext(request, task, thenable) { + (thenable = thenable._debugInfo) && + forwardDebugInfo(request, task, thenable); + } + function forwardDebugInfoFromAbortedTask(request, task) { + var model = task.model; + "object" === typeof model && + null !== model && + (model = model._debugInfo) && + forwardDebugInfo(request, task, model); + } + function emitTimingChunk(request, id, timestamp) { + request.pendingChunks++; + var json = '{"time":' + (timestamp - request.timeOrigin) + "}"; + null !== request.debugDestination + ? ((timestamp = request.nextChunkId++), + (json = timestamp.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(stringToChunk(json)), + (id = + serializeRowHeader("D", id) + + '"$' + + timestamp.toString(16) + + '"\n'), + request.completedRegularChunks.push(stringToChunk(id))) + : ((id = serializeRowHeader("D", id) + json + "\n"), + request.completedRegularChunks.push(stringToChunk(id))); + } + function markOperationEndTime(request, task, timestamp) { + (request.status === ABORTING && timestamp > request.abortTime) || + (timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : emitTimingChunk(request, task.id, task.time)); + } + function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? ((task = TaintRegistryValues.get(value)), + void 0 !== task && throwTaintViolation(task.message), + emitTextChunk(request, id, value, !1)) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk( + request, + id, + "m", + value, + !1 + ) + : value instanceof DataView + ? emitTypedArrayChunk( + request, + id, + "V", + value, + !1 + ) + : ((value = stringify(value, task.toJSON)), + emitModelChunk(request, task.id, value)); + } + function erroredTask(request, task, error) { + task.timed && markOperationEndTime(request, task, performance.now()); + task.status = 4; + if ( + "object" === typeof error && + null !== error && + error.$$typeof === REACT_POSTPONE_TYPE + ) + logPostpone(request, error.message, task), + emitPostponeChunk(request, task.id, error); + else { + var digest = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner); + } + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } + function retryTask(request, task) { + if (0 === task.status) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + canEmitDebugInfo = !0; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + canEmitDebugInfo = !1; + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + var currentEnv = (0, request.environmentName)(); + currentEnv !== task.environmentName && + (request.pendingChunks++, + emitDebugChunk(request, task.id, { env: currentEnv })); + task.timed && markOperationEndTime(request, task, performance.now()); + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set( + resolvedModel, + serializeByValueID(task.id) + ), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel); + emitModelChunk(request, task.id, json); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (request.status === ABORTING) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + (canEmitDebugInfo = prevCanEmitDebugInfo), + (serializedSize = parentSerializedSize); + } + } + } + function tryStreamTask(request, task) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + canEmitDebugInfo = !1; + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + (serializedSize = parentSerializedSize), + (canEmitDebugInfo = prevCanEmitDebugInfo); + } + } + function performWork(request) { + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } + } + function abortTask(task) { + 0 === task.status && (task.status = 3); + } + function finishAbortedTask(task, request, errorId) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + task.timed && markOperationEndTime(request, task, request.abortTime), + (errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); + } + function haltTask(task) { + 0 === task.status && (task.status = 3); + } + function finishHaltedTask(task, request) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + request.pendingChunks--); + } + function flushCompletedChunks(request) { + if (null !== request.debugDestination) { + var debugDestination = request.debugDestination; + currentView = new Uint8Array(2048); + writtenBytes = 0; + try { + for ( + var debugChunks = request.completedDebugChunks, i = 0; + i < debugChunks.length; + i++ + ) + request.pendingDebugChunks--, + writeChunkAndReturn(debugDestination, debugChunks[i]); + debugChunks.splice(0, i); + } finally { + completeWriting(debugDestination); + } + } + debugDestination = request.destination; + if (null !== debugDestination) { + currentView = new Uint8Array(2048); + writtenBytes = 0; + try { + var importsChunks = request.completedImportChunks; + for ( + debugChunks = 0; + debugChunks < importsChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + importsChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + importsChunks.splice(0, debugChunks); + var hintChunks = request.completedHintChunks; + for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++) + if ( + !writeChunkAndReturn(debugDestination, hintChunks[debugChunks]) + ) { + request.destination = null; + debugChunks++; + break; + } + hintChunks.splice(0, debugChunks); + if (null === request.debugDestination) { + var _debugChunks = request.completedDebugChunks; + for ( + debugChunks = 0; + debugChunks < _debugChunks.length; + debugChunks++ + ) + if ( + (request.pendingDebugChunks--, + !writeChunkAndReturn( + debugDestination, + _debugChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + _debugChunks.splice(0, debugChunks); + } + var regularChunks = request.completedRegularChunks; + for ( + debugChunks = 0; + debugChunks < regularChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + regularChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + regularChunks.splice(0, debugChunks); + var errorChunks = request.completedErrorChunks; + for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(debugDestination, errorChunks[debugChunks])) + ) { + request.destination = null; + debugChunks++; + break; + } + errorChunks.splice(0, debugChunks); + } finally { + (request.flushScheduled = !1), completeWriting(debugDestination); + } + } + 0 === request.pendingChunks && + ((importsChunks = request.debugDestination), + 0 === request.pendingDebugChunks + ? (null !== importsChunks && + (importsChunks.close(), (request.debugDestination = null)), + cleanupTaintQueue(request), + request.status < ABORTING && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = CLOSED), + request.destination.close(), + (request.destination = null)), + null !== request.debugDestination && + (request.debugDestination.close(), + (request.debugDestination = null))) + : null !== importsChunks && + null !== request.destination && + ((request.status = CLOSED), + request.destination.close(), + (request.destination = null))); + } + function startWork(request) { + request.flushScheduled = null !== request.destination; + scheduleMicrotask(function () { + return performWork(request); + }); + scheduleWork(function () { + 10 === request.status && (request.status = 11); + }); + } + function enqueueFlush(request) { + !1 !== request.flushScheduled || + 0 !== request.pingedTasks.length || + (null === request.destination && null === request.debugDestination) || + ((request.flushScheduled = !0), + scheduleWork(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + })); + } + function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); + } + function startFlowing(request, destination) { + if (13 === request.status) + (request.status = CLOSED), + closeWithError(destination, request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } + function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = ABORTING; + request.abortTime = performance.now(); + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + scheduleWork(function () { + return finishHalt(request, abortableTasks); + }); + else if ( + "object" === typeof reason && + null !== reason && + reason.$$typeof === REACT_POSTPONE_TYPE + ) { + logPostpone(request, reason.message, null); + var errorId = request.nextChunkId++; + request.fatalError = errorId; + request.pendingChunks++; + emitPostponeChunk(request, errorId, reason); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId); + }); + scheduleWork(function () { + return finishAbort(request, abortableTasks, errorId); + }); + } else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + _errorId2 = request.nextChunkId++; + request.fatalError = _errorId2; + request.pendingChunks++; + emitErrorChunk(request, _errorId2, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, _errorId2); + }); + scheduleWork(function () { + return finishAbort(request, abortableTasks, _errorId2); + }); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$2) { + logRecoverableError(request, error$2, null), + fatalError(request, error$2); + } + } + function fromHex(str) { + return parseInt(str, 16); + } + function closeDebugChannel(request) { + var deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + deferredDebugObjects.retained.forEach(function (value, id) { + request.pendingDebugChunks--; + deferredDebugObjects.retained.delete(id); + deferredDebugObjects.existing.delete(value); + }); + enqueueFlush(request); + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = __webpack_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + + ) { + var chunkId = chunks[i++], + chunkFilename = chunks[i++], + entry = chunkCache.get(chunkId); + void 0 === entry + ? ((chunkFilename = loadChunk(chunkId, chunkFilename)), + promises.push(chunkFilename), + (entry = chunkCache.set.bind(chunkCache, chunkId, null)), + chunkFilename.then(entry, ignoreReject), + chunkCache.set(chunkId, chunkFilename)) + : null !== entry && promises.push(entry); + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = __webpack_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function loadChunk(chunkId, filename) { + chunkMap.set(chunkId, filename); + return __webpack_chunk_load__(chunkId); + } + function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; + } + function createPendingChunk(response) { + return new Chunk("pending", null, null, response); + } + function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); + } + function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } + } + function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } + } + function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1, + response + ); + } + function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1 + ); + } + function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key + ) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; + } + function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString( + response, + parentObj, + parentKey, + value, + reference + ); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel( + response, + value, + i, + value[i], + parentObj + )), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; + } + function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = + -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), + (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } + } + function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path + ) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && + null === blocked.value && + (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; + } + function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; + } + function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey + ) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; + } + function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close( + "C" === chunks ? '"$undefined"' : chunks.slice(1) + ) + : controller.enqueueModel(chunks); + } + function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk = createPendingChunk(response); + _chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk; + chunk.then(function () { + previousBlockedChunk === _chunk && (previousBlockedChunk = null); + resolveModelChunk(_chunk, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = _defineProperty({}, ASYNC_ITERATOR, function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }); + iterator = iterator ? iterable[ASYNC_ITERATOR]() : iterable; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; + } + function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return ( + (obj = parseInt(value.slice(2), 16)), getChunk(response, obj) + ); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel( + response, + value, + obj, + key, + createModel + )), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if ( + void 0 === reference || + void 0 === response._temporaryReferences + ) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray( + response, + value, + Uint8ClampedArray, + 1, + obj, + key + ); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray( + response, + value, + BigUint64Array, + 8, + obj, + key + ); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; + } + function createResponse( + bundlerConfig, + formFieldPrefix, + temporaryReferences + ) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; + } + function close(response) { + reportGlobalError(response, Error("Connection closed.")); + } + function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); + } + function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; + } + function startReadingFromDebugChannelReadableStream( + request$jscomp$0, + stream + ) { + function progress(_ref) { + var done = _ref.done, + buffer = _ref.value; + _ref = stringBuffer; + done + ? ((buffer = new Uint8Array(0)), + (buffer = stringDecoder.decode(buffer))) + : (buffer = stringDecoder.decode(buffer, decoderOptions)); + stringBuffer = _ref + buffer; + _ref = stringBuffer.split("\n"); + for (buffer = 0; buffer < _ref.length - 1; buffer++) { + var request = request$jscomp$0, + message = _ref[buffer], + deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + if ("" === message) closeDebugChannel(request); + else { + var command = message.charCodeAt(0); + message = message.slice(2).split(",").map(fromHex); + switch (command) { + case 82: + for (command = 0; command < message.length; command++) { + var id = message[command], + retainedValue = deferredDebugObjects.retained.get(id); + void 0 !== retainedValue && + (request.pendingDebugChunks--, + deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + enqueueFlush(request)); + } + break; + case 81: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: 10 }, + retainedValue + ), + enqueueFlush(request)); + break; + case 80: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + emitRequestedDebugThenable( + request, + id, + { objectLimit: 10 }, + retainedValue + )); + break; + default: + throw Error( + "Unknown command. The debugChannel was not wired up properly." + ); + } + } + } + stringBuffer = _ref[_ref.length - 1]; + if (done) closeDebugChannel(request$jscomp$0); + else return reader.read().then(progress).catch(error); + } + function error(e) { + abort( + request$jscomp$0, + Error("Lost connection to the Debug Channel.", { cause: e }) + ); + } + var reader = stream.getReader(), + stringDecoder = new TextDecoder(), + stringBuffer = ""; + reader.read().then(progress).catch(error); + } + var ReactDOM = require("react-dom"), + React = require("react"), + channel = new MessageChannel(), + taskQueue = []; + channel.port1.onmessage = function () { + var task = taskQueue.shift(); + task && task(); + }; + var LocalPromise = Promise, + scheduleMicrotask = + "function" === typeof queueMicrotask + ? queueMicrotask + : function (callback) { + LocalPromise.resolve(null) + .then(callback) + .catch(handleErrorInNextTick); + }, + currentView = null, + writtenBytes = 0, + textEncoder = new TextEncoder(), + CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"), + FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice, + PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; + ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: function (href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } + }, + C: function (href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = + "C|" + + (null == crossOrigin ? "null" : crossOrigin) + + "|" + + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } + }, + L: preload, + m: preloadModule$1, + X: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } + }, + S: function (href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } + }, + M: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } + } + }; + var framesToSkip = 0, + collectedStackTrace = null, + identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, + frameRegExp = + /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|)\)|(?:async )?(.+):(\d+):(\d+)|)$/, + stackTraceCache = new WeakMap(), + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }, + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), + REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." + ), + suspendedThenable = null, + currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null, + currentComponentDebugInfo = null, + HooksDispatcher = { + readContext: unsupportedContext, + use: function (usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (isClientReference(usable)) { + if ( + null != usable.value && + usable.value.$$typeof === REACT_CONTEXT_TYPE + ) + throw Error( + "Cannot read a Client Context from a Server Component." + ); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error( + "An unsupported type was passed to use(): " + String(usable) + ); + }, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: function () { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return ( + "_" + + currentRequest$1.identifierPrefix + + "S_" + + id.toString(32) + + "_" + ); + }, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } + }; + HooksDispatcher.useEffectEvent = unsupportedHook; + var currentOwner = null, + DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var cache = (cache = resolveRequest()) ? cache.cache : new Map(); + var entry = cache.get(resourceType); + void 0 === entry && + ((entry = resourceType()), cache.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); + var prefix, suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var lastResetTime = 0; + if ( + "object" === typeof performance && + "function" === typeof performance.now + ) { + var localPerformance = performance; + var getCurrentTime = function () { + return localPerformance.now(); + }; + } else { + var localDate = Date; + getCurrentTime = function () { + return localDate.now(); + }; + } + var callComponent = { + react_stack_bottom_frame: function ( + Component, + props, + componentDebugInfo + ) { + currentOwner = componentDebugInfo; + try { + return Component(props, void 0); + } finally { + currentOwner = null; + } + } + }, + callComponentInDEV = + callComponent.react_stack_bottom_frame.bind(callComponent), + callLazyInit = { + react_stack_bottom_frame: function (lazy) { + var init = lazy._init; + return init(lazy._payload); + } + }, + callLazyInitInDEV = + callLazyInit.react_stack_bottom_frame.bind(callLazyInit), + callIterator = { + react_stack_bottom_frame: function (iterator, progress, error) { + iterator.next().then(progress, error); + } + }, + callIteratorInDEV = + callIterator.react_stack_bottom_frame.bind(callIterator), + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + hasOwnProperty = Object.prototype.hasOwnProperty, + doNotLimit = new WeakSet(); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, + stringify = JSON.stringify, + ABORTING = 12, + CLOSED = 14, + TaintRegistryObjects = ReactSharedInternalsServer.TaintRegistryObjects, + TaintRegistryValues = ReactSharedInternalsServer.TaintRegistryValues, + TaintRegistryByteLengths = + ReactSharedInternalsServer.TaintRegistryByteLengths, + TaintRegistryPendingRequests = + ReactSharedInternalsServer.TaintRegistryPendingRequests, + defaultPostponeHandler = noop, + currentRequest = null, + canEmitDebugInfo = !1, + serializedSize = 0, + MAX_ROW_SIZE = 3200, + modelRoot = !1, + CONSTRUCTOR_MARKER = Symbol(), + debugModelRoot = null, + debugNoOutline = null, + emptyRoot = {}, + decoderOptions = { stream: !0 }, + chunkCache = new Map(), + chunkMap = new Map(), + webpackGetChunkFilename = __webpack_require__.u; + __webpack_require__.u = function (chunkId) { + var flightChunk = chunkMap.get(chunkId); + return void 0 !== flightChunk + ? flightChunk + : webpackGetChunkFilename(chunkId); + }; + Chunk.prototype = Object.create(Promise.prototype); + Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + default: + reject(this.reason); + } + }; + var initializingChunk = null, + initializingChunkBlockedModel = null; + exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); + }; + exports.createTemporaryReferenceSet = function () { + return new WeakMap(); + }; + exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference( + serverManifest, + value.id, + value.bound + ))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); + }; + exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); + }; + exports.decodeReply = function (body, webpackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + webpackMap = getChunk(body, 0); + close(body); + return webpackMap; + }; + exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = createPrerenderRequest( + model, + webpackMap, + function () { + var stream = new ReadableStream( + { + type: "bytes", + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + !1 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; + exports.registerClientReference = function ( + proxyImplementation, + id, + exportName + ) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); + }; + exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + $$location: { value: Error("react-stack-top-frame"), configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + }; + exports.renderToReadableStream = function (model, webpackMap, options) { + var debugChannelReadable = + options && options.debugChannel + ? options.debugChannel.readable + : void 0, + debugChannelWritable = + options && options.debugChannel + ? options.debugChannel.writable + : void 0, + request = createRequest( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + void 0 !== debugChannelReadable + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + void 0 !== debugChannelWritable && + new ReadableStream( + { + type: "bytes", + pull: function (controller) { + if (13 === request.status) + (request.status = CLOSED), + closeWithError(controller, request.fatalError); + else if ( + request.status !== CLOSED && + null === request.debugDestination + ) { + request.debugDestination = controller; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), + fatalError(request, error); + } + } + } + }, + { highWaterMark: 0 } + ).pipeTo(debugChannelWritable); + void 0 !== debugChannelReadable && + startReadingFromDebugChannelReadableStream( + request, + debugChannelReadable + ); + return new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + }; + })(); diff --git a/.socket/blob/012330b9220666fc00eca9d951452a33654b1d8ded07bdfecb25417a192b2799 b/.socket/blob/012330b9220666fc00eca9d951452a33654b1d8ded07bdfecb25417a192b2799 new file mode 100644 index 0000000..eb1c367 --- /dev/null +++ b/.socket/blob/012330b9220666fc00eca9d951452a33654b1d8ded07bdfecb25417a192b2799 @@ -0,0 +1,2245 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-client.node.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 strict"; +var util = require("util"), + ReactDOM = require("react-dom"), + decoderOptions = { stream: !0 }; +function resolveClientReference(bundlerConfig, metadata) { + if (bundlerConfig) { + var moduleExports = bundlerConfig[metadata[0]]; + if ((bundlerConfig = moduleExports && (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0))) + moduleExports = bundlerConfig.name; + else { + bundlerConfig = moduleExports && moduleExports["*"]; + if (!bundlerConfig) + throw Error( + 'Could not find the module "' + + metadata[0] + + '" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.' + ); + moduleExports = metadata[2]; + } + return 4 === metadata.length + ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1] + : [bundlerConfig.id, bundlerConfig.chunks, moduleExports]; + } + return metadata; +} +function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; +} +function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; +} +var instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(); +function ignoreReject() {} +function preloadModule(metadata) { + for (var chunks = metadata[1], promises = [], i = 0; i < chunks.length; i++) { + var thenable = globalThis.__next_chunk_load__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; +} +function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); +} +function prepareDestinationWithChunks(moduleLoading, chunks, nonce$jscomp$0) { + if (null !== moduleLoading) + for (var i = 0; i < chunks.length; i++) { + var nonce = nonce$jscomp$0, + JSCompiler_temp_const = ReactDOMSharedInternals.d, + JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X, + JSCompiler_temp_const$jscomp$1 = moduleLoading.prefix + chunks[i]; + var JSCompiler_inline_result = moduleLoading.crossOrigin; + JSCompiler_inline_result = + "string" === typeof JSCompiler_inline_result + ? "use-credentials" === JSCompiler_inline_result + ? JSCompiler_inline_result + : "" + : void 0; + JSCompiler_temp_const$jscomp$0.call( + JSCompiler_temp_const, + JSCompiler_temp_const$jscomp$1, + { crossOrigin: JSCompiler_inline_result, nonce: nonce } + ); + } +} +var ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; +} +var ASYNC_ITERATOR = Symbol.asyncIterator, + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + ObjectPrototype = Object.prototype, + knownServerReferences = new WeakMap(); +function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; +} +function processReply( + root, + formFieldPrefix, + temporaryReferences, + resolve, + reject +) { + function serializeTypedArray(tag, typedArray) { + typedArray = new Blob([ + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ]); + var blobId = nextPartId++; + null === formData && (formData = new FormData()); + formData.append(formFieldPrefix + blobId, typedArray); + return "$" + tag + blobId.toString(16); + } + function serializeBinaryReader(reader) { + function progress(entry) { + entry.done + ? ((entry = nextPartId++), + data.append(formFieldPrefix + entry, new Blob(buffer)), + data.append( + formFieldPrefix + streamId, + '"$o' + entry.toString(16) + '"' + ), + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data)) + : (buffer.push(entry.value), + reader.read(new Uint8Array(1024)).then(progress, reject)); + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++, + buffer = []; + reader.read(new Uint8Array(1024)).then(progress, reject); + return "$r" + streamId.toString(16); + } + function serializeReader(reader) { + function progress(entry) { + if (entry.done) + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON); + reader.read().then(progress, reject); + } catch (x) { + reject(x); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + reader.read().then(progress, reject); + return "$R" + streamId.toString(16); + } + function serializeReadableStream(stream) { + try { + var binaryReader = stream.getReader({ mode: "byob" }); + } catch (x) { + return serializeReader(stream.getReader()); + } + return serializeBinaryReader(binaryReader); + } + function serializeAsyncIterable(iterable, iterator) { + function progress(entry) { + if (entry.done) { + if (void 0 === entry.value) + data.append(formFieldPrefix + streamId, "C"); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, "C" + partJSON); + } catch (x) { + reject(x); + return; + } + pendingParts--; + 0 === pendingParts && resolve(data); + } else + try { + var partJSON$21 = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON$21); + iterator.next().then(progress, reject); + } catch (x$22) { + reject(x$22); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + iterable = iterable === iterator; + iterator.next().then(progress, reject); + return "$" + (iterable ? "x" : "X") + streamId.toString(16); + } + function resolveToJSON(key, value) { + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) { + var parentReference = writtenObjects.get(this); + if (void 0 !== parentReference) + return ( + temporaryReferences.set(parentReference + ":" + key, value), + "$T" + ); + } + throw Error( + "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." + ); + case REACT_LAZY_TYPE: + parentReference = value._payload; + var init = value._init; + null === formData && (formData = new FormData()); + pendingParts++; + try { + var resolvedModel = init(parentReference), + lazyId = nextPartId++, + partJSON = serializeModel(resolvedModel, lazyId); + formData.append(formFieldPrefix + lazyId, partJSON); + return "$" + lazyId.toString(16); + } catch (x) { + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + pendingParts++; + var lazyId$23 = nextPartId++; + parentReference = function () { + try { + var partJSON$24 = serializeModel(value, lazyId$23), + data$25 = formData; + data$25.append(formFieldPrefix + lazyId$23, partJSON$24); + pendingParts--; + 0 === pendingParts && resolve(data$25); + } catch (reason) { + reject(reason); + } + }; + x.then(parentReference, parentReference); + return "$" + lazyId$23.toString(16); + } + reject(x); + return null; + } finally { + pendingParts--; + } + } + if ("function" === typeof value.then) { + null === formData && (formData = new FormData()); + pendingParts++; + var promiseId = nextPartId++; + value.then(function (partValue) { + try { + var partJSON$27 = serializeModel(partValue, promiseId); + partValue = formData; + partValue.append(formFieldPrefix + promiseId, partJSON$27); + pendingParts--; + 0 === pendingParts && resolve(partValue); + } catch (reason) { + reject(reason); + } + }, reject); + return "$@" + promiseId.toString(16); + } + parentReference = writtenObjects.get(value); + if (void 0 !== parentReference) + if (modelRoot === value) modelRoot = null; + else return parentReference; + else + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference && + ((key = parentReference + ":" + key), + writtenObjects.set(value, key), + void 0 !== temporaryReferences && + temporaryReferences.set(key, value))); + if (isArrayImpl(value)) return value; + if (value instanceof FormData) { + null === formData && (formData = new FormData()); + var data$31 = formData; + key = nextPartId++; + var prefix = formFieldPrefix + key + "_"; + value.forEach(function (originalValue, originalKey) { + data$31.append(prefix + originalKey, originalValue); + }); + return "$K" + key.toString(16); + } + if (value instanceof Map) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$Q" + key.toString(16) + ); + if (value instanceof Set) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$W" + key.toString(16) + ); + if (value instanceof ArrayBuffer) + return ( + (key = new Blob([value])), + (parentReference = nextPartId++), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + parentReference, key), + "$A" + parentReference.toString(16) + ); + if (value instanceof Int8Array) return serializeTypedArray("O", value); + if (value instanceof Uint8Array) return serializeTypedArray("o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray("U", value); + if (value instanceof Int16Array) return serializeTypedArray("S", value); + if (value instanceof Uint16Array) return serializeTypedArray("s", value); + if (value instanceof Int32Array) return serializeTypedArray("L", value); + if (value instanceof Uint32Array) return serializeTypedArray("l", value); + if (value instanceof Float32Array) return serializeTypedArray("G", value); + if (value instanceof Float64Array) return serializeTypedArray("g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray("M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray("m", value); + if (value instanceof DataView) return serializeTypedArray("V", value); + if ("function" === typeof Blob && value instanceof Blob) + return ( + null === formData && (formData = new FormData()), + (key = nextPartId++), + formData.append(formFieldPrefix + key, value), + "$B" + key.toString(16) + ); + if ((key = getIteratorFn(value))) + return ( + (parentReference = key.call(value)), + parentReference === value + ? ((key = nextPartId++), + (parentReference = serializeModel( + Array.from(parentReference), + key + )), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$i" + key.toString(16)) + : Array.from(parentReference) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(value); + key = value[ASYNC_ITERATOR]; + if ("function" === typeof key) + return serializeAsyncIterable(value, key.call(value)); + key = getPrototypeOf(value); + if ( + key !== ObjectPrototype && + (null === key || null !== getPrototypeOf(key)) + ) { + if (void 0 === temporaryReferences) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." + ); + return "$T"; + } + return value; + } + if ("string" === typeof value) { + if ("Z" === value[value.length - 1] && this[key] instanceof Date) + return "$D" + value; + key = "$" === value[0] ? "$" + value : value; + return key; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + parentReference = knownServerReferences.get(value); + if (void 0 !== parentReference) + return ( + (key = JSON.stringify( + { id: parentReference.id, bound: parentReference.bound }, + resolveToJSON + )), + null === formData && (formData = new FormData()), + (parentReference = nextPartId++), + formData.set(formFieldPrefix + parentReference, key), + "$F" + parentReference.toString(16) + ); + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again." + ); + } + if ("symbol" === typeof value) { + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." + ); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported as an argument to a Server Function." + ); + } + function serializeModel(model, id) { + "object" === typeof model && + null !== model && + ((id = "$" + id.toString(16)), + writtenObjects.set(model, id), + void 0 !== temporaryReferences && temporaryReferences.set(id, model)); + modelRoot = model; + return JSON.stringify(model, resolveToJSON); + } + var nextPartId = 1, + pendingParts = 0, + formData = null, + writtenObjects = new WeakMap(), + modelRoot = root, + json = serializeModel(root, 0); + null === formData + ? resolve(json) + : (formData.set(formFieldPrefix + "0", json), + 0 === pendingParts && resolve(formData)); + return function () { + 0 < pendingParts && + ((pendingParts = 0), + null === formData ? resolve(json) : resolve(formData)); + }; +} +var boundCache = new WeakMap(); +function encodeFormData(reference) { + var resolve, + reject, + thenable = new Promise(function (res, rej) { + resolve = res; + reject = rej; + }); + processReply( + reference, + "", + void 0, + function (body) { + if ("string" === typeof body) { + var data = new FormData(); + data.append("0", body); + body = data; + } + thenable.status = "fulfilled"; + thenable.value = body; + resolve(body); + }, + function (e) { + thenable.status = "rejected"; + thenable.reason = e; + reject(e); + } + ); + return thenable; +} +function defaultEncodeFormAction(identifierPrefix) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var data = null; + if (null !== referenceClosure.bound) { + data = boundCache.get(referenceClosure); + data || + ((data = encodeFormData({ + id: referenceClosure.id, + bound: referenceClosure.bound + })), + boundCache.set(referenceClosure, data)); + if ("rejected" === data.status) throw data.reason; + if ("fulfilled" !== data.status) throw data; + referenceClosure = data.value; + var prefixedData = new FormData(); + referenceClosure.forEach(function (value, key) { + prefixedData.append("$ACTION_" + identifierPrefix + ":" + key, value); + }); + data = prefixedData; + referenceClosure = "$ACTION_REF_" + identifierPrefix; + } else referenceClosure = "$ACTION_ID_" + referenceClosure.id; + return { + name: referenceClosure, + method: "POST", + encType: "multipart/form-data", + data: data + }; +} +function isSignatureEqual(referenceId, numberOfBoundArgs) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + if (referenceClosure.id !== referenceId) return !1; + var boundPromise = referenceClosure.bound; + if (null === boundPromise) return 0 === numberOfBoundArgs; + switch (boundPromise.status) { + case "fulfilled": + return boundPromise.value.length === numberOfBoundArgs; + case "pending": + throw boundPromise; + case "rejected": + throw boundPromise.reason; + default: + throw ( + ("string" !== typeof boundPromise.status && + ((boundPromise.status = "pending"), + boundPromise.then( + function (boundArgs) { + boundPromise.status = "fulfilled"; + boundPromise.value = boundArgs; + }, + function (error) { + boundPromise.status = "rejected"; + boundPromise.reason = error; + } + )), + boundPromise) + ); + } +} +function registerBoundServerReference(reference, id, bound, encodeFormAction) { + knownServerReferences.has(reference) || + (knownServerReferences.set(reference, { + id: id, + originalBind: reference.bind, + bound: bound + }), + Object.defineProperties(reference, { + $$FORM_ACTION: { + value: + void 0 === encodeFormAction + ? defaultEncodeFormAction + : function () { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var boundPromise = referenceClosure.bound; + null === boundPromise && (boundPromise = Promise.resolve([])); + return encodeFormAction(referenceClosure.id, boundPromise); + } + }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + })); +} +var FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice; +function bind() { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) return FunctionBind.apply(this, arguments); + var newFn = referenceClosure.originalBind.apply(this, arguments), + args = ArraySlice.call(arguments, 1), + boundPromise = null; + boundPromise = + null !== referenceClosure.bound + ? Promise.resolve(referenceClosure.bound).then(function (boundArgs) { + return boundArgs.concat(args); + }) + : Promise.resolve(args); + knownServerReferences.set(newFn, { + id: referenceClosure.id, + originalBind: newFn.bind, + bound: boundPromise + }); + Object.defineProperties(newFn, { + $$FORM_ACTION: { value: this.$$FORM_ACTION }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + }); + return newFn; +} +function createBoundServerReference(metaData, callServer, encodeFormAction) { + function action() { + var args = Array.prototype.slice.call(arguments); + return bound + ? "fulfilled" === bound.status + ? callServer(id, bound.value.concat(args)) + : Promise.resolve(bound).then(function (boundArgs) { + return callServer(id, boundArgs.concat(args)); + }) + : callServer(id, args); + } + var id = metaData.id, + bound = metaData.bound; + registerBoundServerReference(action, id, bound, encodeFormAction); + return action; +} +function createServerReference$1(id, callServer, encodeFormAction) { + function action() { + var args = Array.prototype.slice.call(arguments); + return callServer(id, args); + } + registerBoundServerReference(action, id, null, encodeFormAction); + return action; +} +function ReactPromise(status, value, reason) { + this.status = status; + this.value = value; + this.reason = reason; +} +ReactPromise.prototype = Object.create(Promise.prototype); +ReactPromise.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + break; + case "resolved_module": + initializeModuleChunk(this); + } + switch (this.status) { + case "fulfilled": + "function" === typeof resolve && resolve(this.value); + break; + case "pending": + case "blocked": + "function" === typeof resolve && + (null === this.value && (this.value = []), this.value.push(resolve)); + "function" === typeof reject && + (null === this.reason && (this.reason = []), this.reason.push(reject)); + break; + case "halted": + break; + default: + "function" === typeof reject && reject(this.reason); + } +}; +function readChunk(chunk) { + switch (chunk.status) { + case "resolved_model": + initializeModelChunk(chunk); + break; + case "resolved_module": + initializeModuleChunk(chunk); + } + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "pending": + case "blocked": + case "halted": + throw chunk; + default: + throw chunk.reason; + } +} +function createErrorChunk(response, error) { + return new ReactPromise("rejected", null, error); +} +function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value); + } +} +function rejectChunk(listeners, error) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(error) + : rejectReference(listener, error); + } +} +function resolveBlockedCycle(resolvedChunk, reference) { + var referencedChunk = reference.handler.chunk; + if (null === referencedChunk) return null; + if (referencedChunk === resolvedChunk) return reference.handler; + reference = referencedChunk.value; + if (null !== reference) + for ( + referencedChunk = 0; + referencedChunk < reference.length; + referencedChunk++ + ) { + var listener = reference[referencedChunk]; + if ( + "function" !== typeof listener && + ((listener = resolveBlockedCycle(resolvedChunk, listener)), + null !== listener) + ) + return listener; + } + return null; +} +function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) { + switch (chunk.status) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "blocked": + for (var i = 0; i < resolveListeners.length; i++) { + var listener = resolveListeners[i]; + if ("function" !== typeof listener) { + var cyclicHandler = resolveBlockedCycle(chunk, listener); + if (null !== cyclicHandler) + switch ( + (fulfillReference(listener, cyclicHandler.value), + resolveListeners.splice(i, 1), + i--, + null !== rejectListeners && + ((listener = rejectListeners.indexOf(listener)), + -1 !== listener && rejectListeners.splice(listener, 1)), + chunk.status) + ) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + return; + case "rejected": + null !== rejectListeners && + rejectChunk(rejectListeners, chunk.reason); + return; + } + } + } + case "pending": + if (chunk.value) + for (i = 0; i < resolveListeners.length; i++) + chunk.value.push(resolveListeners[i]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for ( + resolveListeners = 0; + resolveListeners < rejectListeners.length; + resolveListeners++ + ) + chunk.reason.push(rejectListeners[resolveListeners]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && rejectChunk(rejectListeners, chunk.reason); + } +} +function triggerErrorOnChunk(response, chunk, error) { + "pending" !== chunk.status && "blocked" !== chunk.status + ? chunk.reason.error(error) + : ((response = chunk.reason), + (chunk.status = "rejected"), + (chunk.reason = error), + null !== response && rejectChunk(response, error)); +} +function createResolvedIteratorResultChunk(response, value, done) { + return new ReactPromise( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + response + ); +} +function resolveIteratorResultChunk(response, chunk, value, done) { + resolveModelChunk( + response, + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}" + ); +} +function resolveModelChunk(response, chunk, value) { + if ("pending" !== chunk.status) chunk.reason.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = response; + null !== resolveListeners && + (initializeModelChunk(chunk), + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners)); + } +} +function resolveModuleChunk(response, chunk, value) { + if ("pending" === chunk.status || "blocked" === chunk.status) { + response = chunk.value; + var rejectListeners = chunk.reason; + chunk.status = "resolved_module"; + chunk.value = value; + null !== response && + (initializeModuleChunk(chunk), + wakeChunkIfInitialized(chunk, response, rejectListeners)); + } +} +var initializingHandler = null; +function initializeModelChunk(chunk) { + var prevHandler = initializingHandler; + initializingHandler = null; + var resolvedModel = chunk.value, + response = chunk.reason; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + try { + var value = JSON.parse(resolvedModel, response._fromJSON), + resolveListeners = chunk.value; + if (null !== resolveListeners) + for ( + chunk.value = null, chunk.reason = null, resolvedModel = 0; + resolvedModel < resolveListeners.length; + resolvedModel++ + ) { + var listener = resolveListeners[resolvedModel]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + if (null !== initializingHandler) { + if (initializingHandler.errored) throw initializingHandler.reason; + if (0 < initializingHandler.deps) { + initializingHandler.value = value; + initializingHandler.chunk = chunk; + return; + } + } + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + initializingHandler = prevHandler; + } +} +function initializeModuleChunk(chunk) { + try { + var value = requireModule(chunk.value); + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } +} +function reportGlobalError(weakResponse, error) { + weakResponse._closed = !0; + weakResponse._closedReason = error; + weakResponse._chunks.forEach(function (chunk) { + "pending" === chunk.status && + triggerErrorOnChunk(weakResponse, chunk, error); + }); +} +function createLazyChunkWrapper(chunk) { + return { $$typeof: REACT_LAZY_TYPE, _payload: chunk, _init: readChunk }; +} +function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._closed + ? createErrorChunk(response, response._closedReason) + : new ReactPromise("pending", null, null)), + chunks.set(id, chunk)); + return chunk; +} +function fulfillReference(reference, value) { + for ( + var response = reference.response, + handler = reference.handler, + parentObject = reference.parentObject, + key = reference.key, + map = reference.map, + path = reference.path, + i = 1; + i < path.length; + i++ + ) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((value = value._payload), value === handler.chunk)) + value = handler.value; + else { + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + continue; + case "blocked": + var cyclicHandler = resolveBlockedCycle(value, reference); + if (null !== cyclicHandler) { + value = cyclicHandler.value; + continue; + } + case "pending": + path.splice(0, i - 1); + null === value.value + ? (value.value = [reference]) + : value.value.push(reference); + null === value.reason + ? (value.reason = [reference]) + : value.reason.push(reference); + return; + case "halted": + return; + default: + rejectReference(reference, value.reason); + return; + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((reference = value._payload), reference === handler.chunk)) + value = handler.value; + else { + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + value = reference.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + parentObject[key] = response; + "" === key && null === handler.value && (handler.value = response); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((parentObject = handler.value), key)) { + case "3": + parentObject.props = response; + } + handler.deps--; + 0 === handler.deps && + ((key = handler.chunk), + null !== key && + "blocked" === key.status && + ((parentObject = key.value), + (key.status = "fulfilled"), + (key.value = handler.value), + (key.reason = handler.reason), + null !== parentObject && wakeChunk(parentObject, handler.value))); +} +function rejectReference(reference, error) { + var handler = reference.handler; + reference = reference.response; + handler.errored || + ((handler.errored = !0), + (handler.value = null), + (handler.reason = error), + (handler = handler.chunk), + null !== handler && + "blocked" === handler.status && + triggerErrorOnChunk(reference, handler, error)); +} +function waitForReference( + referencedChunk, + parentObject, + key, + response, + map, + path +) { + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + parentObject = { + response: response, + handler: handler, + parentObject: parentObject, + key: key, + map: map, + path: path + }; + null === referencedChunk.value + ? (referencedChunk.value = [parentObject]) + : referencedChunk.value.push(parentObject); + null === referencedChunk.reason + ? (referencedChunk.reason = [parentObject]) + : referencedChunk.reason.push(parentObject); + return null; +} +function loadServerReference(response, metaData, parentObject, key) { + if (!response._serverReferenceConfig) + return createBoundServerReference( + metaData, + response._callServer, + response._encodeFormAction + ); + var serverReference = resolveServerReference( + response._serverReferenceConfig, + metaData.id + ), + promise = preloadModule(serverReference); + if (promise) + metaData.bound && (promise = Promise.all([promise, metaData.bound])); + else if (metaData.bound) promise = Promise.resolve(metaData.bound); + else + return ( + (promise = requireModule(serverReference)), + registerBoundServerReference( + promise, + metaData.id, + metaData.bound, + response._encodeFormAction + ), + promise + ); + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + promise.then( + function () { + var resolvedValue = requireModule(serverReference); + if (metaData.bound) { + var boundArgs = metaData.bound.value.slice(0); + boundArgs.unshift(null); + resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs); + } + registerBoundServerReference( + resolvedValue, + metaData.id, + metaData.bound, + response._encodeFormAction + ); + parentObject[key] = resolvedValue; + "" === key && null === handler.value && (handler.value = resolvedValue); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((boundArgs = handler.value), key)) { + case "3": + boundArgs.props = resolvedValue; + } + handler.deps--; + 0 === handler.deps && + ((resolvedValue = handler.chunk), + null !== resolvedValue && + "blocked" === resolvedValue.status && + ((boundArgs = resolvedValue.value), + (resolvedValue.status = "fulfilled"), + (resolvedValue.value = handler.value), + null !== boundArgs && wakeChunk(boundArgs, handler.value))); + }, + function (error) { + if (!handler.errored) { + handler.errored = !0; + handler.value = null; + handler.reason = error; + var chunk = handler.chunk; + null !== chunk && + "blocked" === chunk.status && + triggerErrorOnChunk(response, chunk, error); + } + } + ); + return null; +} +function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + break; + case "resolved_module": + initializeModuleChunk(id); + } + switch (id.status) { + case "fulfilled": + id = id.value; + for (var i = 1; i < reference.length; i++) { + for ( + ; + "object" === typeof id && + null !== id && + id.$$typeof === REACT_LAZY_TYPE; + + ) { + id = id._payload; + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + break; + case "resolved_module": + initializeModuleChunk(id); + } + switch (id.status) { + case "fulfilled": + id = id.value; + break; + case "blocked": + case "pending": + return waitForReference( + id, + parentObject, + key, + response, + map, + reference.slice(i - 1) + ); + case "halted": + return ( + initializingHandler + ? ((response = initializingHandler), response.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = id.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: id.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + (typeof id === "object" && id !== null && Object.prototype.hasOwnProperty.call(id, reference[i]) ? id = id[reference[i]] : (id = undefined)); + } + for ( + ; + "object" === typeof id && + null !== id && + id.$$typeof === REACT_LAZY_TYPE; + + ) { + reference = id._payload; + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + id = reference.value; + continue; + } + break; + } + return map(response, id, parentObject, key); + case "pending": + case "blocked": + return waitForReference(id, parentObject, key, response, map, reference); + case "halted": + return ( + initializingHandler + ? ((response = initializingHandler), response.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = id.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: id.reason, + deps: 0, + errored: !0 + }), + null + ); + } +} +function createMap(response, model) { + return new Map(model); +} +function createSet(response, model) { + return new Set(model); +} +function createBlob(response, model) { + return new Blob(model.slice(1), { type: model[0] }); +} +function createFormData(response, model) { + response = new FormData(); + for (var i = 0; i < model.length; i++) + response.append(model[i][0], model[i][1]); + return response; +} +function extractIterator(response, model) { + return model[Symbol.iterator](); +} +function createModel(response, model) { + return model; +} +function parseModelString(response, parentObject, key, value) { + if ("$" === value[0]) { + if ("$" === value) + return ( + null !== initializingHandler && + "0" === key && + (initializingHandler = { + parent: initializingHandler, + chunk: null, + value: null, + reason: null, + deps: 0, + errored: !1 + }), + REACT_ELEMENT_TYPE + ); + switch (value[1]) { + case "$": + return value.slice(1); + case "L": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + createLazyChunkWrapper(response) + ); + case "@": + return ( + (parentObject = parseInt(value.slice(2), 16)), + getChunk(response, parentObject) + ); + case "S": + return Symbol.for(value.slice(2)); + case "F": + return ( + (value = value.slice(2)), + getOutlinedModel( + response, + value, + parentObject, + key, + loadServerReference + ) + ); + case "T": + parentObject = "$" + value.slice(2); + response = response._tempRefs; + if (null == response) + throw Error( + "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply." + ); + return response.get(parentObject); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createSet) + ); + case "B": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createBlob) + ); + case "K": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createFormData) + ); + case "Z": + return resolveErrorProd(); + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + default: + return ( + (value = value.slice(1)), + getOutlinedModel(response, value, parentObject, key, createModel) + ); + } + } + return value; +} +function missingCall() { + throw Error( + 'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.' + ); +} +function ResponseInstance( + bundlerConfig, + serverReferenceConfig, + moduleLoading, + callServer, + encodeFormAction, + nonce, + temporaryReferences +) { + var chunks = new Map(); + this._bundlerConfig = bundlerConfig; + this._serverReferenceConfig = serverReferenceConfig; + this._moduleLoading = moduleLoading; + this._callServer = void 0 !== callServer ? callServer : missingCall; + this._encodeFormAction = encodeFormAction; + this._nonce = nonce; + this._chunks = chunks; + this._stringDecoder = new util.TextDecoder(); + this._fromJSON = null; + this._closed = !1; + this._closedReason = null; + this._tempRefs = temporaryReferences; + this._fromJSON = createFromJSONCallback(this); +} +function createStreamState() { + return { _rowState: 0, _rowID: 0, _rowTag: 0, _rowLength: 0, _buffer: [] }; +} +function resolveBuffer(response, id, buffer) { + response = response._chunks; + var chunk = response.get(id); + chunk && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : ((buffer = new ReactPromise("fulfilled", buffer, null)), + response.set(id, buffer)); +} +function resolveModule(response, id, model) { + var chunks = response._chunks, + chunk = chunks.get(id); + model = JSON.parse(model, response._fromJSON); + var clientReference = resolveClientReference(response._bundlerConfig, model); + prepareDestinationWithChunks( + response._moduleLoading, + model[1], + response._nonce + ); + if ((model = preloadModule(clientReference))) { + if (chunk) { + var blockedChunk = chunk; + blockedChunk.status = "blocked"; + } else + (blockedChunk = new ReactPromise("blocked", null, null)), + chunks.set(id, blockedChunk); + model.then( + function () { + return resolveModuleChunk(response, blockedChunk, clientReference); + }, + function (error) { + return triggerErrorOnChunk(response, blockedChunk, error); + } + ); + } else + chunk + ? resolveModuleChunk(response, chunk, clientReference) + : ((chunk = new ReactPromise("resolved_module", clientReference, null)), + chunks.set(id, chunk)); +} +function resolveStream(response, id, stream, controller) { + response = response._chunks; + var chunk = response.get(id); + chunk + ? "pending" === chunk.status && + ((id = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = stream), + (chunk.reason = controller), + null !== id && wakeChunk(id, chunk.value)) + : ((stream = new ReactPromise("fulfilled", stream, controller)), + response.set(id, stream)); +} +function startReadableStream(response, id, type) { + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, id, type, { + enqueueValue: function (value) { + null === previousBlockedChunk + ? controller.enqueue(value) + : previousBlockedChunk.then(function () { + controller.enqueue(value); + }); + }, + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new ReactPromise("resolved_model", json, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var chunk$54 = new ReactPromise("pending", null, null); + chunk$54.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = chunk$54; + chunk.then(function () { + previousBlockedChunk === chunk$54 && (previousBlockedChunk = null); + resolveModelChunk(response, chunk$54, json); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); +} +function asyncIterator() { + return this; +} +function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; +} +function startAsyncIterable(response, id, iterator) { + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = {}; + iterable[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new ReactPromise( + "fulfilled", + { done: !0, value: void 0 }, + null + ); + buffer[nextReadIndex] = new ReactPromise("pending", null, null); + } + return buffer[nextReadIndex++]; + }); + }; + resolveStream( + response, + id, + iterator ? iterable[ASYNC_ITERATOR]() : iterable, + { + enqueueValue: function (value) { + if (nextWriteIndex === buffer.length) + buffer[nextWriteIndex] = new ReactPromise( + "fulfilled", + { done: !1, value: value }, + null + ); + else { + var chunk = buffer[nextWriteIndex], + resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "fulfilled"; + chunk.value = { done: !1, value: value }; + null !== resolveListeners && + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners); + } + nextWriteIndex++; + }, + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !1 + ); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !0 + ); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + response, + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = new ReactPromise("pending", null, null)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(response, buffer[nextWriteIndex++], error); + } + } + ); +} +function resolveErrorProd() { + var error = Error( + "An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error." + ); + error.stack = "Error: " + error.message; + return error; +} +function mergeBuffer(buffer, lastChunk) { + for (var l = buffer.length, byteLength = lastChunk.length, i = 0; i < l; i++) + byteLength += buffer[i].byteLength; + byteLength = new Uint8Array(byteLength); + for (var i$55 = (i = 0); i$55 < l; i$55++) { + var chunk = buffer[i$55]; + byteLength.set(chunk, i); + i += chunk.byteLength; + } + byteLength.set(lastChunk, i); + return byteLength; +} +function resolveTypedArray( + response, + id, + buffer, + lastChunk, + constructor, + bytesPerElement +) { + buffer = + 0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement + ? lastChunk + : mergeBuffer(buffer, lastChunk); + constructor = new constructor( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength / bytesPerElement + ); + resolveBuffer(response, id, constructor); +} +function processFullBinaryRow(response, streamState, id, tag, buffer, chunk) { + switch (tag) { + case 65: + resolveBuffer(response, id, mergeBuffer(buffer, chunk).buffer); + return; + case 79: + resolveTypedArray(response, id, buffer, chunk, Int8Array, 1); + return; + case 111: + resolveBuffer( + response, + id, + 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk) + ); + return; + case 85: + resolveTypedArray(response, id, buffer, chunk, Uint8ClampedArray, 1); + return; + case 83: + resolveTypedArray(response, id, buffer, chunk, Int16Array, 2); + return; + case 115: + resolveTypedArray(response, id, buffer, chunk, Uint16Array, 2); + return; + case 76: + resolveTypedArray(response, id, buffer, chunk, Int32Array, 4); + return; + case 108: + resolveTypedArray(response, id, buffer, chunk, Uint32Array, 4); + return; + case 71: + resolveTypedArray(response, id, buffer, chunk, Float32Array, 4); + return; + case 103: + resolveTypedArray(response, id, buffer, chunk, Float64Array, 8); + return; + case 77: + resolveTypedArray(response, id, buffer, chunk, BigInt64Array, 8); + return; + case 109: + resolveTypedArray(response, id, buffer, chunk, BigUint64Array, 8); + return; + case 86: + resolveTypedArray(response, id, buffer, chunk, DataView, 1); + return; + } + for ( + var stringDecoder = response._stringDecoder, row = "", i = 0; + i < buffer.length; + i++ + ) + row += stringDecoder.decode(buffer[i], decoderOptions); + row += stringDecoder.decode(chunk); + processFullStringRow(response, streamState, id, tag, row); +} +function processFullStringRow(response, streamState, id, tag, row) { + switch (tag) { + case 73: + resolveModule(response, id, row); + break; + case 72: + id = row[0]; + row = row.slice(1); + response = JSON.parse(row, response._fromJSON); + row = ReactDOMSharedInternals.d; + switch (id) { + case "D": + row.D(response); + break; + case "C": + "string" === typeof response + ? row.C(response) + : row.C(response[0], response[1]); + break; + case "L": + id = response[0]; + streamState = response[1]; + 3 === response.length + ? row.L(id, streamState, response[2]) + : row.L(id, streamState); + break; + case "m": + "string" === typeof response + ? row.m(response) + : row.m(response[0], response[1]); + break; + case "X": + "string" === typeof response + ? row.X(response) + : row.X(response[0], response[1]); + break; + case "S": + "string" === typeof response + ? row.S(response) + : row.S( + response[0], + 0 === response[1] ? void 0 : response[1], + 3 === response.length ? response[2] : void 0 + ); + break; + case "M": + "string" === typeof response + ? row.M(response) + : row.M(response[0], response[1]); + } + break; + case 69: + streamState = response._chunks; + tag = streamState.get(id); + row = JSON.parse(row); + var error = resolveErrorProd(); + error.digest = row.digest; + tag + ? triggerErrorOnChunk(response, tag, error) + : ((response = createErrorChunk(response, error)), + streamState.set(id, response)); + break; + case 84: + response = response._chunks; + (streamState = response.get(id)) && "pending" !== streamState.status + ? streamState.reason.enqueueValue(row) + : ((row = new ReactPromise("fulfilled", row, null)), + response.set(id, row)); + break; + case 78: + case 68: + case 74: + case 87: + throw Error( + "Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client." + ); + case 82: + startReadableStream(response, id, void 0); + break; + case 114: + startReadableStream(response, id, "bytes"); + break; + case 88: + startAsyncIterable(response, id, !1); + break; + case 120: + startAsyncIterable(response, id, !0); + break; + case 67: + (id = response._chunks.get(id)) && + "fulfilled" === id.status && + id.reason.close("" === row ? '"$undefined"' : row); + break; + case 80: + streamState = Error( + "A Server Component was postponed. The reason is omitted in production builds to avoid leaking sensitive details." + ); + streamState.$$typeof = REACT_POSTPONE_TYPE; + streamState.stack = "Error: " + streamState.message; + row = response._chunks; + (tag = row.get(id)) + ? triggerErrorOnChunk(response, tag, streamState) + : ((response = createErrorChunk(response, streamState)), + row.set(id, response)); + break; + default: + (streamState = response._chunks), + (tag = streamState.get(id)) + ? resolveModelChunk(response, tag, row) + : ((response = new ReactPromise("resolved_model", row, response)), + streamState.set(id, response)); + } +} +function processBinaryChunk(weakResponse, streamState, chunk) { + for ( + var i = 0, + rowState = streamState._rowState, + rowID = streamState._rowID, + rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk[i++]; + 58 === lastIdx + ? (rowState = 1) + : (rowID = + (rowID << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk[i]; + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 35 === rowState || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk[i++]; + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf(10, i); + break; + case 4: + (lastIdx = i + rowLength), lastIdx > chunk.length && (lastIdx = -1); + } + var offset = chunk.byteOffset + i; + if (-1 < lastIdx) + (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)), + processFullBinaryRow( + weakResponse, + streamState, + rowID, + rowTag, + buffer, + rowLength + ), + (i = lastIdx), + 3 === rowState && i++, + (rowLength = rowID = rowTag = rowState = 0), + (buffer.length = 0); + else { + weakResponse = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i); + buffer.push(weakResponse); + rowLength -= weakResponse.byteLength; + break; + } + } + streamState._rowState = rowState; + streamState._rowID = rowID; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; +} +function createFromJSONCallback(response) { + return function (key, value) { + if ("string" === typeof value) + return parseModelString(response, this, key, value); + if ("object" === typeof value && null !== value) { + if (value[0] === REACT_ELEMENT_TYPE) { + if ( + ((key = { + $$typeof: REACT_ELEMENT_TYPE, + type: value[1], + key: value[2], + ref: null, + props: value[3] + }), + null !== initializingHandler) + ) + if ( + ((value = initializingHandler), + (initializingHandler = value.parent), + value.errored) + ) + (key = createErrorChunk(response, value.reason)), + (key = createLazyChunkWrapper(key)); + else if (0 < value.deps) { + var blockedChunk = new ReactPromise("blocked", null, null); + value.value = key; + value.chunk = blockedChunk; + key = createLazyChunkWrapper(blockedChunk); + } + } else key = value; + return key; + } + return value; + }; +} +function close(weakResponse) { + reportGlobalError(weakResponse, Error("Connection closed.")); +} +function noServerCall$1() { + throw Error( + "Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead." + ); +} +function createResponseFromOptions(options) { + return new ResponseInstance( + options.serverConsumerManifest.moduleMap, + options.serverConsumerManifest.serverModuleMap, + options.serverConsumerManifest.moduleLoading, + noServerCall$1, + options.encodeFormAction, + "string" === typeof options.nonce ? options.nonce : void 0, + options && options.temporaryReferences + ? options.temporaryReferences + : void 0 + ); +} +function startReadingFromStream$1(response, stream, onDone) { + function progress(_ref) { + var value = _ref.value; + if (_ref.done) return onDone(); + processBinaryChunk(response, streamState, value); + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response, e); + } + var streamState = createStreamState(), + reader = stream.getReader(); + reader.read().then(progress).catch(error); +} +function noServerCall() { + throw Error( + "Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead." + ); +} +function startReadingFromStream(response, stream, onEnd) { + var streamState = createStreamState(); + stream.on("data", function (chunk) { + if ("string" === typeof chunk) { + for ( + var i = 0, + rowState = streamState._rowState, + rowID = streamState._rowID, + rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk.charCodeAt(i++); + 58 === lastIdx + ? (rowState = 1) + : (rowID = + (rowID << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk.charCodeAt(i); + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk.charCodeAt(i++); + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf("\n", i); + break; + case 4: + if (84 !== rowTag) + throw Error( + "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams." + ); + if (rowLength < chunk.length || chunk.length > 3 * rowLength) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + lastIdx = chunk.length; + } + if (-1 < lastIdx) { + if (0 < buffer.length) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + i = chunk.slice(i, lastIdx); + processFullStringRow(response, streamState, rowID, rowTag, i); + i = lastIdx; + 3 === rowState && i++; + rowLength = rowID = rowTag = rowState = 0; + buffer.length = 0; + } else if (chunk.length !== i) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + } + streamState._rowState = rowState; + streamState._rowID = rowID; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + } else processBinaryChunk(response, streamState, chunk); + }); + stream.on("error", function (error) { + reportGlobalError(response, error); + }); + stream.on("end", onEnd); +} +exports.createFromFetch = function (promiseForResponse, options) { + var response = createResponseFromOptions(options); + promiseForResponse.then( + function (r) { + startReadingFromStream$1(response, r.body, close.bind(null, response)); + }, + function (e) { + reportGlobalError(response, e); + } + ); + return getChunk(response, 0); +}; +exports.createFromNodeStream = function ( + stream, + serverConsumerManifest, + options +) { + serverConsumerManifest = new ResponseInstance( + serverConsumerManifest.moduleMap, + serverConsumerManifest.serverModuleMap, + serverConsumerManifest.moduleLoading, + noServerCall, + options ? options.encodeFormAction : void 0, + options && "string" === typeof options.nonce ? options.nonce : void 0, + void 0 + ); + startReadingFromStream( + serverConsumerManifest, + stream, + close.bind(null, serverConsumerManifest) + ); + return getChunk(serverConsumerManifest, 0); +}; +exports.createFromReadableStream = function (stream, options) { + options = createResponseFromOptions(options); + startReadingFromStream$1(options, stream, close.bind(null, options)); + return getChunk(options, 0); +}; +exports.createServerReference = function (id) { + return createServerReference$1(id, noServerCall$1); +}; +exports.createTemporaryReferenceSet = function () { + return new Map(); +}; +exports.encodeReply = function (value, options) { + return new Promise(function (resolve, reject) { + var abort = processReply( + value, + "", + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + resolve, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(signal.reason); + else { + var listener = function () { + abort(signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + }); +}; +exports.registerServerReference = function (reference, id, encodeFormAction) { + registerBoundServerReference(reference, id, null, encodeFormAction); + return reference; +}; diff --git a/.socket/blob/068de91ceef97df88afab1f77c742ad5029635ea510d963aa14af68e85697737 b/.socket/blob/068de91ceef97df88afab1f77c742ad5029635ea510d963aa14af68e85697737 new file mode 100644 index 0000000..e8a9f1f --- /dev/null +++ b/.socket/blob/068de91ceef97df88afab1f77c742ad5029635ea510d963aa14af68e85697737 @@ -0,0 +1,5219 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-client.node.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function resolveClientReference(bundlerConfig, metadata) { + if (bundlerConfig) { + var moduleExports = bundlerConfig[metadata[0]]; + if ((bundlerConfig = moduleExports && (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0))) + moduleExports = bundlerConfig.name; + else { + bundlerConfig = moduleExports && moduleExports["*"]; + if (!bundlerConfig) + throw Error( + 'Could not find the module "' + + metadata[0] + + '" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.' + ); + moduleExports = metadata[2]; + } + return 4 === metadata.length + ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1] + : [bundlerConfig.id, bundlerConfig.chunks, moduleExports]; + } + return metadata; + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + i++ + ) { + var thenable = globalThis.__next_chunk_load__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function prepareDestinationWithChunks( + moduleLoading, + chunks, + nonce$jscomp$0 + ) { + if (null !== moduleLoading) + for (var i = 0; i < chunks.length; i++) { + var nonce = nonce$jscomp$0, + JSCompiler_temp_const = ReactDOMSharedInternals.d, + JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X, + JSCompiler_temp_const$jscomp$1 = moduleLoading.prefix + chunks[i]; + var JSCompiler_inline_result = moduleLoading.crossOrigin; + JSCompiler_inline_result = + "string" === typeof JSCompiler_inline_result + ? "use-credentials" === JSCompiler_inline_result + ? JSCompiler_inline_result + : "" + : void 0; + JSCompiler_temp_const$jscomp$0.call( + JSCompiler_temp_const, + JSCompiler_temp_const$jscomp$1, + { crossOrigin: JSCompiler_inline_result, nonce: nonce } + ); + } + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function processReply( + root, + formFieldPrefix, + temporaryReferences, + resolve, + reject + ) { + function serializeTypedArray(tag, typedArray) { + typedArray = new Blob([ + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ]); + var blobId = nextPartId++; + null === formData && (formData = new FormData()); + formData.append(formFieldPrefix + blobId, typedArray); + return "$" + tag + blobId.toString(16); + } + function serializeBinaryReader(reader) { + function progress(entry) { + entry.done + ? ((entry = nextPartId++), + data.append(formFieldPrefix + entry, new Blob(buffer)), + data.append( + formFieldPrefix + streamId, + '"$o' + entry.toString(16) + '"' + ), + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data)) + : (buffer.push(entry.value), + reader.read(new Uint8Array(1024)).then(progress, reject)); + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++, + buffer = []; + reader.read(new Uint8Array(1024)).then(progress, reject); + return "$r" + streamId.toString(16); + } + function serializeReader(reader) { + function progress(entry) { + if (entry.done) + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON); + reader.read().then(progress, reject); + } catch (x) { + reject(x); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + reader.read().then(progress, reject); + return "$R" + streamId.toString(16); + } + function serializeReadableStream(stream) { + try { + var binaryReader = stream.getReader({ mode: "byob" }); + } catch (x) { + return serializeReader(stream.getReader()); + } + return serializeBinaryReader(binaryReader); + } + function serializeAsyncIterable(iterable, iterator) { + function progress(entry) { + if (entry.done) { + if (void 0 === entry.value) + data.append(formFieldPrefix + streamId, "C"); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, "C" + partJSON); + } catch (x) { + reject(x); + return; + } + pendingParts--; + 0 === pendingParts && resolve(data); + } else + try { + var _partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, _partJSON); + iterator.next().then(progress, reject); + } catch (x$0) { + reject(x$0); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + iterable = iterable === iterator; + iterator.next().then(progress, reject); + return "$" + (iterable ? "x" : "X") + streamId.toString(16); + } + function resolveToJSON(key, value) { + var originalValue = this[key]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + ("Object" !== objectName(originalValue) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(this, key) + ) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(this, key) + )); + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) { + var parentReference = writtenObjects.get(this); + if (void 0 !== parentReference) + return ( + temporaryReferences.set(parentReference + ":" + key, value), + "$T" + ); + } + throw Error( + "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + case REACT_LAZY_TYPE: + originalValue = value._payload; + var init = value._init; + null === formData && (formData = new FormData()); + pendingParts++; + try { + parentReference = init(originalValue); + var lazyId = nextPartId++, + partJSON = serializeModel(parentReference, lazyId); + formData.append(formFieldPrefix + lazyId, partJSON); + return "$" + lazyId.toString(16); + } catch (x) { + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + pendingParts++; + var _lazyId = nextPartId++; + parentReference = function () { + try { + var _partJSON2 = serializeModel(value, _lazyId), + _data = formData; + _data.append(formFieldPrefix + _lazyId, _partJSON2); + pendingParts--; + 0 === pendingParts && resolve(_data); + } catch (reason) { + reject(reason); + } + }; + x.then(parentReference, parentReference); + return "$" + _lazyId.toString(16); + } + reject(x); + return null; + } finally { + pendingParts--; + } + } + if ("function" === typeof value.then) { + null === formData && (formData = new FormData()); + pendingParts++; + var promiseId = nextPartId++; + value.then(function (partValue) { + try { + var _partJSON3 = serializeModel(partValue, promiseId); + partValue = formData; + partValue.append(formFieldPrefix + promiseId, _partJSON3); + pendingParts--; + 0 === pendingParts && resolve(partValue); + } catch (reason) { + reject(reason); + } + }, reject); + return "$@" + promiseId.toString(16); + } + parentReference = writtenObjects.get(value); + if (void 0 !== parentReference) + if (modelRoot === value) modelRoot = null; + else return parentReference; + else + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference && + ((parentReference = parentReference + ":" + key), + writtenObjects.set(value, parentReference), + void 0 !== temporaryReferences && + temporaryReferences.set(parentReference, value))); + if (isArrayImpl(value)) return value; + if (value instanceof FormData) { + null === formData && (formData = new FormData()); + var _data3 = formData; + key = nextPartId++; + var prefix = formFieldPrefix + key + "_"; + value.forEach(function (originalValue, originalKey) { + _data3.append(prefix + originalKey, originalValue); + }); + return "$K" + key.toString(16); + } + if (value instanceof Map) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$Q" + key.toString(16) + ); + if (value instanceof Set) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$W" + key.toString(16) + ); + if (value instanceof ArrayBuffer) + return ( + (key = new Blob([value])), + (parentReference = nextPartId++), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + parentReference, key), + "$A" + parentReference.toString(16) + ); + if (value instanceof Int8Array) + return serializeTypedArray("O", value); + if (value instanceof Uint8Array) + return serializeTypedArray("o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray("U", value); + if (value instanceof Int16Array) + return serializeTypedArray("S", value); + if (value instanceof Uint16Array) + return serializeTypedArray("s", value); + if (value instanceof Int32Array) + return serializeTypedArray("L", value); + if (value instanceof Uint32Array) + return serializeTypedArray("l", value); + if (value instanceof Float32Array) + return serializeTypedArray("G", value); + if (value instanceof Float64Array) + return serializeTypedArray("g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray("M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray("m", value); + if (value instanceof DataView) return serializeTypedArray("V", value); + if ("function" === typeof Blob && value instanceof Blob) + return ( + null === formData && (formData = new FormData()), + (key = nextPartId++), + formData.append(formFieldPrefix + key, value), + "$B" + key.toString(16) + ); + if ((parentReference = getIteratorFn(value))) + return ( + (parentReference = parentReference.call(value)), + parentReference === value + ? ((key = nextPartId++), + (parentReference = serializeModel( + Array.from(parentReference), + key + )), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$i" + key.toString(16)) + : Array.from(parentReference) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(value); + parentReference = value[ASYNC_ITERATOR]; + if ("function" === typeof parentReference) + return serializeAsyncIterable(value, parentReference.call(value)); + parentReference = getPrototypeOf(value); + if ( + parentReference !== ObjectPrototype && + (null === parentReference || + null !== getPrototypeOf(parentReference)) + ) { + if (void 0 === temporaryReferences) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(this, key) + ); + return "$T"; + } + value.$$typeof === REACT_CONTEXT_TYPE + ? console.error( + "React Context Providers cannot be passed to Server Functions from the Client.%s", + describeObjectForErrorMessage(this, key) + ) + : "Object" !== objectName(value) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(this, key) + ) + : isSimpleObject(value) + ? Object.getOwnPropertySymbols && + ((parentReference = Object.getOwnPropertySymbols(value)), + 0 < parentReference.length && + console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s", + parentReference[0].description, + describeObjectForErrorMessage(this, key) + )) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(this, key) + ); + return value; + } + if ("string" === typeof value) { + if ("Z" === value[value.length - 1] && this[key] instanceof Date) + return "$D" + value; + key = "$" === value[0] ? "$" + value : value; + return key; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + parentReference = knownServerReferences.get(value); + if (void 0 !== parentReference) + return ( + (key = JSON.stringify( + { id: parentReference.id, bound: parentReference.bound }, + resolveToJSON + )), + null === formData && (formData = new FormData()), + (parentReference = nextPartId++), + formData.set(formFieldPrefix + parentReference, key), + "$F" + parentReference.toString(16) + ); + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again." + ); + } + if ("symbol" === typeof value) { + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported as an argument to a Server Function." + ); + } + function serializeModel(model, id) { + "object" === typeof model && + null !== model && + ((id = "$" + id.toString(16)), + writtenObjects.set(model, id), + void 0 !== temporaryReferences && temporaryReferences.set(id, model)); + modelRoot = model; + return JSON.stringify(model, resolveToJSON); + } + var nextPartId = 1, + pendingParts = 0, + formData = null, + writtenObjects = new WeakMap(), + modelRoot = root, + json = serializeModel(root, 0); + null === formData + ? resolve(json) + : (formData.set(formFieldPrefix + "0", json), + 0 === pendingParts && resolve(formData)); + return function () { + 0 < pendingParts && + ((pendingParts = 0), + null === formData ? resolve(json) : resolve(formData)); + }; + } + function encodeFormData(reference) { + var resolve, + reject, + thenable = new Promise(function (res, rej) { + resolve = res; + reject = rej; + }); + processReply( + reference, + "", + void 0, + function (body) { + if ("string" === typeof body) { + var data = new FormData(); + data.append("0", body); + body = data; + } + thenable.status = "fulfilled"; + thenable.value = body; + resolve(body); + }, + function (e) { + thenable.status = "rejected"; + thenable.reason = e; + reject(e); + } + ); + return thenable; + } + function defaultEncodeFormAction(identifierPrefix) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var data = null; + if (null !== referenceClosure.bound) { + data = boundCache.get(referenceClosure); + data || + ((data = encodeFormData({ + id: referenceClosure.id, + bound: referenceClosure.bound + })), + boundCache.set(referenceClosure, data)); + if ("rejected" === data.status) throw data.reason; + if ("fulfilled" !== data.status) throw data; + referenceClosure = data.value; + var prefixedData = new FormData(); + referenceClosure.forEach(function (value, key) { + prefixedData.append("$ACTION_" + identifierPrefix + ":" + key, value); + }); + data = prefixedData; + referenceClosure = "$ACTION_REF_" + identifierPrefix; + } else referenceClosure = "$ACTION_ID_" + referenceClosure.id; + return { + name: referenceClosure, + method: "POST", + encType: "multipart/form-data", + data: data + }; + } + function isSignatureEqual(referenceId, numberOfBoundArgs) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + if (referenceClosure.id !== referenceId) return !1; + var boundPromise = referenceClosure.bound; + if (null === boundPromise) return 0 === numberOfBoundArgs; + switch (boundPromise.status) { + case "fulfilled": + return boundPromise.value.length === numberOfBoundArgs; + case "pending": + throw boundPromise; + case "rejected": + throw boundPromise.reason; + default: + throw ( + ("string" !== typeof boundPromise.status && + ((boundPromise.status = "pending"), + boundPromise.then( + function (boundArgs) { + boundPromise.status = "fulfilled"; + boundPromise.value = boundArgs; + }, + function (error) { + boundPromise.status = "rejected"; + boundPromise.reason = error; + } + )), + boundPromise) + ); + } + } + function createFakeServerFunction( + name, + filename, + sourceMap, + line, + col, + environmentName, + innerFunction + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 >= line + ? ((line = encodedName.length + 7), + (col = + "s=>({" + + encodedName + + " ".repeat(col < line ? 0 : col - line) + + ":(...args) => s(...args)})\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */")) + : (col = + "/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */" + + "\n".repeat(line - 2) + + "server=>({" + + encodedName + + ":\n" + + " ".repeat(1 > col ? 0 : col - 1) + + "(...args) => server(...args)})"); + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((col += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?s" + + fakeServerFunctionIdx++), + (col += "\n//# sourceMappingURL=" + sourceMap)) + : filename && (col += "\n//# sourceURL=" + filename); + try { + return (0, eval)(col)(innerFunction)[name]; + } catch (x) { + return innerFunction; + } + } + function registerBoundServerReference( + reference, + id, + bound, + encodeFormAction + ) { + knownServerReferences.has(reference) || + (knownServerReferences.set(reference, { + id: id, + originalBind: reference.bind, + bound: bound + }), + Object.defineProperties(reference, { + $$FORM_ACTION: { + value: + void 0 === encodeFormAction + ? defaultEncodeFormAction + : function () { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var boundPromise = referenceClosure.bound; + null === boundPromise && + (boundPromise = Promise.resolve([])); + return encodeFormAction(referenceClosure.id, boundPromise); + } + }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + })); + } + function bind() { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) return FunctionBind.apply(this, arguments); + var newFn = referenceClosure.originalBind.apply(this, arguments); + null != arguments[0] && + console.error( + 'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().' + ); + var args = ArraySlice.call(arguments, 1), + boundPromise = null; + boundPromise = + null !== referenceClosure.bound + ? Promise.resolve(referenceClosure.bound).then(function (boundArgs) { + return boundArgs.concat(args); + }) + : Promise.resolve(args); + knownServerReferences.set(newFn, { + id: referenceClosure.id, + originalBind: newFn.bind, + bound: boundPromise + }); + Object.defineProperties(newFn, { + $$FORM_ACTION: { value: this.$$FORM_ACTION }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + }); + return newFn; + } + function createBoundServerReference( + metaData, + callServer, + encodeFormAction, + findSourceMapURL + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return bound + ? "fulfilled" === bound.status + ? callServer(id, bound.value.concat(args)) + : Promise.resolve(bound).then(function (boundArgs) { + return callServer(id, boundArgs.concat(args)); + }) + : callServer(id, args); + } + var id = metaData.id, + bound = metaData.bound, + location = metaData.location; + if (location) { + var functionName = metaData.name || "", + filename = location[1], + line = location[2]; + location = location[3]; + metaData = metaData.env || "Server"; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, metaData); + action = createFakeServerFunction( + functionName, + filename, + findSourceMapURL, + line, + location, + metaData, + action + ); + } + registerBoundServerReference(action, id, bound, encodeFormAction); + return action; + } + function parseStackLocation(error) { + error = error.stack; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + var endOfFirst = error.indexOf("\n"); + if (-1 !== endOfFirst) { + var endOfSecond = error.indexOf("\n", endOfFirst + 1); + endOfFirst = + -1 === endOfSecond + ? error.slice(endOfFirst + 1) + : error.slice(endOfFirst + 1, endOfSecond); + } else endOfFirst = error; + error = v8FrameRegExp.exec(endOfFirst); + if ( + !error && + ((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error) + ) + return null; + endOfFirst = error[1] || ""; + "" === endOfFirst && (endOfFirst = ""); + endOfSecond = error[2] || error[5] || ""; + "" === endOfSecond && (endOfSecond = ""); + return [ + endOfFirst, + endOfSecond, + +(error[3] || error[6]), + +(error[4] || error[7]) + ]; + } + function createServerReference$1( + id, + callServer, + encodeFormAction, + findSourceMapURL, + functionName + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return callServer(id, args); + } + var location = parseStackLocation(Error("react-stack-top-frame")); + if (null !== location) { + var filename = location[1], + line = location[2]; + location = location[3]; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, "Client"); + action = createFakeServerFunction( + functionName || "", + filename, + findSourceMapURL, + line, + location, + "Client", + action + ); + } + registerBoundServerReference(action, id, null, encodeFormAction); + return action; + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE + ? null + : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + 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"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ( + ("number" === typeof type.tag && + console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), + type.$$typeof) + ) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: + return ( + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" + ); + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) {} + } + return null; + } + function getArrayKind(array) { + for (var kind = 0, i = 0; i < array.length && 100 > i; i++) { + var value = array[i]; + if ("object" === typeof value && null !== value) + if ( + isArrayImpl(value) && + 2 === value.length && + "string" === typeof value[0] + ) { + if (0 !== kind && 3 !== kind) return 1; + kind = 3; + } else return 1; + else { + if ( + "function" === typeof value || + ("string" === typeof value && 50 < value.length) || + (0 !== kind && 2 !== kind) + ) + return 1; + kind = 2; + } + } + return kind; + } + function addObjectToProperties(object, properties, indent, prefix) { + var addedProperties = 0, + key; + for (key in object) + if ( + hasOwnProperty.call(object, key) && + "_" !== key[0] && + (addedProperties++, + addValueToProperties(key, object[key], properties, indent, prefix), + 100 <= addedProperties) + ) { + properties.push([ + prefix + + "\u00a0\u00a0".repeat(indent) + + "Only 100 properties are shown. React will not log more properties of this object.", + "" + ]); + break; + } + } + function addValueToProperties( + propertyName, + value, + properties, + indent, + prefix + ) { + switch (typeof value) { + case "object": + if (null === value) { + value = "null"; + break; + } else { + if (value.$$typeof === REACT_ELEMENT_TYPE) { + var typeName = getComponentNameFromType(value.type) || "\u2026", + key = value.key; + value = value.props; + var propsKeys = Object.keys(value), + propsLength = propsKeys.length; + if (null == key && 0 === propsLength) { + value = "<" + typeName + " />"; + break; + } + if ( + 3 > indent || + (1 === propsLength && + "children" === propsKeys[0] && + null == key) + ) { + value = "<" + typeName + " \u2026 />"; + break; + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "<" + typeName + ]); + null !== key && + addValueToProperties( + "key", + key, + properties, + indent + 1, + prefix + ); + propertyName = !1; + key = 0; + for (var propKey in value) + if ( + (key++, + "children" === propKey + ? null != value.children && + (!isArrayImpl(value.children) || + 0 < value.children.length) && + (propertyName = !0) + : hasOwnProperty.call(value, propKey) && + "_" !== propKey[0] && + addValueToProperties( + propKey, + value[propKey], + properties, + indent + 1, + prefix + ), + 100 <= key) + ) + break; + properties.push([ + "", + propertyName ? ">\u2026" : "/>" + ]); + return; + } + typeName = Object.prototype.toString.call(value); + propKey = typeName.slice(8, typeName.length - 1); + if ("Array" === propKey) + if ( + ((typeName = 100 < value.length), + (key = getArrayKind(value)), + 2 === key || 0 === key) + ) { + value = JSON.stringify( + typeName ? value.slice(0, 100).concat("\u2026") : value + ); + break; + } else if (3 === key) { + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "" + ]); + for ( + propertyName = 0; + propertyName < value.length && 100 > propertyName; + propertyName++ + ) + (propKey = value[propertyName]), + addValueToProperties( + propKey[0], + propKey[1], + properties, + indent + 1, + prefix + ); + typeName && + addValueToProperties( + (100).toString(), + "\u2026", + properties, + indent + 1, + prefix + ); + return; + } + if ("Promise" === propKey) { + if ("fulfilled" === value.status) { + if ( + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.value, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = + "Promise<" + (properties[1] || "Object") + ">"; + return; + } + } else if ( + "rejected" === value.status && + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.reason, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = "Rejected Promise<" + properties[1] + ">"; + return; + } + properties.push([ + "\u00a0\u00a0".repeat(indent) + propertyName, + "Promise" + ]); + return; + } + "Object" === propKey && + (typeName = Object.getPrototypeOf(value)) && + "function" === typeof typeName.constructor && + (propKey = typeName.constructor.name); + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "Object" === propKey ? (3 > indent ? "" : "\u2026") : propKey + ]); + 3 > indent && + addObjectToProperties(value, properties, indent + 1, prefix); + return; + } + case "function": + value = "" === value.name ? "() => {}" : value.name + "() {}"; + break; + case "string": + value = + "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects." === + value + ? "\u2026" + : JSON.stringify(value); + break; + case "undefined": + value = "undefined"; + break; + case "boolean": + value = value ? "true" : "false"; + break; + default: + value = String(value); + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + value + ]); + } + function getIODescription(value) { + try { + switch (typeof value) { + case "function": + return value.name || ""; + case "object": + if (null === value) return ""; + if (value instanceof Error) return String(value.message); + if ("string" === typeof value.url) return value.url; + if ("string" === typeof value.href) return value.href; + if ("string" === typeof value.src) return value.src; + if ("string" === typeof value.currentSrc) return value.currentSrc; + if ("string" === typeof value.command) return value.command; + if ( + "object" === typeof value.request && + null !== value.request && + "string" === typeof value.request.url + ) + return value.request.url; + if ( + "object" === typeof value.response && + null !== value.response && + "string" === typeof value.response.url + ) + return value.response.url; + if ( + "string" === typeof value.id || + "number" === typeof value.id || + "bigint" === typeof value.id + ) + return String(value.id); + if ("string" === typeof value.name) return value.name; + var str = value.toString(); + return str.startsWith("[object ") || + 5 > str.length || + 500 < str.length + ? "" + : str; + case "string": + return 5 > value.length || 500 < value.length ? "" : value; + case "number": + case "bigint": + return String(value); + default: + return ""; + } + } catch (x) { + return ""; + } + } + function markAllTracksInOrder() { + supportsUserTiming && + (console.timeStamp( + "Server Requests Track", + 0.001, + 0.001, + "Server Requests \u269b", + void 0, + "primary-light" + ), + console.timeStamp( + "Server Components Track", + 0.001, + 0.001, + "Primary", + "Server Components \u269b", + "primary-light" + )); + } + function getIOColor(functionName) { + switch (functionName.charCodeAt(0) % 3) { + case 0: + return "tertiary-light"; + case 1: + return "tertiary"; + default: + return "tertiary-dark"; + } + } + function getIOLongName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + description = + "" === description ? ioInfo : ioInfo + " (" + description + ")"; + return env === rootEnv || void 0 === env + ? description + : description + " [" + env + "]"; + } + function getIOShortName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + env = env === rootEnv || void 0 === env ? "" : " [" + env + "]"; + var desc = ""; + rootEnv = 30 - ioInfo.length - env.length; + if (1 < rootEnv) { + var l = description.length; + if (0 < l && l <= rootEnv) desc = " (" + description + ")"; + else if ( + description.startsWith("http://") || + description.startsWith("https://") || + description.startsWith("/") + ) { + var queryIdx = description.indexOf("?"); + -1 === queryIdx && (queryIdx = description.length); + 47 === description.charCodeAt(queryIdx - 1) && queryIdx--; + desc = description.lastIndexOf("/", queryIdx - 1); + queryIdx - desc < rootEnv + ? (desc = " (\u2026" + description.slice(desc, queryIdx) + ")") + : ((l = description.slice(desc, desc + rootEnv / 2)), + (description = description.slice( + queryIdx - rootEnv / 2, + queryIdx + )), + (desc = + " (" + + (0 < desc ? "\u2026" : "") + + l + + "\u2026" + + description + + ")")); + } + } + return ioInfo + desc + env; + } + function logComponentAwait( + asyncInfo, + trackIdx, + startTime, + endTime, + rootEnv, + value + ) { + if (supportsUserTiming && 0 < endTime) { + var description = getIODescription(value), + name = getIOShortName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ), + entryName = "await " + name; + name = getIOColor(name); + var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("awaited value", value, properties, 0, ""); + asyncInfo = getIOLongName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: name, + track: trackNames[trackIdx], + trackGroup: "Server Components \u269b", + properties: properties, + tooltipText: asyncInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + trackNames[trackIdx], + "Server Components \u269b", + name + ); + } + } + function logIOInfoErrored(ioInfo, rootEnv, error) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(error), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + debugTask + ? ((error = [ + [ + "rejected with", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]), + (ioInfo = + getIOLongName(ioInfo, description, ioInfo.env, rootEnv) + + " Rejected"), + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: "Server Requests \u269b", + properties: error, + tooltipText: ioInfo + } + } + }) + ), + performance.clearMeasures(entryName)) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + "error" + ); + } + } + function logIOInfo(ioInfo, rootEnv, value) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(value), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + color = getIOColor(entryName), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("Resolved", value, properties, 0, ""); + ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: color, + track: "Server Requests \u269b", + properties: properties, + tooltipText: ioInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + color + ); + } + } + function prepareStackTrace(error, structuredStackTrace) { + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function ReactPromise(status, value, reason) { + this.status = status; + this.value = value; + this.reason = reason; + this._children = []; + this._debugChunk = null; + this._debugInfo = []; + } + function unwrapWeakResponse(weakResponse) { + weakResponse = weakResponse.weak.deref(); + if (void 0 === weakResponse) + throw Error( + "We did not expect to receive new data after GC:ing the response." + ); + return weakResponse; + } + function closeDebugChannel(debugChannel) { + debugChannel.callback && debugChannel.callback(""); + } + function readChunk(chunk) { + switch (chunk.status) { + case "resolved_model": + initializeModelChunk(chunk); + break; + case "resolved_module": + initializeModuleChunk(chunk); + } + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "pending": + case "blocked": + case "halted": + throw chunk; + default: + throw chunk.reason; + } + } + function getRoot(weakResponse) { + weakResponse = unwrapWeakResponse(weakResponse); + return getChunk(weakResponse, 0); + } + function createPendingChunk(response) { + 0 === response._pendingChunks++ && + ((response._weakResponse.response = response), + null !== response._pendingInitialRender && + (clearTimeout(response._pendingInitialRender), + (response._pendingInitialRender = null))); + return new ReactPromise("pending", null, null); + } + function releasePendingChunk(response, chunk) { + "pending" === chunk.status && + 0 === --response._pendingChunks && + ((response._weakResponse.response = null), + (response._pendingInitialRender = setTimeout( + flushInitialRenderPerformance.bind(null, response), + 100 + ))); + } + function createErrorChunk(response, error) { + return new ReactPromise("rejected", null, error); + } + function moveDebugInfoFromChunkToInnerValue(chunk, value) { + value = resolveLazy(value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) || + ((chunk = chunk._debugInfo.splice(0)), + isArrayImpl(value._debugInfo) + ? value._debugInfo.unshift.apply(value._debugInfo, chunk) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: chunk + })); + } + function wakeChunk(listeners, value, chunk) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + moveDebugInfoFromChunkToInnerValue(chunk, value); + } + function rejectChunk(listeners, error) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(error) + : rejectReference(listener, error); + } + } + function resolveBlockedCycle(resolvedChunk, reference) { + var referencedChunk = reference.handler.chunk; + if (null === referencedChunk) return null; + if (referencedChunk === resolvedChunk) return reference.handler; + reference = referencedChunk.value; + if (null !== reference) + for ( + referencedChunk = 0; + referencedChunk < reference.length; + referencedChunk++ + ) { + var listener = reference[referencedChunk]; + if ( + "function" !== typeof listener && + ((listener = resolveBlockedCycle(resolvedChunk, listener)), + null !== listener) + ) + return listener; + } + return null; + } + function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) { + switch (chunk.status) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + break; + case "blocked": + for (var i = 0; i < resolveListeners.length; i++) { + var listener = resolveListeners[i]; + if ("function" !== typeof listener) { + var cyclicHandler = resolveBlockedCycle(chunk, listener); + if (null !== cyclicHandler) + switch ( + (fulfillReference(listener, cyclicHandler.value, chunk), + resolveListeners.splice(i, 1), + i--, + null !== rejectListeners && + ((listener = rejectListeners.indexOf(listener)), + -1 !== listener && rejectListeners.splice(listener, 1)), + chunk.status) + ) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + return; + case "rejected": + null !== rejectListeners && + rejectChunk(rejectListeners, chunk.reason); + return; + } + } + } + case "pending": + if (chunk.value) + for (i = 0; i < resolveListeners.length; i++) + chunk.value.push(resolveListeners[i]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for ( + resolveListeners = 0; + resolveListeners < rejectListeners.length; + resolveListeners++ + ) + chunk.reason.push(rejectListeners[resolveListeners]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && rejectChunk(rejectListeners, chunk.reason); + } + } + function triggerErrorOnChunk(response, chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + releasePendingChunk(response, chunk); + var listeners = chunk.reason; + if ("pending" === chunk.status && null != chunk._debugChunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + initializeDebugChunk(response, chunk); + } finally { + (initializingHandler = prevHandler), + (initializingChunk = prevChunk); + } + } + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && rejectChunk(listeners, error); + } + } + function createResolvedModelChunk(response, value) { + return new ReactPromise("resolved_model", value, response); + } + function createResolvedIteratorResultChunk(response, value, done) { + return new ReactPromise( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + response + ); + } + function resolveIteratorResultChunk(response, chunk, value, done) { + resolveModelChunk( + response, + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}" + ); + } + function resolveModelChunk(response, chunk, value) { + if ("pending" !== chunk.status) chunk.reason.enqueueModel(value); + else { + releasePendingChunk(response, chunk); + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = response; + null !== resolveListeners && + (initializeModelChunk(chunk), + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners)); + } + } + function resolveModuleChunk(response, chunk, value) { + if ("pending" === chunk.status || "blocked" === chunk.status) { + releasePendingChunk(response, chunk); + response = chunk.value; + var rejectListeners = chunk.reason; + chunk.status = "resolved_module"; + chunk.value = value; + value = []; + null !== value && chunk._debugInfo.push.apply(chunk._debugInfo, value); + null !== response && + (initializeModuleChunk(chunk), + wakeChunkIfInitialized(chunk, response, rejectListeners)); + } + } + function initializeDebugChunk(response, chunk) { + var debugChunk = chunk._debugChunk; + if (null !== debugChunk) { + var debugInfo = chunk._debugInfo; + try { + if ("resolved_model" === debugChunk.status) { + for ( + var idx = debugInfo.length, c = debugChunk._debugChunk; + null !== c; + + ) + "fulfilled" !== c.status && idx++, (c = c._debugChunk); + initializeModelChunk(debugChunk); + switch (debugChunk.status) { + case "fulfilled": + debugInfo[idx] = initializeDebugInfo( + response, + debugChunk.value + ); + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + debugInfo, + "" + idx, + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } else + switch (debugChunk.status) { + case "fulfilled": + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + {}, + "debug", + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } catch (error) { + triggerErrorOnChunk(response, chunk, error); + } + } + } + function initializeModelChunk(chunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + var resolvedModel = chunk.value, + response = chunk.reason; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + initializeDebugChunk(response, chunk); + try { + var value = JSON.parse(resolvedModel, response._fromJSON), + resolveListeners = chunk.value; + if (null !== resolveListeners) + for ( + chunk.value = null, chunk.reason = null, resolvedModel = 0; + resolvedModel < resolveListeners.length; + resolvedModel++ + ) { + var listener = resolveListeners[resolvedModel]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + if (null !== initializingHandler) { + if (initializingHandler.errored) throw initializingHandler.reason; + if (0 < initializingHandler.deps) { + initializingHandler.value = value; + initializingHandler.chunk = chunk; + return; + } + } + chunk.status = "fulfilled"; + chunk.value = value; + moveDebugInfoFromChunkToInnerValue(chunk, value); + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingHandler = prevHandler), (initializingChunk = prevChunk); + } + } + function initializeModuleChunk(chunk) { + try { + var value = requireModule(chunk.value); + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } + } + function reportGlobalError(weakResponse, error) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse); + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && + triggerErrorOnChunk(response, chunk, error); + }); + weakResponse = response._debugChannel; + void 0 !== weakResponse && + (closeDebugChannel(weakResponse), + (response._debugChannel = void 0), + null !== debugChannelRegistry && + debugChannelRegistry.unregister(response)); + } + } + function nullRefGetter() { + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("function" === typeof type) return '"use client"'; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return type._init === readChunk ? '"use client"' : "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function initializeElement(response, element, lazyNode) { + var stack = element._debugStack, + owner = element._owner; + null === owner && (element._owner = response._debugRootOwner); + var env = response._rootEnvironmentName; + null !== owner && null != owner.env && (env = owner.env); + var normalizedStackTrace = null; + null === owner && null != response._debugRootStack + ? (normalizedStackTrace = response._debugRootStack) + : null !== stack && + (normalizedStackTrace = createFakeJSXCallStackInDEV( + response, + stack, + env + )); + element._debugStack = normalizedStackTrace; + normalizedStackTrace = null; + supportsCreateTask && + null !== stack && + ((normalizedStackTrace = console.createTask.bind( + console, + getTaskName(element.type) + )), + (stack = buildFakeCallStack( + response, + stack, + env, + !1, + normalizedStackTrace + )), + (env = null === owner ? null : initializeFakeTask(response, owner)), + null === env + ? ((env = response._debugRootTask), + (normalizedStackTrace = null != env ? env.run(stack) : stack())) + : (normalizedStackTrace = env.run(stack))); + element._debugTask = normalizedStackTrace; + null !== owner && initializeFakeStack(response, owner); + null !== lazyNode && + (lazyNode._store && + lazyNode._store.validated && + !element._store.validated && + (element._store.validated = lazyNode._store.validated), + "fulfilled" === lazyNode._payload.status && + lazyNode._debugInfo && + ((response = lazyNode._debugInfo.splice(0)), + element._debugInfo + ? element._debugInfo.unshift.apply(element._debugInfo, response) + : Object.defineProperty(element, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: response + }))); + Object.freeze(element.props); + } + function createLazyChunkWrapper(chunk, validated) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: chunk, + _init: readChunk + }; + lazyType._debugInfo = chunk._debugInfo; + lazyType._store = { validated: validated }; + return lazyType; + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._closed + ? createErrorChunk(response, response._closedReason) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function fulfillReference(reference, value, fulfilledChunk) { + for ( + var response = reference.response, + handler = reference.handler, + parentObject = reference.parentObject, + key = reference.key, + map = reference.map, + path = reference.path, + i = 1; + i < path.length; + i++ + ) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((value = value._payload), value === handler.chunk)) + value = handler.value; + else { + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + continue; + case "blocked": + var cyclicHandler = resolveBlockedCycle(value, reference); + if (null !== cyclicHandler) { + value = cyclicHandler.value; + continue; + } + case "pending": + path.splice(0, i - 1); + null === value.value + ? (value.value = [reference]) + : value.value.push(reference); + null === value.reason + ? (value.reason = [reference]) + : value.reason.push(reference); + return; + case "halted": + return; + default: + rejectReference(reference, value.reason); + return; + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((path = value._payload), path === handler.chunk)) + value = handler.value; + else { + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + parentObject[key] = response; + "" === key && null === handler.value && (handler.value = response); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((reference = handler.value), key)) { + case "3": + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + reference.props = response; + break; + case "4": + reference._owner = response; + break; + case "5": + reference._debugStack = response; + break; + default: + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + } + else + reference.isDebug || + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + handler.deps--; + 0 === handler.deps && + ((fulfilledChunk = handler.chunk), + null !== fulfilledChunk && + "blocked" === fulfilledChunk.status && + ((key = fulfilledChunk.value), + (fulfilledChunk.status = "fulfilled"), + (fulfilledChunk.value = handler.value), + (fulfilledChunk.reason = handler.reason), + null !== key + ? wakeChunk(key, handler.value, fulfilledChunk) + : moveDebugInfoFromChunkToInnerValue( + fulfilledChunk, + handler.value + ))); + } + function rejectReference(reference, error) { + var handler = reference.handler; + reference = reference.response; + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + handler = handler.chunk; + if (null !== handler && "blocked" === handler.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + handler._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(reference, handler, error); + } + } + } + function waitForReference( + referencedChunk, + parentObject, + key, + response, + map, + path, + isAwaitingDebugInfo + ) { + if ( + !( + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + "pending" !== referencedChunk.status || + parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key) + ) + ) + return null; + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + parentObject = { + response: response, + handler: handler, + parentObject: parentObject, + key: key, + map: map, + path: path + }; + parentObject.isDebug = isAwaitingDebugInfo; + null === referencedChunk.value + ? (referencedChunk.value = [parentObject]) + : referencedChunk.value.push(parentObject); + null === referencedChunk.reason + ? (referencedChunk.reason = [parentObject]) + : referencedChunk.reason.push(parentObject); + return null; + } + function loadServerReference(response, metaData, parentObject, key) { + if (!response._serverReferenceConfig) + return createBoundServerReference( + metaData, + response._callServer, + response._encodeFormAction, + response._debugFindSourceMapURL + ); + var serverReference = resolveServerReference( + response._serverReferenceConfig, + metaData.id + ), + promise = preloadModule(serverReference); + if (promise) + metaData.bound && (promise = Promise.all([promise, metaData.bound])); + else if (metaData.bound) promise = Promise.resolve(metaData.bound); + else + return ( + (promise = requireModule(serverReference)), + registerBoundServerReference( + promise, + metaData.id, + metaData.bound, + response._encodeFormAction + ), + promise + ); + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + promise.then( + function () { + var resolvedValue = requireModule(serverReference); + if (metaData.bound) { + var boundArgs = metaData.bound.value.slice(0); + boundArgs.unshift(null); + resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs); + } + registerBoundServerReference( + resolvedValue, + metaData.id, + metaData.bound, + response._encodeFormAction + ); + parentObject[key] = resolvedValue; + "" === key && + null === handler.value && + (handler.value = resolvedValue); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((boundArgs = handler.value), key)) { + case "3": + boundArgs.props = resolvedValue; + break; + case "4": + boundArgs._owner = resolvedValue; + } + handler.deps--; + 0 === handler.deps && + ((resolvedValue = handler.chunk), + null !== resolvedValue && + "blocked" === resolvedValue.status && + ((boundArgs = resolvedValue.value), + (resolvedValue.status = "fulfilled"), + (resolvedValue.value = handler.value), + null !== boundArgs + ? wakeChunk(boundArgs, handler.value, resolvedValue) + : moveDebugInfoFromChunkToInnerValue( + resolvedValue, + handler.value + ))); + }, + function (error) { + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + var chunk = handler.chunk; + if (null !== chunk && "blocked" === chunk.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + chunk._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(response, chunk, error); + } + } + } + ); + return null; + } + function resolveLazy(value) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + var payload = value._payload; + if ("fulfilled" === payload.status) value = payload.value; + else break; + } + return value; + } + function transferReferencedDebugInfo(parentChunk, referencedChunk) { + if (null !== parentChunk) { + referencedChunk = referencedChunk._debugInfo; + parentChunk = parentChunk._debugInfo; + for (var i = 0; i < referencedChunk.length; ++i) { + var debugInfoEntry = referencedChunk[i]; + null == debugInfoEntry.name && parentChunk.push(debugInfoEntry); + } + } + } + function getOutlinedModel(response, reference, parentObject, key, map) { + var path = reference.split(":"); + reference = parseInt(path[0], 16); + reference = getChunk(response, reference); + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(reference); + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + for (var value = reference.value, i = 1; i < path.length; i++) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + value = value._payload; + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + break; + case "blocked": + case "pending": + return waitForReference( + value, + parentObject, + key, + response, + map, + path.slice(i - 1), + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), + parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = value.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: value.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + path = value._payload; + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + (parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key)) && + transferReferencedDebugInfo(initializingChunk, reference); + return response; + case "pending": + case "blocked": + return waitForReference( + reference, + parentObject, + key, + response, + map, + path, + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = reference.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: reference.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function createBlob(response, model) { + return new Blob(model.slice(1), { type: model[0] }); + } + function createFormData(response, model) { + response = new FormData(); + for (var i = 0; i < model.length; i++) + response.append(model[i][0], model[i][1]); + return response; + } + function applyConstructor(response, model, parentObject) { + Object.setPrototypeOf(parentObject, model.prototype); + } + function defineLazyGetter(response, chunk, parentObject, key) { + Object.defineProperty(parentObject, key, { + get: function () { + "resolved_model" === chunk.status && initializeModelChunk(chunk); + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "rejected": + throw chunk.reason; + } + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function getInferredFunctionApproximate(code) { + code = code.startsWith("Object.defineProperty(") + ? code.slice(22) + : code.startsWith("(") + ? code.slice(1) + : code; + if (code.startsWith("async function")) { + var idx = code.indexOf("(", 14); + if (-1 !== idx) + return ( + (code = code.slice(14, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":async function(){}})")[ + code + ] + ); + } else if (code.startsWith("function")) { + if (((idx = code.indexOf("(", 8)), -1 !== idx)) + return ( + (code = code.slice(8, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":function(){}})")[code] + ); + } else if ( + code.startsWith("class") && + ((idx = code.indexOf("{", 5)), -1 !== idx) + ) + return ( + (code = code.slice(5, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":class{}})")[code] + ); + return function () {}; + } + function parseModelString(response, parentObject, key, value) { + if ("$" === value[0]) { + if ("$" === value) + return ( + null !== initializingHandler && + "0" === key && + (initializingHandler = { + parent: initializingHandler, + chunk: null, + value: null, + reason: null, + deps: 0, + errored: !1 + }), + REACT_ELEMENT_TYPE + ); + switch (value[1]) { + case "$": + return value.slice(1); + case "L": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + createLazyChunkWrapper(response, 0) + ); + case "@": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + response + ); + case "S": + return Symbol.for(value.slice(2)); + case "F": + var ref = value.slice(2); + return getOutlinedModel( + response, + ref, + parentObject, + key, + loadServerReference + ); + case "T": + parentObject = "$" + value.slice(2); + response = response._tempRefs; + if (null == response) + throw Error( + "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply." + ); + return response.get(parentObject); + case "Q": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createMap) + ); + case "W": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createSet) + ); + case "B": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createBlob) + ); + case "K": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createFormData) + ); + case "Z": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + resolveErrorDev + ) + ); + case "i": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + extractIterator + ) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + case "P": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + applyConstructor + ) + ); + case "E": + response = value.slice(2); + try { + if (!mightHaveStaticConstructor.test(response)) + return (0, eval)(response); + } catch (x) {} + try { + if ( + ((ref = getInferredFunctionApproximate(response)), + response.startsWith("Object.defineProperty(")) + ) { + var idx = response.lastIndexOf(',"name",{value:"'); + if (-1 !== idx) { + var name = JSON.parse( + response.slice(idx + 16 - 1, response.length - 2) + ); + Object.defineProperty(ref, "name", { value: name }); + } + } + } catch (_) { + ref = function () {}; + } + return ref; + case "Y": + if ( + 2 < value.length && + (ref = response._debugChannel && response._debugChannel.callback) + ) { + if ("@" === value[2]) + return ( + (parentObject = value.slice(3)), + (key = parseInt(parentObject, 16)), + response._chunks.has(key) || ref("P:" + parentObject), + getChunk(response, key) + ); + value = value.slice(2); + idx = parseInt(value, 16); + response._chunks.has(idx) || ref("Q:" + value); + ref = getChunk(response, idx); + return "fulfilled" === ref.status + ? ref.value + : defineLazyGetter(response, ref, parentObject, key); + } + Object.defineProperty(parentObject, key, { + get: function () { + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + default: + return ( + (ref = value.slice(1)), + getOutlinedModel(response, ref, parentObject, key, createModel) + ); + } + } + return value; + } + function missingCall() { + throw Error( + 'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.' + ); + } + function markIOStarted() { + this._debugIOStarted = !0; + } + function ResponseInstance( + bundlerConfig, + serverReferenceConfig, + moduleLoading, + callServer, + encodeFormAction, + nonce, + temporaryReferences, + findSourceMapURL, + replayConsole, + environmentName, + debugStartTime, + debugChannel + ) { + var chunks = new Map(); + this._bundlerConfig = bundlerConfig; + this._serverReferenceConfig = serverReferenceConfig; + this._moduleLoading = moduleLoading; + this._callServer = void 0 !== callServer ? callServer : missingCall; + this._encodeFormAction = encodeFormAction; + this._nonce = nonce; + this._chunks = chunks; + this._stringDecoder = new util.TextDecoder(); + this._fromJSON = null; + this._closed = !1; + this._closedReason = null; + this._tempRefs = temporaryReferences; + this._timeOrigin = 0; + this._pendingInitialRender = null; + this._pendingChunks = 0; + this._weakResponse = { weak: new WeakRef(this), response: this }; + this._debugRootOwner = bundlerConfig = + void 0 === ReactSharedInteralsServer || + null === ReactSharedInteralsServer.A + ? null + : ReactSharedInteralsServer.A.getOwner(); + this._debugRootStack = + null !== bundlerConfig ? Error("react-stack-top-frame") : null; + environmentName = void 0 === environmentName ? "Server" : environmentName; + supportsCreateTask && + (this._debugRootTask = console.createTask( + '"use ' + environmentName.toLowerCase() + '"' + )); + this._debugStartTime = + null == debugStartTime ? performance.now() : debugStartTime; + this._debugIOStarted = !1; + setTimeout(markIOStarted.bind(this), 0); + this._debugFindSourceMapURL = findSourceMapURL; + this._debugChannel = debugChannel; + this._blockedConsole = null; + this._replayConsole = replayConsole; + this._rootEnvironmentName = environmentName; + debugChannel && + (null === debugChannelRegistry + ? (closeDebugChannel(debugChannel), (this._debugChannel = void 0)) + : debugChannelRegistry.register(this, debugChannel, this)); + replayConsole && markAllTracksInOrder(); + this._fromJSON = createFromJSONCallback(this); + } + function createStreamState(weakResponse, streamDebugValue) { + var streamState = { + _rowState: 0, + _rowID: 0, + _rowTag: 0, + _rowLength: 0, + _buffer: [] + }; + weakResponse = unwrapWeakResponse(weakResponse); + var debugValuePromise = Promise.resolve(streamDebugValue); + debugValuePromise.status = "fulfilled"; + debugValuePromise.value = streamDebugValue; + streamState._debugInfo = { + name: "rsc stream", + start: weakResponse._debugStartTime, + end: weakResponse._debugStartTime, + byteSize: 0, + value: debugValuePromise, + owner: weakResponse._debugRootOwner, + debugStack: weakResponse._debugRootStack, + debugTask: weakResponse._debugRootTask + }; + streamState._debugTargetChunkSize = MIN_CHUNK_SIZE; + return streamState; + } + function incrementChunkDebugInfo(streamState, chunkLength) { + var debugInfo = streamState._debugInfo, + endTime = performance.now(), + previousEndTime = debugInfo.end; + chunkLength = debugInfo.byteSize + chunkLength; + chunkLength > streamState._debugTargetChunkSize || + endTime > previousEndTime + 10 + ? ((streamState._debugInfo = { + name: debugInfo.name, + start: debugInfo.start, + end: endTime, + byteSize: chunkLength, + value: debugInfo.value, + owner: debugInfo.owner, + debugStack: debugInfo.debugStack, + debugTask: debugInfo.debugTask + }), + (streamState._debugTargetChunkSize = chunkLength + MIN_CHUNK_SIZE)) + : ((debugInfo.end = endTime), (debugInfo.byteSize = chunkLength)); + } + function addAsyncInfo(chunk, asyncInfo) { + var value = resolveLazy(chunk.value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) + ? chunk._debugInfo.push(asyncInfo) + : isArrayImpl(value._debugInfo) + ? value._debugInfo.push(asyncInfo) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: [asyncInfo] + }); + } + function resolveChunkDebugInfo(response, streamState, chunk) { + response._debugIOStarted && + ((response = { awaited: streamState._debugInfo }), + "pending" === chunk.status || "blocked" === chunk.status + ? ((response = addAsyncInfo.bind(null, chunk, response)), + chunk.then(response, response)) + : addAsyncInfo(chunk, response)); + } + function resolveBuffer(response, id, buffer, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : (chunk && releasePendingChunk(response, chunk), + (buffer = new ReactPromise("fulfilled", buffer, null)), + resolveChunkDebugInfo(response, streamState, buffer), + chunks.set(id, buffer)); + } + function resolveModule(response, id, model, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + model = JSON.parse(model, response._fromJSON); + var clientReference = resolveClientReference( + response._bundlerConfig, + model + ); + prepareDestinationWithChunks( + response._moduleLoading, + model[1], + response._nonce + ); + if ((model = preloadModule(clientReference))) { + if (chunk) { + releasePendingChunk(response, chunk); + var blockedChunk = chunk; + blockedChunk.status = "blocked"; + } else + (blockedChunk = new ReactPromise("blocked", null, null)), + chunks.set(id, blockedChunk); + resolveChunkDebugInfo(response, streamState, blockedChunk); + model.then( + function () { + return resolveModuleChunk(response, blockedChunk, clientReference); + }, + function (error) { + return triggerErrorOnChunk(response, blockedChunk, error); + } + ); + } else + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModuleChunk(response, chunk, clientReference)) + : ((chunk = new ReactPromise( + "resolved_module", + clientReference, + null + )), + resolveChunkDebugInfo(response, streamState, chunk), + chunks.set(id, chunk)); + } + function resolveStream(response, id, stream, controller, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + if (chunk) { + if ( + (resolveChunkDebugInfo(response, streamState, chunk), + "pending" === chunk.status) + ) { + releasePendingChunk(response, chunk); + id = chunk.value; + if (null != chunk._debugChunk) { + streamState = initializingHandler; + chunks = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + if ( + (initializeDebugChunk(response, chunk), + null !== initializingHandler && + !initializingHandler.errored && + 0 < initializingHandler.deps) + ) { + initializingHandler.value = stream; + initializingHandler.reason = controller; + initializingHandler.chunk = chunk; + return; + } + } finally { + (initializingHandler = streamState), (initializingChunk = chunks); + } + } + chunk.status = "fulfilled"; + chunk.value = stream; + chunk.reason = controller; + null !== id + ? wakeChunk(id, chunk.value, chunk) + : moveDebugInfoFromChunkToInnerValue(chunk, stream); + } + } else + (stream = new ReactPromise("fulfilled", stream, controller)), + resolveChunkDebugInfo(response, streamState, stream), + chunks.set(id, stream); + } + function startReadableStream(response, id, type, streamState) { + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream( + response, + id, + type, + { + enqueueValue: function (value) { + null === previousBlockedChunk + ? controller.enqueue(value) + : previousBlockedChunk.then(function () { + controller.enqueue(value); + }); + }, + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = createResolvedModelChunk(response, json); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk3 = createPendingChunk(response); + _chunk3.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk3; + chunk.then(function () { + previousBlockedChunk === _chunk3 && + (previousBlockedChunk = null); + resolveModelChunk(response, _chunk3, json); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }, + streamState + ); + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function startAsyncIterable(response, id, iterator, streamState) { + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = {}; + iterable[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new ReactPromise( + "fulfilled", + { done: !0, value: void 0 }, + null + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }; + resolveStream( + response, + id, + iterator ? iterable[ASYNC_ITERATOR]() : iterable, + { + enqueueValue: function (value) { + if (nextWriteIndex === buffer.length) + buffer[nextWriteIndex] = new ReactPromise( + "fulfilled", + { done: !1, value: value }, + null + ); + else { + var chunk = buffer[nextWriteIndex], + resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "fulfilled"; + chunk.value = { done: !1, value: value }; + null !== resolveListeners && + wakeChunkIfInitialized( + chunk, + resolveListeners, + rejectListeners + ); + } + nextWriteIndex++; + }, + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !1 + ); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !0 + ); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + response, + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(response, buffer[nextWriteIndex++], error); + } + }, + streamState + ); + } + function resolveErrorDev(response, errorInfo) { + var name = errorInfo.name, + env = errorInfo.env; + var error = buildFakeCallStack( + response, + errorInfo.stack, + env, + !1, + Error.bind( + null, + errorInfo.message || + "An error occurred in the Server Components render but no message was provided" + ) + ); + var ownerTask = null; + null != errorInfo.owner && + ((errorInfo = errorInfo.owner.slice(1)), + (errorInfo = getOutlinedModel( + response, + errorInfo, + {}, + "", + createModel + )), + null !== errorInfo && + (ownerTask = initializeFakeTask(response, errorInfo))); + null === ownerTask + ? ((response = getRootTask(response, env)), + (error = null != response ? response.run(error) : error())) + : (error = ownerTask.run(error)); + error.name = name; + error.environmentName = env; + return error; + } + function createFakeFunction( + name, + filename, + sourceMap, + line, + col, + enclosingLine, + enclosingCol, + environmentName + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--; + 1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--; + 1 > line ? (line = 0) : line--; + 1 > col ? (col = 0) : col--; + if ( + line < enclosingLine || + (line === enclosingLine && col < enclosingCol) + ) + enclosingCol = enclosingLine = 0; + 1 > line + ? ((line = encodedName.length + 3), + (enclosingCol -= line), + 0 > enclosingCol && (enclosingCol = 0), + (col = col - enclosingCol - line - 3), + 0 > col && (col = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : 1 > enclosingLine + ? ((enclosingCol -= encodedName.length + 3), + 0 > enclosingCol && (enclosingCol = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})")) + : enclosingLine === line + ? ((col = col - enclosingCol - 3), + 0 > col && (col = 0), + (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})"); + encodedName = + 1 > enclosingLine + ? encodedName + + "\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + : "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + + encodedName; + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((encodedName += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?" + + fakeFunctionIdx++), + (encodedName += "\n//# sourceMappingURL=" + sourceMap)) + : (encodedName = filename + ? encodedName + ("\n//# sourceURL=" + encodeURI(filename)) + : encodedName + "\n//# sourceURL="); + try { + var fn = (0, eval)(encodedName)[name]; + } catch (x) { + fn = function (_) { + return _(); + }; + } + return fn; + } + function buildFakeCallStack( + response, + stack, + environmentName, + useEnclosingLine, + innerCall + ) { + for (var i = 0; i < stack.length; i++) { + var frame = stack[i], + frameKey = + frame.join("-") + + "-" + + environmentName + + (useEnclosingLine ? "-e" : "-n"), + fn = fakeFunctionCache.get(frameKey); + if (void 0 === fn) { + fn = frame[0]; + var filename = frame[1], + line = frame[2], + col = frame[3], + enclosingLine = frame[4]; + frame = frame[5]; + var findSourceMapURL = response._debugFindSourceMapURL; + findSourceMapURL = findSourceMapURL + ? findSourceMapURL(filename, environmentName) + : null; + fn = createFakeFunction( + fn, + filename, + findSourceMapURL, + line, + col, + useEnclosingLine ? line : enclosingLine, + useEnclosingLine ? col : frame, + environmentName + ); + fakeFunctionCache.set(frameKey, fn); + } + innerCall = fn.bind(null, innerCall); + } + return innerCall; + } + function getRootTask(response, childEnvironmentName) { + var rootTask = response._debugRootTask; + return rootTask + ? response._rootEnvironmentName !== childEnvironmentName + ? ((response = console.createTask.bind( + console, + '"use ' + childEnvironmentName.toLowerCase() + '"' + )), + rootTask.run(response)) + : rootTask + : null; + } + function initializeFakeTask(response, debugInfo) { + if (!supportsCreateTask || null == debugInfo.stack) return null; + var cachedEntry = debugInfo.debugTask; + if (void 0 !== cachedEntry) return cachedEntry; + var useEnclosingLine = void 0 === debugInfo.key, + stack = debugInfo.stack, + env = + null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env; + cachedEntry = + null == debugInfo.owner || null == debugInfo.owner.env + ? response._rootEnvironmentName + : debugInfo.owner.env; + var ownerTask = + null == debugInfo.owner + ? null + : initializeFakeTask(response, debugInfo.owner); + env = + env !== cachedEntry + ? '"use ' + env.toLowerCase() + '"' + : void 0 !== debugInfo.key + ? "<" + (debugInfo.name || "...") + ">" + : void 0 !== debugInfo.name + ? debugInfo.name || "unknown" + : "await " + (debugInfo.awaited.name || "unknown"); + env = console.createTask.bind(console, env); + useEnclosingLine = buildFakeCallStack( + response, + stack, + cachedEntry, + useEnclosingLine, + env + ); + null === ownerTask + ? ((response = getRootTask(response, cachedEntry)), + (response = + null != response + ? response.run(useEnclosingLine) + : useEnclosingLine())) + : (response = ownerTask.run(useEnclosingLine)); + return (debugInfo.debugTask = response); + } + function fakeJSXCallSite() { + return Error("react-stack-top-frame"); + } + function initializeFakeStack(response, debugInfo) { + if (void 0 === debugInfo.debugStack) { + null != debugInfo.stack && + (debugInfo.debugStack = createFakeJSXCallStackInDEV( + response, + debugInfo.stack, + null == debugInfo.env ? "" : debugInfo.env + )); + var owner = debugInfo.owner; + null != owner && + (initializeFakeStack(response, owner), + void 0 === owner.debugLocation && + null != debugInfo.debugStack && + (owner.debugLocation = debugInfo.debugStack)); + } + } + function initializeDebugInfo(response, debugInfo) { + void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo); + if (null == debugInfo.owner && null != response._debugRootOwner) { + var _componentInfoOrAsyncInfo = debugInfo; + _componentInfoOrAsyncInfo.owner = response._debugRootOwner; + _componentInfoOrAsyncInfo.stack = null; + _componentInfoOrAsyncInfo.debugStack = response._debugRootStack; + _componentInfoOrAsyncInfo.debugTask = response._debugRootTask; + } else + void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo); + "number" === typeof debugInfo.time && + (debugInfo = { time: debugInfo.time + response._timeOrigin }); + return debugInfo; + } + function getCurrentStackInDEV() { + var owner = currentOwnerInDEV; + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = prepareStackTrace; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function resolveConsoleEntry(response, json) { + if (response._replayConsole) { + var blockedChunk = response._blockedConsole; + if (null == blockedChunk) + (blockedChunk = createResolvedModelChunk(response, json)), + initializeModelChunk(blockedChunk), + "fulfilled" === blockedChunk.status + ? replayConsoleWithCallStackInDEV(response, blockedChunk.value) + : (blockedChunk.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ), + (response._blockedConsole = blockedChunk)); + else { + var _chunk4 = createPendingChunk(response); + _chunk4.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ); + response._blockedConsole = _chunk4; + var unblock = function () { + response._blockedConsole === _chunk4 && + (response._blockedConsole = null); + resolveModelChunk(response, _chunk4, json); + }; + blockedChunk.then(unblock, unblock); + } + } + } + function initializeIOInfo(response, ioInfo) { + void 0 !== ioInfo.stack && + (initializeFakeTask(response, ioInfo), + initializeFakeStack(response, ioInfo)); + ioInfo.start += response._timeOrigin; + ioInfo.end += response._timeOrigin; + if (response._replayConsole) { + response = response._rootEnvironmentName; + var promise = ioInfo.value; + if (promise) + switch (promise.status) { + case "fulfilled": + logIOInfo(ioInfo, response, promise.value); + break; + case "rejected": + logIOInfoErrored(ioInfo, response, promise.reason); + break; + default: + promise.then( + logIOInfo.bind(null, ioInfo, response), + logIOInfoErrored.bind(null, ioInfo, response) + ); + } + else logIOInfo(ioInfo, response, void 0); + } + } + function resolveIOInfo(response, id, model) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk + ? (resolveModelChunk(response, chunk, model), + "resolved_model" === chunk.status && initializeModelChunk(chunk)) + : ((chunk = createResolvedModelChunk(response, model)), + chunks.set(id, chunk), + initializeModelChunk(chunk)); + "fulfilled" === chunk.status + ? initializeIOInfo(response, chunk.value) + : chunk.then( + function (v) { + initializeIOInfo(response, v); + }, + function () {} + ); + } + function mergeBuffer(buffer, lastChunk) { + for ( + var l = buffer.length, byteLength = lastChunk.length, i = 0; + i < l; + i++ + ) + byteLength += buffer[i].byteLength; + byteLength = new Uint8Array(byteLength); + for (var _i3 = (i = 0); _i3 < l; _i3++) { + var chunk = buffer[_i3]; + byteLength.set(chunk, i); + i += chunk.byteLength; + } + byteLength.set(lastChunk, i); + return byteLength; + } + function resolveTypedArray( + response, + id, + buffer, + lastChunk, + constructor, + bytesPerElement, + streamState + ) { + buffer = + 0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement + ? lastChunk + : mergeBuffer(buffer, lastChunk); + constructor = new constructor( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength / bytesPerElement + ); + resolveBuffer(response, id, constructor, streamState); + } + function flushComponentPerformance( + response$jscomp$0, + root, + trackIdx$jscomp$6, + trackTime, + parentEndTime + ) { + if (!isArrayImpl(root._children)) { + var previousResult = root._children, + previousEndTime = previousResult.endTime; + if ( + -Infinity < parentEndTime && + parentEndTime < previousEndTime && + null !== previousResult.component + ) { + var componentInfo = previousResult.component, + trackIdx = trackIdx$jscomp$6, + startTime = parentEndTime; + if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) { + var color = + componentInfo.env === response$jscomp$0._rootEnvironmentName + ? "primary-light" + : "secondary-light", + entryName = componentInfo.name + " [deduped]", + debugTask = componentInfo.debugTask; + debugTask + ? debugTask.run( + console.timeStamp.bind( + console, + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ) + ) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ); + } + } + previousResult.track = trackIdx$jscomp$6; + return previousResult; + } + var children = root._children; + var debugInfo = root._debugInfo; + if (0 === debugInfo.length && "fulfilled" === root.status) { + var resolvedValue = resolveLazy(root.value); + "object" === typeof resolvedValue && + null !== resolvedValue && + (isArrayImpl(resolvedValue) || + "function" === typeof resolvedValue[ASYNC_ITERATOR] || + resolvedValue.$$typeof === REACT_ELEMENT_TYPE || + resolvedValue.$$typeof === REACT_LAZY_TYPE) && + isArrayImpl(resolvedValue._debugInfo) && + (debugInfo = resolvedValue._debugInfo); + } + if (debugInfo) { + for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + "number" === typeof info.time && (startTime$jscomp$0 = info.time); + if ("string" === typeof info.name) { + startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++; + trackTime = startTime$jscomp$0; + break; + } + } + for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) { + var _info = debugInfo[_i4]; + if ("number" === typeof _info.time && _info.time > parentEndTime) { + parentEndTime = _info.time; + break; + } + } + } + var result = { + track: trackIdx$jscomp$6, + endTime: -Infinity, + component: null + }; + root._children = result; + for ( + var childrenEndTime = -Infinity, + childTrackIdx = trackIdx$jscomp$6, + childTrackTime = trackTime, + _i5 = 0; + _i5 < children.length; + _i5++ + ) { + var childResult = flushComponentPerformance( + response$jscomp$0, + children[_i5], + childTrackIdx, + childTrackTime, + parentEndTime + ); + null !== childResult.component && + (result.component = childResult.component); + childTrackIdx = childResult.track; + var childEndTime = childResult.endTime; + childEndTime > childTrackTime && (childTrackTime = childEndTime); + childEndTime > childrenEndTime && (childrenEndTime = childEndTime); + } + if (debugInfo) + for ( + var componentEndTime = 0, + isLastComponent = !0, + endTime = -1, + endTimeIdx = -1, + _i6 = debugInfo.length - 1; + 0 <= _i6; + _i6-- + ) { + var _info2 = debugInfo[_i6]; + if ("number" === typeof _info2.time) { + 0 === componentEndTime && (componentEndTime = _info2.time); + var time = _info2.time; + if (-1 < endTimeIdx) + for (var j = endTimeIdx - 1; j > _i6; j--) { + var candidateInfo = debugInfo[j]; + if ("string" === typeof candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var componentInfo$jscomp$0 = candidateInfo, + response = response$jscomp$0, + componentInfo$jscomp$1 = componentInfo$jscomp$0, + trackIdx$jscomp$0 = trackIdx$jscomp$6, + startTime$jscomp$1 = time, + componentEndTime$jscomp$0 = componentEndTime, + childrenEndTime$jscomp$0 = childrenEndTime; + if ( + isLastComponent && + "rejected" === root.status && + root.reason !== response._closedReason + ) { + var componentInfo$jscomp$2 = componentInfo$jscomp$1, + trackIdx$jscomp$1 = trackIdx$jscomp$0, + startTime$jscomp$2 = startTime$jscomp$1, + childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0, + error = root.reason; + if (supportsUserTiming) { + var env = componentInfo$jscomp$2.env, + name = componentInfo$jscomp$2.name, + entryName$jscomp$0 = + env === response._rootEnvironmentName || + void 0 === env + ? name + : name + " [" + env + "]", + measureName = "\u200b" + entryName$jscomp$0, + properties = [ + [ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]; + null != componentInfo$jscomp$2.key && + addValueToProperties( + "key", + componentInfo$jscomp$2.key, + properties, + 0, + "" + ); + null != componentInfo$jscomp$2.props && + addObjectToProperties( + componentInfo$jscomp$2.props, + properties, + 0, + "" + ); + performance.measure(measureName, { + start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2, + end: childrenEndTime$jscomp$1, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$1], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$0 + " Errored", + properties: properties + } + } + }); + performance.clearMeasures(measureName); + } + } else { + var componentInfo$jscomp$3 = componentInfo$jscomp$1, + trackIdx$jscomp$2 = trackIdx$jscomp$0, + startTime$jscomp$3 = startTime$jscomp$1, + childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0; + if ( + supportsUserTiming && + 0 <= childrenEndTime$jscomp$2 && + 10 > trackIdx$jscomp$2 + ) { + var env$jscomp$0 = componentInfo$jscomp$3.env, + name$jscomp$0 = componentInfo$jscomp$3.name, + isPrimaryEnv = + env$jscomp$0 === response._rootEnvironmentName, + selfTime = + componentEndTime$jscomp$0 - startTime$jscomp$3, + color$jscomp$0 = + 0.5 > selfTime + ? isPrimaryEnv + ? "primary-light" + : "secondary-light" + : 50 > selfTime + ? isPrimaryEnv + ? "primary" + : "secondary" + : 500 > selfTime + ? isPrimaryEnv + ? "primary-dark" + : "secondary-dark" + : "error", + debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask, + measureName$jscomp$0 = + "\u200b" + + (isPrimaryEnv || void 0 === env$jscomp$0 + ? name$jscomp$0 + : name$jscomp$0 + " [" + env$jscomp$0 + "]"); + if (debugTask$jscomp$0) { + var properties$jscomp$0 = []; + null != componentInfo$jscomp$3.key && + addValueToProperties( + "key", + componentInfo$jscomp$3.key, + properties$jscomp$0, + 0, + "" + ); + null != componentInfo$jscomp$3.props && + addObjectToProperties( + componentInfo$jscomp$3.props, + properties$jscomp$0, + 0, + "" + ); + debugTask$jscomp$0.run( + performance.measure.bind( + performance, + measureName$jscomp$0, + { + start: + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + end: childrenEndTime$jscomp$2, + detail: { + devtools: { + color: color$jscomp$0, + track: trackNames[trackIdx$jscomp$2], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(measureName$jscomp$0); + } else + console.timeStamp( + measureName$jscomp$0, + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + childrenEndTime$jscomp$2, + trackNames[trackIdx$jscomp$2], + "Server Components \u269b", + color$jscomp$0 + ); + } + } + componentEndTime = time; + result.component = componentInfo$jscomp$0; + isLastComponent = !1; + } else if ( + candidateInfo.awaited && + null != candidateInfo.awaited.env + ) { + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo = candidateInfo, + env$jscomp$1 = response$jscomp$0._rootEnvironmentName, + promise = asyncInfo.awaited.value; + if (promise) { + var thenable = promise; + switch (thenable.status) { + case "fulfilled": + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + thenable.value + ); + break; + case "rejected": + var asyncInfo$jscomp$0 = asyncInfo, + trackIdx$jscomp$3 = trackIdx$jscomp$6, + startTime$jscomp$4 = time, + endTime$jscomp$0 = endTime, + rootEnv = env$jscomp$1, + error$jscomp$0 = thenable.reason; + if (supportsUserTiming && 0 < endTime$jscomp$0) { + var description = getIODescription(error$jscomp$0), + entryName$jscomp$1 = + "await " + + getIOShortName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ), + debugTask$jscomp$1 = + asyncInfo$jscomp$0.debugTask || + asyncInfo$jscomp$0.awaited.debugTask; + if (debugTask$jscomp$1) { + var properties$jscomp$1 = [ + [ + "Rejected", + "object" === typeof error$jscomp$0 && + null !== error$jscomp$0 && + "string" === typeof error$jscomp$0.message + ? String(error$jscomp$0.message) + : String(error$jscomp$0) + ] + ], + tooltipText = + getIOLongName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ) + " Rejected"; + debugTask$jscomp$1.run( + performance.measure.bind( + performance, + entryName$jscomp$1, + { + start: + 0 > startTime$jscomp$4 + ? 0 + : startTime$jscomp$4, + end: endTime$jscomp$0, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$3], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$1, + tooltipText: tooltipText + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$1); + } else + console.timeStamp( + entryName$jscomp$1, + 0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4, + endTime$jscomp$0, + trackNames[trackIdx$jscomp$3], + "Server Components \u269b", + "error" + ); + } + break; + default: + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } else + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } + else { + endTime = time; + for (var _j = debugInfo.length - 1; _j > _i6; _j--) { + var _candidateInfo = debugInfo[_j]; + if ("string" === typeof _candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var _componentInfo = _candidateInfo, + _env = response$jscomp$0._rootEnvironmentName, + componentInfo$jscomp$4 = _componentInfo, + trackIdx$jscomp$4 = trackIdx$jscomp$6, + startTime$jscomp$5 = time, + childrenEndTime$jscomp$3 = childrenEndTime; + if (supportsUserTiming) { + var env$jscomp$2 = componentInfo$jscomp$4.env, + name$jscomp$1 = componentInfo$jscomp$4.name, + entryName$jscomp$2 = + env$jscomp$2 === _env || void 0 === env$jscomp$2 + ? name$jscomp$1 + : name$jscomp$1 + " [" + env$jscomp$2 + "]", + measureName$jscomp$1 = "\u200b" + entryName$jscomp$2, + properties$jscomp$2 = [ + [ + "Aborted", + "The stream was aborted before this Component finished rendering." + ] + ]; + null != componentInfo$jscomp$4.key && + addValueToProperties( + "key", + componentInfo$jscomp$4.key, + properties$jscomp$2, + 0, + "" + ); + null != componentInfo$jscomp$4.props && + addObjectToProperties( + componentInfo$jscomp$4.props, + properties$jscomp$2, + 0, + "" + ); + performance.measure(measureName$jscomp$1, { + start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5, + end: childrenEndTime$jscomp$3, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$4], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$2 + " Aborted", + properties: properties$jscomp$2 + } + } + }); + performance.clearMeasures(measureName$jscomp$1); + } + componentEndTime = time; + result.component = _componentInfo; + isLastComponent = !1; + } else if ( + _candidateInfo.awaited && + null != _candidateInfo.awaited.env + ) { + var _asyncInfo = _candidateInfo, + _env2 = response$jscomp$0._rootEnvironmentName; + _asyncInfo.awaited.end > endTime && + (endTime = _asyncInfo.awaited.end); + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo$jscomp$1 = _asyncInfo, + trackIdx$jscomp$5 = trackIdx$jscomp$6, + startTime$jscomp$6 = time, + endTime$jscomp$1 = endTime, + rootEnv$jscomp$0 = _env2; + if (supportsUserTiming && 0 < endTime$jscomp$1) { + var entryName$jscomp$3 = + "await " + + getIOShortName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ), + debugTask$jscomp$2 = + asyncInfo$jscomp$1.debugTask || + asyncInfo$jscomp$1.awaited.debugTask; + if (debugTask$jscomp$2) { + var tooltipText$jscomp$0 = + getIOLongName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ) + " Aborted"; + debugTask$jscomp$2.run( + performance.measure.bind( + performance, + entryName$jscomp$3, + { + start: + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + end: endTime$jscomp$1, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$5], + trackGroup: "Server Components \u269b", + properties: [ + [ + "Aborted", + "The stream was aborted before this Promise resolved." + ] + ], + tooltipText: tooltipText$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$3); + } else + console.timeStamp( + entryName$jscomp$3, + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + endTime$jscomp$1, + trackNames[trackIdx$jscomp$5], + "Server Components \u269b", + "warning" + ); + } + } + } + } + endTime = time; + endTimeIdx = _i6; + } + } + result.endTime = childrenEndTime; + return result; + } + function flushInitialRenderPerformance(response) { + if (response._replayConsole) { + var rootChunk = getChunk(response, 0); + isArrayImpl(rootChunk._children) && + (markAllTracksInOrder(), + flushComponentPerformance( + response, + rootChunk, + 0, + -Infinity, + -Infinity + )); + } + } + function processFullBinaryRow( + response, + streamState, + id, + tag, + buffer, + chunk + ) { + switch (tag) { + case 65: + resolveBuffer( + response, + id, + mergeBuffer(buffer, chunk).buffer, + streamState + ); + return; + case 79: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int8Array, + 1, + streamState + ); + return; + case 111: + resolveBuffer( + response, + id, + 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk), + streamState + ); + return; + case 85: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint8ClampedArray, + 1, + streamState + ); + return; + case 83: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int16Array, + 2, + streamState + ); + return; + case 115: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint16Array, + 2, + streamState + ); + return; + case 76: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int32Array, + 4, + streamState + ); + return; + case 108: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint32Array, + 4, + streamState + ); + return; + case 71: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float32Array, + 4, + streamState + ); + return; + case 103: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float64Array, + 8, + streamState + ); + return; + case 77: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigInt64Array, + 8, + streamState + ); + return; + case 109: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigUint64Array, + 8, + streamState + ); + return; + case 86: + resolveTypedArray( + response, + id, + buffer, + chunk, + DataView, + 1, + streamState + ); + return; + } + for ( + var stringDecoder = response._stringDecoder, row = "", i = 0; + i < buffer.length; + i++ + ) + row += stringDecoder.decode(buffer[i], decoderOptions); + row += stringDecoder.decode(chunk); + processFullStringRow(response, streamState, id, tag, row); + } + function processFullStringRow(response, streamState, id, tag, row) { + switch (tag) { + case 73: + resolveModule(response, id, row, streamState); + break; + case 72: + id = row[0]; + streamState = row.slice(1); + response = JSON.parse(streamState, response._fromJSON); + streamState = ReactDOMSharedInternals.d; + switch (id) { + case "D": + streamState.D(response); + break; + case "C": + "string" === typeof response + ? streamState.C(response) + : streamState.C(response[0], response[1]); + break; + case "L": + id = response[0]; + row = response[1]; + 3 === response.length + ? streamState.L(id, row, response[2]) + : streamState.L(id, row); + break; + case "m": + "string" === typeof response + ? streamState.m(response) + : streamState.m(response[0], response[1]); + break; + case "X": + "string" === typeof response + ? streamState.X(response) + : streamState.X(response[0], response[1]); + break; + case "S": + "string" === typeof response + ? streamState.S(response) + : streamState.S( + response[0], + 0 === response[1] ? void 0 : response[1], + 3 === response.length ? response[2] : void 0 + ); + break; + case "M": + "string" === typeof response + ? streamState.M(response) + : streamState.M(response[0], response[1]); + } + break; + case 69: + tag = response._chunks; + var chunk = tag.get(id); + row = JSON.parse(row); + var error = resolveErrorDev(response, row); + error.digest = row.digest; + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + triggerErrorOnChunk(response, chunk, error)) + : ((row = createErrorChunk(response, error)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 84: + tag = response._chunks; + (chunk = tag.get(id)) && "pending" !== chunk.status + ? chunk.reason.enqueueValue(row) + : (chunk && releasePendingChunk(response, chunk), + (row = new ReactPromise("fulfilled", row, null)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 78: + response._timeOrigin = +row - performance.timeOrigin; + break; + case 68: + id = getChunk(response, id); + "fulfilled" !== id.status && + "rejected" !== id.status && + "halted" !== id.status && + "blocked" !== id.status && + "resolved_module" !== id.status && + ((streamState = id._debugChunk), + (tag = createResolvedModelChunk(response, row)), + (tag._debugChunk = streamState), + (id._debugChunk = tag), + initializeDebugChunk(response, id), + "blocked" !== tag.status || + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + '"' !== row[0] || + "$" !== row[1] || + ((streamState = row.slice(2, row.length - 1).split(":")), + (streamState = parseInt(streamState[0], 16)), + "pending" === getChunk(response, streamState).status && + (id._debugChunk = null))); + break; + case 74: + resolveIOInfo(response, id, row); + break; + case 87: + resolveConsoleEntry(response, row); + break; + case 82: + startReadableStream(response, id, void 0, streamState); + break; + case 114: + startReadableStream(response, id, "bytes", streamState); + break; + case 88: + startAsyncIterable(response, id, !1, streamState); + break; + case 120: + startAsyncIterable(response, id, !0, streamState); + break; + case 67: + (response = response._chunks.get(id)) && + "fulfilled" === response.status && + response.reason.close("" === row ? '"$undefined"' : row); + break; + case 80: + row = JSON.parse(row); + row = buildFakeCallStack( + response, + row.stack, + row.env, + !1, + Error.bind(null, row.reason || "") + ); + tag = response._debugRootTask; + tag = null != tag ? tag.run(row) : row(); + tag.$$typeof = REACT_POSTPONE_TYPE; + row = response._chunks; + (chunk = row.get(id)) + ? (resolveChunkDebugInfo(response, streamState, chunk), + triggerErrorOnChunk(response, chunk, tag)) + : ((tag = createErrorChunk(response, tag)), + resolveChunkDebugInfo(response, streamState, tag), + row.set(id, tag)); + break; + default: + if ("" === row) { + if ( + ((streamState = response._chunks), + (row = streamState.get(id)) || + streamState.set(id, (row = createPendingChunk(response))), + "pending" === row.status || "blocked" === row.status) + ) + releasePendingChunk(response, row), + (response = row), + (response.status = "halted"), + (response.value = null), + (response.reason = null); + } else + (tag = response._chunks), + (chunk = tag.get(id)) + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModelChunk(response, chunk, row)) + : ((row = createResolvedModelChunk(response, row)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + } + } + function processBinaryChunk(weakResponse, streamState, chunk) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse), + i = 0, + rowState = streamState._rowState; + weakResponse = streamState._rowID; + var rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + for ( + incrementChunkDebugInfo(streamState, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk[i++]; + 58 === lastIdx + ? (rowState = 1) + : (weakResponse = + (weakResponse << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk[i]; + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 35 === rowState || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk[i++]; + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf(10, i); + break; + case 4: + (lastIdx = i + rowLength), + lastIdx > chunk.length && (lastIdx = -1); + } + var offset = chunk.byteOffset + i; + if (-1 < lastIdx) + (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)), + processFullBinaryRow( + response, + streamState, + weakResponse, + rowTag, + buffer, + rowLength + ), + (i = lastIdx), + 3 === rowState && i++, + (rowLength = weakResponse = rowTag = rowState = 0), + (buffer.length = 0); + else { + chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i); + buffer.push(chunk); + rowLength -= chunk.byteLength; + break; + } + } + streamState._rowState = rowState; + streamState._rowID = weakResponse; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + } + } + function createFromJSONCallback(response) { + return function (key, value) { + if ("string" === typeof value) + return parseModelString(response, this, key, value); + if ("object" === typeof value && null !== value) { + if (value[0] === REACT_ELEMENT_TYPE) + b: { + var owner = value[4], + stack = value[5]; + key = value[6]; + value = { + $$typeof: REACT_ELEMENT_TYPE, + type: value[1], + key: value[2], + props: value[3], + _owner: void 0 === owner ? null : owner + }; + Object.defineProperty(value, "ref", { + enumerable: !1, + get: nullRefGetter + }); + value._store = {}; + Object.defineProperty(value._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: key + }); + Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + Object.defineProperty(value, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: void 0 === stack ? null : stack + }); + Object.defineProperty(value, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + if (null !== initializingHandler) { + owner = initializingHandler; + initializingHandler = owner.parent; + if (owner.errored) { + stack = createErrorChunk(response, owner.reason); + initializeElement(response, value, null); + owner = { + name: getComponentNameFromType(value.type) || "", + owner: value._owner + }; + owner.debugStack = value._debugStack; + supportsCreateTask && (owner.debugTask = value._debugTask); + stack._debugInfo = [owner]; + key = createLazyChunkWrapper(stack, key); + break b; + } + if (0 < owner.deps) { + stack = new ReactPromise("blocked", null, null); + owner.value = value; + owner.chunk = stack; + key = createLazyChunkWrapper(stack, key); + value = initializeElement.bind(null, response, value, key); + stack.then(value, value); + break b; + } + } + initializeElement(response, value, null); + key = value; + } + else key = value; + return key; + } + return value; + }; + } + function close(weakResponse) { + reportGlobalError(weakResponse, Error("Connection closed.")); + } + function noServerCall$1() { + throw Error( + "Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead." + ); + } + function createResponseFromOptions(options) { + return new ResponseInstance( + options.serverConsumerManifest.moduleMap, + options.serverConsumerManifest.serverModuleMap, + options.serverConsumerManifest.moduleLoading, + noServerCall$1, + options.encodeFormAction, + "string" === typeof options.nonce ? options.nonce : void 0, + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + options && options.findSourceMapURL ? options.findSourceMapURL : void 0, + options ? !0 === options.replayConsoleLogs : !1, + options && options.environmentName ? options.environmentName : void 0, + options && null != options.startTime ? options.startTime : void 0, + options && void 0 !== options.debugChannel + ? { + hasReadable: void 0 !== options.debugChannel.readable, + callback: null + } + : void 0 + )._weakResponse; + } + function startReadingFromStream$1(response, stream, onDone, debugValue) { + function progress(_ref) { + var value = _ref.value; + if (_ref.done) return onDone(); + processBinaryChunk(response, streamState, value); + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response, e); + } + var streamState = createStreamState(response, debugValue), + reader = stream.getReader(); + reader.read().then(progress).catch(error); + } + function noServerCall() { + throw Error( + "Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead." + ); + } + function startReadingFromStream(response$jscomp$0, stream, onEnd) { + var streamState = createStreamState(response$jscomp$0, stream); + stream.on("data", function (chunk) { + if ("string" === typeof chunk) { + if (void 0 !== response$jscomp$0.weak.deref()) { + var response = unwrapWeakResponse(response$jscomp$0), + i = 0, + rowState = streamState._rowState, + rowID = streamState._rowID, + rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + for ( + incrementChunkDebugInfo(streamState, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk.charCodeAt(i++); + 58 === lastIdx + ? (rowState = 1) + : (rowID = + (rowID << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk.charCodeAt(i); + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk.charCodeAt(i++); + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf("\n", i); + break; + case 4: + if (84 !== rowTag) + throw Error( + "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams." + ); + if (rowLength < chunk.length || chunk.length > 3 * rowLength) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + lastIdx = chunk.length; + } + if (-1 < lastIdx) { + if (0 < buffer.length) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + i = chunk.slice(i, lastIdx); + processFullStringRow(response, streamState, rowID, rowTag, i); + i = lastIdx; + 3 === rowState && i++; + rowLength = rowID = rowTag = rowState = 0; + buffer.length = 0; + } else if (chunk.length !== i) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + } + streamState._rowState = rowState; + streamState._rowID = rowID; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + } + } else processBinaryChunk(response$jscomp$0, streamState, chunk); + }); + stream.on("error", function (error) { + reportGlobalError(response$jscomp$0, error); + }); + stream.on("end", onEnd); + } + var util = require("util"), + ReactDOM = require("react-dom"), + React = require("react"), + decoderOptions = { stream: !0 }, + bind$1 = Function.prototype.bind, + instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(), + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_PORTAL_TYPE = Symbol.for("react.portal"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), + REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), + REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + ObjectPrototype = Object.prototype, + knownServerReferences = new WeakMap(), + boundCache = new WeakMap(), + fakeServerFunctionIdx = 0, + FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice, + v8FrameRegExp = + /^ {3} at (?:(.+) \((.+):(\d+):(\d+)\)|(?:async )?(.+):(\d+):(\d+))$/, + jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\d+):(\d+)/, + hasOwnProperty = Object.prototype.hasOwnProperty, + REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + supportsUserTiming = + "undefined" !== typeof console && + "function" === typeof console.timeStamp && + "undefined" !== typeof performance && + "function" === typeof performance.measure, + trackNames = + "Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split( + " " + ), + prefix, + suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var ReactSharedInteralsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE || + ReactSharedInteralsServer; + ReactPromise.prototype = Object.create(Promise.prototype); + ReactPromise.prototype.then = function (resolve, reject) { + var _this = this; + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + break; + case "resolved_module": + initializeModuleChunk(this); + } + var resolveCallback = resolve, + rejectCallback = reject, + wrapperPromise = new Promise(function (res, rej) { + resolve = function (value) { + wrapperPromise._debugInfo = _this._debugInfo; + res(value); + }; + reject = function (reason) { + wrapperPromise._debugInfo = _this._debugInfo; + rej(reason); + }; + }); + wrapperPromise.then(resolveCallback, rejectCallback); + switch (this.status) { + case "fulfilled": + "function" === typeof resolve && resolve(this.value); + break; + case "pending": + case "blocked": + "function" === typeof resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + "function" === typeof reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + case "halted": + break; + default: + "function" === typeof reject && reject(this.reason); + } + }; + var debugChannelRegistry = + "function" === typeof FinalizationRegistry + ? new FinalizationRegistry(closeDebugChannel) + : null, + initializingHandler = null, + initializingChunk = null, + mightHaveStaticConstructor = /\bclass\b.*\bstatic\b/, + MIN_CHUNK_SIZE = 65536, + supportsCreateTask = !!console.createTask, + fakeFunctionCache = new Map(), + fakeFunctionIdx = 0, + createFakeJSXCallStack = { + react_stack_bottom_frame: function (response, stack, environmentName) { + return buildFakeCallStack( + response, + stack, + environmentName, + !1, + fakeJSXCallSite + )(); + } + }, + createFakeJSXCallStackInDEV = + createFakeJSXCallStack.react_stack_bottom_frame.bind( + createFakeJSXCallStack + ), + currentOwnerInDEV = null, + replayConsoleWithCallStack = { + react_stack_bottom_frame: function (response, payload) { + var methodName = payload[0], + stackTrace = payload[1], + owner = payload[2], + env = payload[3]; + payload = payload.slice(4); + var prevStack = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; + currentOwnerInDEV = null === owner ? response._debugRootOwner : owner; + try { + a: { + var offset = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + var JSCompiler_inline_result = bind$1.apply( + console[methodName], + [console].concat(payload) + ); + break a; + case "assert": + offset = 1; + } + var newArgs = payload.slice(0); + "string" === typeof newArgs[offset] + ? newArgs.splice( + offset, + 1, + "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + newArgs[offset], + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ) + : newArgs.splice( + offset, + 0, + "\u001b[0m\u001b[7m%c%s\u001b[0m%c", + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ); + newArgs.unshift(console); + JSCompiler_inline_result = bind$1.apply( + console[methodName], + newArgs + ); + } + var callStack = buildFakeCallStack( + response, + stackTrace, + env, + !1, + JSCompiler_inline_result + ); + if (null != owner) { + var task = initializeFakeTask(response, owner); + initializeFakeStack(response, owner); + if (null !== task) { + task.run(callStack); + return; + } + } + var rootTask = getRootTask(response, env); + null != rootTask ? rootTask.run(callStack) : callStack(); + } finally { + (currentOwnerInDEV = null), + (ReactSharedInternals.getCurrentStack = prevStack); + } + } + }, + replayConsoleWithCallStackInDEV = + replayConsoleWithCallStack.react_stack_bottom_frame.bind( + replayConsoleWithCallStack + ); + exports.createFromFetch = function (promiseForResponse, options) { + var response = createResponseFromOptions(options); + promiseForResponse.then( + function (r) { + if ( + options && + options.debugChannel && + options.debugChannel.readable + ) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromStream$1( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream$1(response, r.body, handleDone, r); + } else + startReadingFromStream$1( + response, + r.body, + close.bind(null, response), + r + ); + }, + function (e) { + reportGlobalError(response, e); + } + ); + return getRoot(response); + }; + exports.createFromNodeStream = function ( + stream, + serverConsumerManifest, + options + ) { + var response = new ResponseInstance( + serverConsumerManifest.moduleMap, + serverConsumerManifest.serverModuleMap, + serverConsumerManifest.moduleLoading, + noServerCall, + options ? options.encodeFormAction : void 0, + options && "string" === typeof options.nonce ? options.nonce : void 0, + void 0, + options && options.findSourceMapURL ? options.findSourceMapURL : void 0, + options ? !0 === options.replayConsoleLogs : !1, + options && options.environmentName ? options.environmentName : void 0, + options && null != options.startTime ? options.startTime : void 0, + options && void 0 !== options.debugChannel + ? { + hasReadable: void 0 !== options.debugChannel.readable, + callback: null + } + : void 0 + )._weakResponse; + if (options && options.debugChannel) { + var streamEndedCount = 0; + serverConsumerManifest = function () { + 2 === ++streamEndedCount && close(response); + }; + startReadingFromStream( + response, + options.debugChannel, + serverConsumerManifest + ); + startReadingFromStream(response, stream, serverConsumerManifest); + } else + startReadingFromStream(response, stream, close.bind(null, response)); + return getRoot(response); + }; + exports.createFromReadableStream = function (stream, options) { + var response = createResponseFromOptions(options); + if (options && options.debugChannel && options.debugChannel.readable) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromStream$1( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream$1(response, stream, handleDone, stream); + } else + startReadingFromStream$1( + response, + stream, + close.bind(null, response), + stream + ); + return getRoot(response); + }; + exports.createServerReference = function (id) { + return createServerReference$1(id, noServerCall$1); + }; + exports.createTemporaryReferenceSet = function () { + return new Map(); + }; + exports.encodeReply = function (value, options) { + return new Promise(function (resolve, reject) { + var abort = processReply( + value, + "", + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + resolve, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(signal.reason); + else { + var listener = function () { + abort(signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + }); + }; + exports.registerServerReference = function ( + reference, + id, + encodeFormAction + ) { + registerBoundServerReference(reference, id, null, encodeFormAction); + return reference; + }; + })(); diff --git a/.socket/blob/0bb0199a6e52543ca7890624406f6f6f6a87095bcbdf4ace721ce7488054b742 b/.socket/blob/0bb0199a6e52543ca7890624406f6f6f6a87095bcbdf4ace721ce7488054b742 new file mode 100644 index 0000000..cb547ef --- /dev/null +++ b/.socket/blob/0bb0199a6e52543ca7890624406f6f6f6a87095bcbdf4ace721ce7488054b742 @@ -0,0 +1,5053 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-webpack-client.edge.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function resolveClientReference(bundlerConfig, metadata) { + if (bundlerConfig) { + var moduleExports = bundlerConfig[metadata[0]]; + if ((bundlerConfig = moduleExports && (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0))) + moduleExports = bundlerConfig.name; + else { + bundlerConfig = moduleExports && moduleExports["*"]; + if (!bundlerConfig) + throw Error( + 'Could not find the module "' + + metadata[0] + + '" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.' + ); + moduleExports = metadata[2]; + } + return 4 === metadata.length + ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1] + : [bundlerConfig.id, bundlerConfig.chunks, moduleExports]; + } + return metadata; + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + + ) { + var chunkId = chunks[i++]; + chunks[i++]; + var entry = chunkCache.get(chunkId); + if (void 0 === entry) { + entry = __webpack_chunk_load__(chunkId); + promises.push(entry); + var resolve = chunkCache.set.bind(chunkCache, chunkId, null); + entry.then(resolve, ignoreReject); + chunkCache.set(chunkId, entry); + } else null !== entry && promises.push(entry); + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function prepareDestinationWithChunks( + moduleLoading, + chunks, + nonce$jscomp$0 + ) { + if (null !== moduleLoading) + for (var i = 1; i < chunks.length; i += 2) { + var nonce = nonce$jscomp$0, + JSCompiler_temp_const = ReactDOMSharedInternals.d, + JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X, + JSCompiler_temp_const$jscomp$1 = moduleLoading.prefix + chunks[i]; + var JSCompiler_inline_result = moduleLoading.crossOrigin; + JSCompiler_inline_result = + "string" === typeof JSCompiler_inline_result + ? "use-credentials" === JSCompiler_inline_result + ? JSCompiler_inline_result + : "" + : void 0; + JSCompiler_temp_const$jscomp$0.call( + JSCompiler_temp_const, + JSCompiler_temp_const$jscomp$1, + { crossOrigin: JSCompiler_inline_result, nonce: nonce } + ); + } + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function processReply( + root, + formFieldPrefix, + temporaryReferences, + resolve, + reject + ) { + function serializeTypedArray(tag, typedArray) { + typedArray = new Blob([ + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ]); + var blobId = nextPartId++; + null === formData && (formData = new FormData()); + formData.append(formFieldPrefix + blobId, typedArray); + return "$" + tag + blobId.toString(16); + } + function serializeBinaryReader(reader) { + function progress(entry) { + entry.done + ? ((entry = nextPartId++), + data.append(formFieldPrefix + entry, new Blob(buffer)), + data.append( + formFieldPrefix + streamId, + '"$o' + entry.toString(16) + '"' + ), + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data)) + : (buffer.push(entry.value), + reader.read(new Uint8Array(1024)).then(progress, reject)); + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++, + buffer = []; + reader.read(new Uint8Array(1024)).then(progress, reject); + return "$r" + streamId.toString(16); + } + function serializeReader(reader) { + function progress(entry) { + if (entry.done) + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON); + reader.read().then(progress, reject); + } catch (x) { + reject(x); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + reader.read().then(progress, reject); + return "$R" + streamId.toString(16); + } + function serializeReadableStream(stream) { + try { + var binaryReader = stream.getReader({ mode: "byob" }); + } catch (x) { + return serializeReader(stream.getReader()); + } + return serializeBinaryReader(binaryReader); + } + function serializeAsyncIterable(iterable, iterator) { + function progress(entry) { + if (entry.done) { + if (void 0 === entry.value) + data.append(formFieldPrefix + streamId, "C"); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, "C" + partJSON); + } catch (x) { + reject(x); + return; + } + pendingParts--; + 0 === pendingParts && resolve(data); + } else + try { + var _partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, _partJSON); + iterator.next().then(progress, reject); + } catch (x$0) { + reject(x$0); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + iterable = iterable === iterator; + iterator.next().then(progress, reject); + return "$" + (iterable ? "x" : "X") + streamId.toString(16); + } + function resolveToJSON(key, value) { + var originalValue = this[key]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + ("Object" !== objectName(originalValue) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(this, key) + ) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(this, key) + )); + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) { + var parentReference = writtenObjects.get(this); + if (void 0 !== parentReference) + return ( + temporaryReferences.set(parentReference + ":" + key, value), + "$T" + ); + } + throw Error( + "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + case REACT_LAZY_TYPE: + originalValue = value._payload; + var init = value._init; + null === formData && (formData = new FormData()); + pendingParts++; + try { + parentReference = init(originalValue); + var lazyId = nextPartId++, + partJSON = serializeModel(parentReference, lazyId); + formData.append(formFieldPrefix + lazyId, partJSON); + return "$" + lazyId.toString(16); + } catch (x) { + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + pendingParts++; + var _lazyId = nextPartId++; + parentReference = function () { + try { + var _partJSON2 = serializeModel(value, _lazyId), + _data = formData; + _data.append(formFieldPrefix + _lazyId, _partJSON2); + pendingParts--; + 0 === pendingParts && resolve(_data); + } catch (reason) { + reject(reason); + } + }; + x.then(parentReference, parentReference); + return "$" + _lazyId.toString(16); + } + reject(x); + return null; + } finally { + pendingParts--; + } + } + if ("function" === typeof value.then) { + null === formData && (formData = new FormData()); + pendingParts++; + var promiseId = nextPartId++; + value.then(function (partValue) { + try { + var _partJSON3 = serializeModel(partValue, promiseId); + partValue = formData; + partValue.append(formFieldPrefix + promiseId, _partJSON3); + pendingParts--; + 0 === pendingParts && resolve(partValue); + } catch (reason) { + reject(reason); + } + }, reject); + return "$@" + promiseId.toString(16); + } + parentReference = writtenObjects.get(value); + if (void 0 !== parentReference) + if (modelRoot === value) modelRoot = null; + else return parentReference; + else + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference && + ((parentReference = parentReference + ":" + key), + writtenObjects.set(value, parentReference), + void 0 !== temporaryReferences && + temporaryReferences.set(parentReference, value))); + if (isArrayImpl(value)) return value; + if (value instanceof FormData) { + null === formData && (formData = new FormData()); + var _data3 = formData; + key = nextPartId++; + var prefix = formFieldPrefix + key + "_"; + value.forEach(function (originalValue, originalKey) { + _data3.append(prefix + originalKey, originalValue); + }); + return "$K" + key.toString(16); + } + if (value instanceof Map) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$Q" + key.toString(16) + ); + if (value instanceof Set) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$W" + key.toString(16) + ); + if (value instanceof ArrayBuffer) + return ( + (key = new Blob([value])), + (parentReference = nextPartId++), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + parentReference, key), + "$A" + parentReference.toString(16) + ); + if (value instanceof Int8Array) + return serializeTypedArray("O", value); + if (value instanceof Uint8Array) + return serializeTypedArray("o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray("U", value); + if (value instanceof Int16Array) + return serializeTypedArray("S", value); + if (value instanceof Uint16Array) + return serializeTypedArray("s", value); + if (value instanceof Int32Array) + return serializeTypedArray("L", value); + if (value instanceof Uint32Array) + return serializeTypedArray("l", value); + if (value instanceof Float32Array) + return serializeTypedArray("G", value); + if (value instanceof Float64Array) + return serializeTypedArray("g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray("M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray("m", value); + if (value instanceof DataView) return serializeTypedArray("V", value); + if ("function" === typeof Blob && value instanceof Blob) + return ( + null === formData && (formData = new FormData()), + (key = nextPartId++), + formData.append(formFieldPrefix + key, value), + "$B" + key.toString(16) + ); + if ((parentReference = getIteratorFn(value))) + return ( + (parentReference = parentReference.call(value)), + parentReference === value + ? ((key = nextPartId++), + (parentReference = serializeModel( + Array.from(parentReference), + key + )), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$i" + key.toString(16)) + : Array.from(parentReference) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(value); + parentReference = value[ASYNC_ITERATOR]; + if ("function" === typeof parentReference) + return serializeAsyncIterable(value, parentReference.call(value)); + parentReference = getPrototypeOf(value); + if ( + parentReference !== ObjectPrototype && + (null === parentReference || + null !== getPrototypeOf(parentReference)) + ) { + if (void 0 === temporaryReferences) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(this, key) + ); + return "$T"; + } + value.$$typeof === REACT_CONTEXT_TYPE + ? console.error( + "React Context Providers cannot be passed to Server Functions from the Client.%s", + describeObjectForErrorMessage(this, key) + ) + : "Object" !== objectName(value) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(this, key) + ) + : isSimpleObject(value) + ? Object.getOwnPropertySymbols && + ((parentReference = Object.getOwnPropertySymbols(value)), + 0 < parentReference.length && + console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s", + parentReference[0].description, + describeObjectForErrorMessage(this, key) + )) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(this, key) + ); + return value; + } + if ("string" === typeof value) { + if ("Z" === value[value.length - 1] && this[key] instanceof Date) + return "$D" + value; + key = "$" === value[0] ? "$" + value : value; + return key; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + parentReference = knownServerReferences.get(value); + if (void 0 !== parentReference) + return ( + (key = JSON.stringify( + { id: parentReference.id, bound: parentReference.bound }, + resolveToJSON + )), + null === formData && (formData = new FormData()), + (parentReference = nextPartId++), + formData.set(formFieldPrefix + parentReference, key), + "$F" + parentReference.toString(16) + ); + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again." + ); + } + if ("symbol" === typeof value) { + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported as an argument to a Server Function." + ); + } + function serializeModel(model, id) { + "object" === typeof model && + null !== model && + ((id = "$" + id.toString(16)), + writtenObjects.set(model, id), + void 0 !== temporaryReferences && temporaryReferences.set(id, model)); + modelRoot = model; + return JSON.stringify(model, resolveToJSON); + } + var nextPartId = 1, + pendingParts = 0, + formData = null, + writtenObjects = new WeakMap(), + modelRoot = root, + json = serializeModel(root, 0); + null === formData + ? resolve(json) + : (formData.set(formFieldPrefix + "0", json), + 0 === pendingParts && resolve(formData)); + return function () { + 0 < pendingParts && + ((pendingParts = 0), + null === formData ? resolve(json) : resolve(formData)); + }; + } + function encodeFormData(reference) { + var resolve, + reject, + thenable = new Promise(function (res, rej) { + resolve = res; + reject = rej; + }); + processReply( + reference, + "", + void 0, + function (body) { + if ("string" === typeof body) { + var data = new FormData(); + data.append("0", body); + body = data; + } + thenable.status = "fulfilled"; + thenable.value = body; + resolve(body); + }, + function (e) { + thenable.status = "rejected"; + thenable.reason = e; + reject(e); + } + ); + return thenable; + } + function defaultEncodeFormAction(identifierPrefix) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var data = null; + if (null !== referenceClosure.bound) { + data = boundCache.get(referenceClosure); + data || + ((data = encodeFormData({ + id: referenceClosure.id, + bound: referenceClosure.bound + })), + boundCache.set(referenceClosure, data)); + if ("rejected" === data.status) throw data.reason; + if ("fulfilled" !== data.status) throw data; + referenceClosure = data.value; + var prefixedData = new FormData(); + referenceClosure.forEach(function (value, key) { + prefixedData.append("$ACTION_" + identifierPrefix + ":" + key, value); + }); + data = prefixedData; + referenceClosure = "$ACTION_REF_" + identifierPrefix; + } else referenceClosure = "$ACTION_ID_" + referenceClosure.id; + return { + name: referenceClosure, + method: "POST", + encType: "multipart/form-data", + data: data + }; + } + function isSignatureEqual(referenceId, numberOfBoundArgs) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + if (referenceClosure.id !== referenceId) return !1; + var boundPromise = referenceClosure.bound; + if (null === boundPromise) return 0 === numberOfBoundArgs; + switch (boundPromise.status) { + case "fulfilled": + return boundPromise.value.length === numberOfBoundArgs; + case "pending": + throw boundPromise; + case "rejected": + throw boundPromise.reason; + default: + throw ( + ("string" !== typeof boundPromise.status && + ((boundPromise.status = "pending"), + boundPromise.then( + function (boundArgs) { + boundPromise.status = "fulfilled"; + boundPromise.value = boundArgs; + }, + function (error) { + boundPromise.status = "rejected"; + boundPromise.reason = error; + } + )), + boundPromise) + ); + } + } + function createFakeServerFunction( + name, + filename, + sourceMap, + line, + col, + environmentName, + innerFunction + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 >= line + ? ((line = encodedName.length + 7), + (col = + "s=>({" + + encodedName + + " ".repeat(col < line ? 0 : col - line) + + ":(...args) => s(...args)})\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */")) + : (col = + "/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */" + + "\n".repeat(line - 2) + + "server=>({" + + encodedName + + ":\n" + + " ".repeat(1 > col ? 0 : col - 1) + + "(...args) => server(...args)})"); + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((col += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?s" + + fakeServerFunctionIdx++), + (col += "\n//# sourceMappingURL=" + sourceMap)) + : filename && (col += "\n//# sourceURL=" + filename); + try { + return (0, eval)(col)(innerFunction)[name]; + } catch (x) { + return innerFunction; + } + } + function registerBoundServerReference( + reference, + id, + bound, + encodeFormAction + ) { + knownServerReferences.has(reference) || + (knownServerReferences.set(reference, { + id: id, + originalBind: reference.bind, + bound: bound + }), + Object.defineProperties(reference, { + $$FORM_ACTION: { + value: + void 0 === encodeFormAction + ? defaultEncodeFormAction + : function () { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var boundPromise = referenceClosure.bound; + null === boundPromise && + (boundPromise = Promise.resolve([])); + return encodeFormAction(referenceClosure.id, boundPromise); + } + }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + })); + } + function bind() { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) return FunctionBind.apply(this, arguments); + var newFn = referenceClosure.originalBind.apply(this, arguments); + null != arguments[0] && + console.error( + 'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().' + ); + var args = ArraySlice.call(arguments, 1), + boundPromise = null; + boundPromise = + null !== referenceClosure.bound + ? Promise.resolve(referenceClosure.bound).then(function (boundArgs) { + return boundArgs.concat(args); + }) + : Promise.resolve(args); + knownServerReferences.set(newFn, { + id: referenceClosure.id, + originalBind: newFn.bind, + bound: boundPromise + }); + Object.defineProperties(newFn, { + $$FORM_ACTION: { value: this.$$FORM_ACTION }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + }); + return newFn; + } + function createBoundServerReference( + metaData, + callServer, + encodeFormAction, + findSourceMapURL + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return bound + ? "fulfilled" === bound.status + ? callServer(id, bound.value.concat(args)) + : Promise.resolve(bound).then(function (boundArgs) { + return callServer(id, boundArgs.concat(args)); + }) + : callServer(id, args); + } + var id = metaData.id, + bound = metaData.bound, + location = metaData.location; + if (location) { + var functionName = metaData.name || "", + filename = location[1], + line = location[2]; + location = location[3]; + metaData = metaData.env || "Server"; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, metaData); + action = createFakeServerFunction( + functionName, + filename, + findSourceMapURL, + line, + location, + metaData, + action + ); + } + registerBoundServerReference(action, id, bound, encodeFormAction); + return action; + } + function parseStackLocation(error) { + error = error.stack; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + var endOfFirst = error.indexOf("\n"); + if (-1 !== endOfFirst) { + var endOfSecond = error.indexOf("\n", endOfFirst + 1); + endOfFirst = + -1 === endOfSecond + ? error.slice(endOfFirst + 1) + : error.slice(endOfFirst + 1, endOfSecond); + } else endOfFirst = error; + error = v8FrameRegExp.exec(endOfFirst); + if ( + !error && + ((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error) + ) + return null; + endOfFirst = error[1] || ""; + "" === endOfFirst && (endOfFirst = ""); + endOfSecond = error[2] || error[5] || ""; + "" === endOfSecond && (endOfSecond = ""); + return [ + endOfFirst, + endOfSecond, + +(error[3] || error[6]), + +(error[4] || error[7]) + ]; + } + function createServerReference$1( + id, + callServer, + encodeFormAction, + findSourceMapURL, + functionName + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return callServer(id, args); + } + var location = parseStackLocation(Error("react-stack-top-frame")); + if (null !== location) { + var filename = location[1], + line = location[2]; + location = location[3]; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, "Client"); + action = createFakeServerFunction( + functionName || "", + filename, + findSourceMapURL, + line, + location, + "Client", + action + ); + } + registerBoundServerReference(action, id, null, encodeFormAction); + return action; + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE + ? null + : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + 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"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ( + ("number" === typeof type.tag && + console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), + type.$$typeof) + ) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: + return ( + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" + ); + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) {} + } + return null; + } + function getArrayKind(array) { + for (var kind = 0, i = 0; i < array.length && 100 > i; i++) { + var value = array[i]; + if ("object" === typeof value && null !== value) + if ( + isArrayImpl(value) && + 2 === value.length && + "string" === typeof value[0] + ) { + if (0 !== kind && 3 !== kind) return 1; + kind = 3; + } else return 1; + else { + if ( + "function" === typeof value || + ("string" === typeof value && 50 < value.length) || + (0 !== kind && 2 !== kind) + ) + return 1; + kind = 2; + } + } + return kind; + } + function addObjectToProperties(object, properties, indent, prefix) { + var addedProperties = 0, + key; + for (key in object) + if ( + hasOwnProperty.call(object, key) && + "_" !== key[0] && + (addedProperties++, + addValueToProperties(key, object[key], properties, indent, prefix), + 100 <= addedProperties) + ) { + properties.push([ + prefix + + "\u00a0\u00a0".repeat(indent) + + "Only 100 properties are shown. React will not log more properties of this object.", + "" + ]); + break; + } + } + function addValueToProperties( + propertyName, + value, + properties, + indent, + prefix + ) { + switch (typeof value) { + case "object": + if (null === value) { + value = "null"; + break; + } else { + if (value.$$typeof === REACT_ELEMENT_TYPE) { + var typeName = getComponentNameFromType(value.type) || "\u2026", + key = value.key; + value = value.props; + var propsKeys = Object.keys(value), + propsLength = propsKeys.length; + if (null == key && 0 === propsLength) { + value = "<" + typeName + " />"; + break; + } + if ( + 3 > indent || + (1 === propsLength && + "children" === propsKeys[0] && + null == key) + ) { + value = "<" + typeName + " \u2026 />"; + break; + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "<" + typeName + ]); + null !== key && + addValueToProperties( + "key", + key, + properties, + indent + 1, + prefix + ); + propertyName = !1; + key = 0; + for (var propKey in value) + if ( + (key++, + "children" === propKey + ? null != value.children && + (!isArrayImpl(value.children) || + 0 < value.children.length) && + (propertyName = !0) + : hasOwnProperty.call(value, propKey) && + "_" !== propKey[0] && + addValueToProperties( + propKey, + value[propKey], + properties, + indent + 1, + prefix + ), + 100 <= key) + ) + break; + properties.push([ + "", + propertyName ? ">\u2026" : "/>" + ]); + return; + } + typeName = Object.prototype.toString.call(value); + propKey = typeName.slice(8, typeName.length - 1); + if ("Array" === propKey) + if ( + ((typeName = 100 < value.length), + (key = getArrayKind(value)), + 2 === key || 0 === key) + ) { + value = JSON.stringify( + typeName ? value.slice(0, 100).concat("\u2026") : value + ); + break; + } else if (3 === key) { + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "" + ]); + for ( + propertyName = 0; + propertyName < value.length && 100 > propertyName; + propertyName++ + ) + (propKey = value[propertyName]), + addValueToProperties( + propKey[0], + propKey[1], + properties, + indent + 1, + prefix + ); + typeName && + addValueToProperties( + (100).toString(), + "\u2026", + properties, + indent + 1, + prefix + ); + return; + } + if ("Promise" === propKey) { + if ("fulfilled" === value.status) { + if ( + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.value, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = + "Promise<" + (properties[1] || "Object") + ">"; + return; + } + } else if ( + "rejected" === value.status && + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.reason, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = "Rejected Promise<" + properties[1] + ">"; + return; + } + properties.push([ + "\u00a0\u00a0".repeat(indent) + propertyName, + "Promise" + ]); + return; + } + "Object" === propKey && + (typeName = Object.getPrototypeOf(value)) && + "function" === typeof typeName.constructor && + (propKey = typeName.constructor.name); + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "Object" === propKey ? (3 > indent ? "" : "\u2026") : propKey + ]); + 3 > indent && + addObjectToProperties(value, properties, indent + 1, prefix); + return; + } + case "function": + value = "" === value.name ? "() => {}" : value.name + "() {}"; + break; + case "string": + value = + "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects." === + value + ? "\u2026" + : JSON.stringify(value); + break; + case "undefined": + value = "undefined"; + break; + case "boolean": + value = value ? "true" : "false"; + break; + default: + value = String(value); + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + value + ]); + } + function getIODescription(value) { + try { + switch (typeof value) { + case "function": + return value.name || ""; + case "object": + if (null === value) return ""; + if (value instanceof Error) return String(value.message); + if ("string" === typeof value.url) return value.url; + if ("string" === typeof value.href) return value.href; + if ("string" === typeof value.src) return value.src; + if ("string" === typeof value.currentSrc) return value.currentSrc; + if ("string" === typeof value.command) return value.command; + if ( + "object" === typeof value.request && + null !== value.request && + "string" === typeof value.request.url + ) + return value.request.url; + if ( + "object" === typeof value.response && + null !== value.response && + "string" === typeof value.response.url + ) + return value.response.url; + if ( + "string" === typeof value.id || + "number" === typeof value.id || + "bigint" === typeof value.id + ) + return String(value.id); + if ("string" === typeof value.name) return value.name; + var str = value.toString(); + return str.startsWith("[object ") || + 5 > str.length || + 500 < str.length + ? "" + : str; + case "string": + return 5 > value.length || 500 < value.length ? "" : value; + case "number": + case "bigint": + return String(value); + default: + return ""; + } + } catch (x) { + return ""; + } + } + function markAllTracksInOrder() { + supportsUserTiming && + (console.timeStamp( + "Server Requests Track", + 0.001, + 0.001, + "Server Requests \u269b", + void 0, + "primary-light" + ), + console.timeStamp( + "Server Components Track", + 0.001, + 0.001, + "Primary", + "Server Components \u269b", + "primary-light" + )); + } + function getIOColor(functionName) { + switch (functionName.charCodeAt(0) % 3) { + case 0: + return "tertiary-light"; + case 1: + return "tertiary"; + default: + return "tertiary-dark"; + } + } + function getIOLongName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + description = + "" === description ? ioInfo : ioInfo + " (" + description + ")"; + return env === rootEnv || void 0 === env + ? description + : description + " [" + env + "]"; + } + function getIOShortName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + env = env === rootEnv || void 0 === env ? "" : " [" + env + "]"; + var desc = ""; + rootEnv = 30 - ioInfo.length - env.length; + if (1 < rootEnv) { + var l = description.length; + if (0 < l && l <= rootEnv) desc = " (" + description + ")"; + else if ( + description.startsWith("http://") || + description.startsWith("https://") || + description.startsWith("/") + ) { + var queryIdx = description.indexOf("?"); + -1 === queryIdx && (queryIdx = description.length); + 47 === description.charCodeAt(queryIdx - 1) && queryIdx--; + desc = description.lastIndexOf("/", queryIdx - 1); + queryIdx - desc < rootEnv + ? (desc = " (\u2026" + description.slice(desc, queryIdx) + ")") + : ((l = description.slice(desc, desc + rootEnv / 2)), + (description = description.slice( + queryIdx - rootEnv / 2, + queryIdx + )), + (desc = + " (" + + (0 < desc ? "\u2026" : "") + + l + + "\u2026" + + description + + ")")); + } + } + return ioInfo + desc + env; + } + function logComponentAwait( + asyncInfo, + trackIdx, + startTime, + endTime, + rootEnv, + value + ) { + if (supportsUserTiming && 0 < endTime) { + var description = getIODescription(value), + name = getIOShortName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ), + entryName = "await " + name; + name = getIOColor(name); + var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("awaited value", value, properties, 0, ""); + asyncInfo = getIOLongName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: name, + track: trackNames[trackIdx], + trackGroup: "Server Components \u269b", + properties: properties, + tooltipText: asyncInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + trackNames[trackIdx], + "Server Components \u269b", + name + ); + } + } + function logIOInfoErrored(ioInfo, rootEnv, error) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(error), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + debugTask + ? ((error = [ + [ + "rejected with", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]), + (ioInfo = + getIOLongName(ioInfo, description, ioInfo.env, rootEnv) + + " Rejected"), + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: "Server Requests \u269b", + properties: error, + tooltipText: ioInfo + } + } + }) + ), + performance.clearMeasures(entryName)) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + "error" + ); + } + } + function logIOInfo(ioInfo, rootEnv, value) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(value), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + color = getIOColor(entryName), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("Resolved", value, properties, 0, ""); + ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: color, + track: "Server Requests \u269b", + properties: properties, + tooltipText: ioInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + color + ); + } + } + function prepareStackTrace(error, structuredStackTrace) { + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function ReactPromise(status, value, reason) { + this.status = status; + this.value = value; + this.reason = reason; + this._children = []; + this._debugChunk = null; + this._debugInfo = []; + } + function unwrapWeakResponse(weakResponse) { + weakResponse = weakResponse.weak.deref(); + if (void 0 === weakResponse) + throw Error( + "We did not expect to receive new data after GC:ing the response." + ); + return weakResponse; + } + function closeDebugChannel(debugChannel) { + debugChannel.callback && debugChannel.callback(""); + } + function readChunk(chunk) { + switch (chunk.status) { + case "resolved_model": + initializeModelChunk(chunk); + break; + case "resolved_module": + initializeModuleChunk(chunk); + } + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "pending": + case "blocked": + case "halted": + throw chunk; + default: + throw chunk.reason; + } + } + function getRoot(weakResponse) { + weakResponse = unwrapWeakResponse(weakResponse); + return getChunk(weakResponse, 0); + } + function createPendingChunk(response) { + 0 === response._pendingChunks++ && + ((response._weakResponse.response = response), + null !== response._pendingInitialRender && + (clearTimeout(response._pendingInitialRender), + (response._pendingInitialRender = null))); + return new ReactPromise("pending", null, null); + } + function releasePendingChunk(response, chunk) { + "pending" === chunk.status && + 0 === --response._pendingChunks && + ((response._weakResponse.response = null), + (response._pendingInitialRender = setTimeout( + flushInitialRenderPerformance.bind(null, response), + 100 + ))); + } + function moveDebugInfoFromChunkToInnerValue(chunk, value) { + value = resolveLazy(value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) || + ((chunk = chunk._debugInfo.splice(0)), + isArrayImpl(value._debugInfo) + ? value._debugInfo.unshift.apply(value._debugInfo, chunk) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: chunk + })); + } + function wakeChunk(listeners, value, chunk) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + moveDebugInfoFromChunkToInnerValue(chunk, value); + } + function rejectChunk(listeners, error) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(error) + : rejectReference(listener, error); + } + } + function resolveBlockedCycle(resolvedChunk, reference) { + var referencedChunk = reference.handler.chunk; + if (null === referencedChunk) return null; + if (referencedChunk === resolvedChunk) return reference.handler; + reference = referencedChunk.value; + if (null !== reference) + for ( + referencedChunk = 0; + referencedChunk < reference.length; + referencedChunk++ + ) { + var listener = reference[referencedChunk]; + if ( + "function" !== typeof listener && + ((listener = resolveBlockedCycle(resolvedChunk, listener)), + null !== listener) + ) + return listener; + } + return null; + } + function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) { + switch (chunk.status) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + break; + case "blocked": + for (var i = 0; i < resolveListeners.length; i++) { + var listener = resolveListeners[i]; + if ("function" !== typeof listener) { + var cyclicHandler = resolveBlockedCycle(chunk, listener); + if (null !== cyclicHandler) + switch ( + (fulfillReference(listener, cyclicHandler.value, chunk), + resolveListeners.splice(i, 1), + i--, + null !== rejectListeners && + ((listener = rejectListeners.indexOf(listener)), + -1 !== listener && rejectListeners.splice(listener, 1)), + chunk.status) + ) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + return; + case "rejected": + null !== rejectListeners && + rejectChunk(rejectListeners, chunk.reason); + return; + } + } + } + case "pending": + if (chunk.value) + for (i = 0; i < resolveListeners.length; i++) + chunk.value.push(resolveListeners[i]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for ( + resolveListeners = 0; + resolveListeners < rejectListeners.length; + resolveListeners++ + ) + chunk.reason.push(rejectListeners[resolveListeners]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && rejectChunk(rejectListeners, chunk.reason); + } + } + function triggerErrorOnChunk(response, chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + releasePendingChunk(response, chunk); + var listeners = chunk.reason; + if ("pending" === chunk.status && null != chunk._debugChunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + initializeDebugChunk(response, chunk); + } finally { + (initializingHandler = prevHandler), + (initializingChunk = prevChunk); + } + } + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && rejectChunk(listeners, error); + } + } + function createResolvedModelChunk(response, value) { + return new ReactPromise("resolved_model", value, response); + } + function createResolvedIteratorResultChunk(response, value, done) { + return new ReactPromise( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + response + ); + } + function resolveIteratorResultChunk(response, chunk, value, done) { + resolveModelChunk( + response, + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}" + ); + } + function resolveModelChunk(response, chunk, value) { + if ("pending" !== chunk.status) chunk.reason.enqueueModel(value); + else { + releasePendingChunk(response, chunk); + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = response; + null !== resolveListeners && + (initializeModelChunk(chunk), + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners)); + } + } + function resolveModuleChunk(response, chunk, value) { + if ("pending" === chunk.status || "blocked" === chunk.status) { + releasePendingChunk(response, chunk); + response = chunk.value; + var rejectListeners = chunk.reason; + chunk.status = "resolved_module"; + chunk.value = value; + value = []; + null !== value && chunk._debugInfo.push.apply(chunk._debugInfo, value); + null !== response && + (initializeModuleChunk(chunk), + wakeChunkIfInitialized(chunk, response, rejectListeners)); + } + } + function initializeDebugChunk(response, chunk) { + var debugChunk = chunk._debugChunk; + if (null !== debugChunk) { + var debugInfo = chunk._debugInfo; + try { + if ("resolved_model" === debugChunk.status) { + for ( + var idx = debugInfo.length, c = debugChunk._debugChunk; + null !== c; + + ) + "fulfilled" !== c.status && idx++, (c = c._debugChunk); + initializeModelChunk(debugChunk); + switch (debugChunk.status) { + case "fulfilled": + debugInfo[idx] = initializeDebugInfo( + response, + debugChunk.value + ); + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + debugInfo, + "" + idx, + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } else + switch (debugChunk.status) { + case "fulfilled": + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + {}, + "debug", + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } catch (error) { + triggerErrorOnChunk(response, chunk, error); + } + } + } + function initializeModelChunk(chunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + var resolvedModel = chunk.value, + response = chunk.reason; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + initializeDebugChunk(response, chunk); + try { + var value = JSON.parse(resolvedModel, response._fromJSON), + resolveListeners = chunk.value; + if (null !== resolveListeners) + for ( + chunk.value = null, chunk.reason = null, resolvedModel = 0; + resolvedModel < resolveListeners.length; + resolvedModel++ + ) { + var listener = resolveListeners[resolvedModel]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + if (null !== initializingHandler) { + if (initializingHandler.errored) throw initializingHandler.reason; + if (0 < initializingHandler.deps) { + initializingHandler.value = value; + initializingHandler.chunk = chunk; + return; + } + } + chunk.status = "fulfilled"; + chunk.value = value; + moveDebugInfoFromChunkToInnerValue(chunk, value); + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingHandler = prevHandler), (initializingChunk = prevChunk); + } + } + function initializeModuleChunk(chunk) { + try { + var value = requireModule(chunk.value); + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } + } + function reportGlobalError(weakResponse, error) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse); + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && + triggerErrorOnChunk(response, chunk, error); + }); + weakResponse = response._debugChannel; + void 0 !== weakResponse && + (closeDebugChannel(weakResponse), + (response._debugChannel = void 0), + null !== debugChannelRegistry && + debugChannelRegistry.unregister(response)); + } + } + function nullRefGetter() { + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("function" === typeof type) return '"use client"'; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return type._init === readChunk ? '"use client"' : "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function initializeElement(response, element, lazyNode) { + var stack = element._debugStack, + owner = element._owner; + null === owner && (element._owner = response._debugRootOwner); + var env = response._rootEnvironmentName; + null !== owner && null != owner.env && (env = owner.env); + var normalizedStackTrace = null; + null === owner && null != response._debugRootStack + ? (normalizedStackTrace = response._debugRootStack) + : null !== stack && + (normalizedStackTrace = createFakeJSXCallStackInDEV( + response, + stack, + env + )); + element._debugStack = normalizedStackTrace; + normalizedStackTrace = null; + supportsCreateTask && + null !== stack && + ((normalizedStackTrace = console.createTask.bind( + console, + getTaskName(element.type) + )), + (stack = buildFakeCallStack( + response, + stack, + env, + !1, + normalizedStackTrace + )), + (env = null === owner ? null : initializeFakeTask(response, owner)), + null === env + ? ((env = response._debugRootTask), + (normalizedStackTrace = null != env ? env.run(stack) : stack())) + : (normalizedStackTrace = env.run(stack))); + element._debugTask = normalizedStackTrace; + null !== owner && initializeFakeStack(response, owner); + null !== lazyNode && + (lazyNode._store && + lazyNode._store.validated && + !element._store.validated && + (element._store.validated = lazyNode._store.validated), + "fulfilled" === lazyNode._payload.status && + lazyNode._debugInfo && + ((response = lazyNode._debugInfo.splice(0)), + element._debugInfo + ? element._debugInfo.unshift.apply(element._debugInfo, response) + : Object.defineProperty(element, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: response + }))); + Object.freeze(element.props); + } + function createLazyChunkWrapper(chunk, validated) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: chunk, + _init: readChunk + }; + lazyType._debugInfo = chunk._debugInfo; + lazyType._store = { validated: validated }; + return lazyType; + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._closed + ? new ReactPromise("rejected", null, response._closedReason) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function fulfillReference(reference, value, fulfilledChunk) { + for ( + var response = reference.response, + handler = reference.handler, + parentObject = reference.parentObject, + key = reference.key, + map = reference.map, + path = reference.path, + i = 1; + i < path.length; + i++ + ) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((value = value._payload), value === handler.chunk)) + value = handler.value; + else { + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + continue; + case "blocked": + var cyclicHandler = resolveBlockedCycle(value, reference); + if (null !== cyclicHandler) { + value = cyclicHandler.value; + continue; + } + case "pending": + path.splice(0, i - 1); + null === value.value + ? (value.value = [reference]) + : value.value.push(reference); + null === value.reason + ? (value.reason = [reference]) + : value.reason.push(reference); + return; + case "halted": + return; + default: + rejectReference(reference, value.reason); + return; + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((path = value._payload), path === handler.chunk)) + value = handler.value; + else { + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + parentObject[key] = response; + "" === key && null === handler.value && (handler.value = response); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((reference = handler.value), key)) { + case "3": + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + reference.props = response; + break; + case "4": + reference._owner = response; + break; + case "5": + reference._debugStack = response; + break; + default: + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + } + else + reference.isDebug || + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + handler.deps--; + 0 === handler.deps && + ((fulfilledChunk = handler.chunk), + null !== fulfilledChunk && + "blocked" === fulfilledChunk.status && + ((key = fulfilledChunk.value), + (fulfilledChunk.status = "fulfilled"), + (fulfilledChunk.value = handler.value), + (fulfilledChunk.reason = handler.reason), + null !== key + ? wakeChunk(key, handler.value, fulfilledChunk) + : moveDebugInfoFromChunkToInnerValue( + fulfilledChunk, + handler.value + ))); + } + function rejectReference(reference, error) { + var handler = reference.handler; + reference = reference.response; + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + handler = handler.chunk; + if (null !== handler && "blocked" === handler.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + handler._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(reference, handler, error); + } + } + } + function waitForReference( + referencedChunk, + parentObject, + key, + response, + map, + path, + isAwaitingDebugInfo + ) { + if ( + !( + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + "pending" !== referencedChunk.status || + parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key) + ) + ) + return null; + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + parentObject = { + response: response, + handler: handler, + parentObject: parentObject, + key: key, + map: map, + path: path + }; + parentObject.isDebug = isAwaitingDebugInfo; + null === referencedChunk.value + ? (referencedChunk.value = [parentObject]) + : referencedChunk.value.push(parentObject); + null === referencedChunk.reason + ? (referencedChunk.reason = [parentObject]) + : referencedChunk.reason.push(parentObject); + return null; + } + function loadServerReference(response, metaData, parentObject, key) { + if (!response._serverReferenceConfig) + return createBoundServerReference( + metaData, + response._callServer, + response._encodeFormAction, + response._debugFindSourceMapURL + ); + var serverReference = resolveServerReference( + response._serverReferenceConfig, + metaData.id + ), + promise = preloadModule(serverReference); + if (promise) + metaData.bound && (promise = Promise.all([promise, metaData.bound])); + else if (metaData.bound) promise = Promise.resolve(metaData.bound); + else + return ( + (promise = requireModule(serverReference)), + registerBoundServerReference( + promise, + metaData.id, + metaData.bound, + response._encodeFormAction + ), + promise + ); + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + promise.then( + function () { + var resolvedValue = requireModule(serverReference); + if (metaData.bound) { + var boundArgs = metaData.bound.value.slice(0); + boundArgs.unshift(null); + resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs); + } + registerBoundServerReference( + resolvedValue, + metaData.id, + metaData.bound, + response._encodeFormAction + ); + parentObject[key] = resolvedValue; + "" === key && + null === handler.value && + (handler.value = resolvedValue); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((boundArgs = handler.value), key)) { + case "3": + boundArgs.props = resolvedValue; + break; + case "4": + boundArgs._owner = resolvedValue; + } + handler.deps--; + 0 === handler.deps && + ((resolvedValue = handler.chunk), + null !== resolvedValue && + "blocked" === resolvedValue.status && + ((boundArgs = resolvedValue.value), + (resolvedValue.status = "fulfilled"), + (resolvedValue.value = handler.value), + null !== boundArgs + ? wakeChunk(boundArgs, handler.value, resolvedValue) + : moveDebugInfoFromChunkToInnerValue( + resolvedValue, + handler.value + ))); + }, + function (error) { + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + var chunk = handler.chunk; + if (null !== chunk && "blocked" === chunk.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + chunk._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(response, chunk, error); + } + } + } + ); + return null; + } + function resolveLazy(value) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + var payload = value._payload; + if ("fulfilled" === payload.status) value = payload.value; + else break; + } + return value; + } + function transferReferencedDebugInfo(parentChunk, referencedChunk) { + if (null !== parentChunk) { + referencedChunk = referencedChunk._debugInfo; + parentChunk = parentChunk._debugInfo; + for (var i = 0; i < referencedChunk.length; ++i) { + var debugInfoEntry = referencedChunk[i]; + null == debugInfoEntry.name && parentChunk.push(debugInfoEntry); + } + } + } + function getOutlinedModel(response, reference, parentObject, key, map) { + var path = reference.split(":"); + reference = parseInt(path[0], 16); + reference = getChunk(response, reference); + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(reference); + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + for (var value = reference.value, i = 1; i < path.length; i++) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + value = value._payload; + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + break; + case "blocked": + case "pending": + return waitForReference( + value, + parentObject, + key, + response, + map, + path.slice(i - 1), + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), + parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = value.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: value.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + path = value._payload; + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + (parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key)) && + transferReferencedDebugInfo(initializingChunk, reference); + return response; + case "pending": + case "blocked": + return waitForReference( + reference, + parentObject, + key, + response, + map, + path, + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = reference.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: reference.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function createBlob(response, model) { + return new Blob(model.slice(1), { type: model[0] }); + } + function createFormData(response, model) { + response = new FormData(); + for (var i = 0; i < model.length; i++) + response.append(model[i][0], model[i][1]); + return response; + } + function applyConstructor(response, model, parentObject) { + Object.setPrototypeOf(parentObject, model.prototype); + } + function defineLazyGetter(response, chunk, parentObject, key) { + Object.defineProperty(parentObject, key, { + get: function () { + "resolved_model" === chunk.status && initializeModelChunk(chunk); + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "rejected": + throw chunk.reason; + } + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function getInferredFunctionApproximate(code) { + code = code.startsWith("Object.defineProperty(") + ? code.slice(22) + : code.startsWith("(") + ? code.slice(1) + : code; + if (code.startsWith("async function")) { + var idx = code.indexOf("(", 14); + if (-1 !== idx) + return ( + (code = code.slice(14, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":async function(){}})")[ + code + ] + ); + } else if (code.startsWith("function")) { + if (((idx = code.indexOf("(", 8)), -1 !== idx)) + return ( + (code = code.slice(8, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":function(){}})")[code] + ); + } else if ( + code.startsWith("class") && + ((idx = code.indexOf("{", 5)), -1 !== idx) + ) + return ( + (code = code.slice(5, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":class{}})")[code] + ); + return function () {}; + } + function parseModelString(response, parentObject, key, value) { + if ("$" === value[0]) { + if ("$" === value) + return ( + null !== initializingHandler && + "0" === key && + (initializingHandler = { + parent: initializingHandler, + chunk: null, + value: null, + reason: null, + deps: 0, + errored: !1 + }), + REACT_ELEMENT_TYPE + ); + switch (value[1]) { + case "$": + return value.slice(1); + case "L": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + createLazyChunkWrapper(response, 0) + ); + case "@": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + response + ); + case "S": + return Symbol.for(value.slice(2)); + case "F": + var ref = value.slice(2); + return getOutlinedModel( + response, + ref, + parentObject, + key, + loadServerReference + ); + case "T": + parentObject = "$" + value.slice(2); + response = response._tempRefs; + if (null == response) + throw Error( + "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply." + ); + return response.get(parentObject); + case "Q": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createMap) + ); + case "W": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createSet) + ); + case "B": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createBlob) + ); + case "K": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createFormData) + ); + case "Z": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + resolveErrorDev + ) + ); + case "i": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + extractIterator + ) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + case "P": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + applyConstructor + ) + ); + case "E": + response = value.slice(2); + try { + if (!mightHaveStaticConstructor.test(response)) + return (0, eval)(response); + } catch (x) {} + try { + if ( + ((ref = getInferredFunctionApproximate(response)), + response.startsWith("Object.defineProperty(")) + ) { + var idx = response.lastIndexOf(',"name",{value:"'); + if (-1 !== idx) { + var name = JSON.parse( + response.slice(idx + 16 - 1, response.length - 2) + ); + Object.defineProperty(ref, "name", { value: name }); + } + } + } catch (_) { + ref = function () {}; + } + return ref; + case "Y": + if ( + 2 < value.length && + (ref = response._debugChannel && response._debugChannel.callback) + ) { + if ("@" === value[2]) + return ( + (parentObject = value.slice(3)), + (key = parseInt(parentObject, 16)), + response._chunks.has(key) || ref("P:" + parentObject), + getChunk(response, key) + ); + value = value.slice(2); + idx = parseInt(value, 16); + response._chunks.has(idx) || ref("Q:" + value); + ref = getChunk(response, idx); + return "fulfilled" === ref.status + ? ref.value + : defineLazyGetter(response, ref, parentObject, key); + } + Object.defineProperty(parentObject, key, { + get: function () { + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + default: + return ( + (ref = value.slice(1)), + getOutlinedModel(response, ref, parentObject, key, createModel) + ); + } + } + return value; + } + function missingCall() { + throw Error( + 'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.' + ); + } + function markIOStarted() { + this._debugIOStarted = !0; + } + function ResponseInstance( + bundlerConfig, + serverReferenceConfig, + moduleLoading, + callServer, + encodeFormAction, + nonce, + temporaryReferences, + findSourceMapURL, + replayConsole, + environmentName, + debugStartTime, + debugChannel + ) { + var chunks = new Map(); + this._bundlerConfig = bundlerConfig; + this._serverReferenceConfig = serverReferenceConfig; + this._moduleLoading = moduleLoading; + this._callServer = void 0 !== callServer ? callServer : missingCall; + this._encodeFormAction = encodeFormAction; + this._nonce = nonce; + this._chunks = chunks; + this._stringDecoder = new TextDecoder(); + this._fromJSON = null; + this._closed = !1; + this._closedReason = null; + this._tempRefs = temporaryReferences; + this._timeOrigin = 0; + this._pendingInitialRender = null; + this._pendingChunks = 0; + this._weakResponse = { weak: new WeakRef(this), response: this }; + this._debugRootOwner = bundlerConfig = + void 0 === ReactSharedInteralsServer || + null === ReactSharedInteralsServer.A + ? null + : ReactSharedInteralsServer.A.getOwner(); + this._debugRootStack = + null !== bundlerConfig ? Error("react-stack-top-frame") : null; + environmentName = void 0 === environmentName ? "Server" : environmentName; + supportsCreateTask && + (this._debugRootTask = console.createTask( + '"use ' + environmentName.toLowerCase() + '"' + )); + this._debugStartTime = + null == debugStartTime ? performance.now() : debugStartTime; + this._debugIOStarted = !1; + setTimeout(markIOStarted.bind(this), 0); + this._debugFindSourceMapURL = findSourceMapURL; + this._debugChannel = debugChannel; + this._blockedConsole = null; + this._replayConsole = replayConsole; + this._rootEnvironmentName = environmentName; + debugChannel && + (null === debugChannelRegistry + ? (closeDebugChannel(debugChannel), (this._debugChannel = void 0)) + : debugChannelRegistry.register(this, debugChannel, this)); + replayConsole && markAllTracksInOrder(); + this._fromJSON = createFromJSONCallback(this); + } + function createStreamState(weakResponse, streamDebugValue) { + var streamState = { + _rowState: 0, + _rowID: 0, + _rowTag: 0, + _rowLength: 0, + _buffer: [] + }; + weakResponse = unwrapWeakResponse(weakResponse); + var debugValuePromise = Promise.resolve(streamDebugValue); + debugValuePromise.status = "fulfilled"; + debugValuePromise.value = streamDebugValue; + streamState._debugInfo = { + name: "rsc stream", + start: weakResponse._debugStartTime, + end: weakResponse._debugStartTime, + byteSize: 0, + value: debugValuePromise, + owner: weakResponse._debugRootOwner, + debugStack: weakResponse._debugRootStack, + debugTask: weakResponse._debugRootTask + }; + streamState._debugTargetChunkSize = MIN_CHUNK_SIZE; + return streamState; + } + function addAsyncInfo(chunk, asyncInfo) { + var value = resolveLazy(chunk.value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) + ? chunk._debugInfo.push(asyncInfo) + : isArrayImpl(value._debugInfo) + ? value._debugInfo.push(asyncInfo) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: [asyncInfo] + }); + } + function resolveChunkDebugInfo(response, streamState, chunk) { + response._debugIOStarted && + ((response = { awaited: streamState._debugInfo }), + "pending" === chunk.status || "blocked" === chunk.status + ? ((response = addAsyncInfo.bind(null, chunk, response)), + chunk.then(response, response)) + : addAsyncInfo(chunk, response)); + } + function resolveBuffer(response, id, buffer, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : (chunk && releasePendingChunk(response, chunk), + (buffer = new ReactPromise("fulfilled", buffer, null)), + resolveChunkDebugInfo(response, streamState, buffer), + chunks.set(id, buffer)); + } + function resolveModule(response, id, model, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + model = JSON.parse(model, response._fromJSON); + var clientReference = resolveClientReference( + response._bundlerConfig, + model + ); + prepareDestinationWithChunks( + response._moduleLoading, + model[1], + response._nonce + ); + if ((model = preloadModule(clientReference))) { + if (chunk) { + releasePendingChunk(response, chunk); + var blockedChunk = chunk; + blockedChunk.status = "blocked"; + } else + (blockedChunk = new ReactPromise("blocked", null, null)), + chunks.set(id, blockedChunk); + resolveChunkDebugInfo(response, streamState, blockedChunk); + model.then( + function () { + return resolveModuleChunk(response, blockedChunk, clientReference); + }, + function (error) { + return triggerErrorOnChunk(response, blockedChunk, error); + } + ); + } else + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModuleChunk(response, chunk, clientReference)) + : ((chunk = new ReactPromise( + "resolved_module", + clientReference, + null + )), + resolveChunkDebugInfo(response, streamState, chunk), + chunks.set(id, chunk)); + } + function resolveStream(response, id, stream, controller, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + if (chunk) { + if ( + (resolveChunkDebugInfo(response, streamState, chunk), + "pending" === chunk.status) + ) { + releasePendingChunk(response, chunk); + id = chunk.value; + if (null != chunk._debugChunk) { + streamState = initializingHandler; + chunks = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + if ( + (initializeDebugChunk(response, chunk), + null !== initializingHandler && + !initializingHandler.errored && + 0 < initializingHandler.deps) + ) { + initializingHandler.value = stream; + initializingHandler.reason = controller; + initializingHandler.chunk = chunk; + return; + } + } finally { + (initializingHandler = streamState), (initializingChunk = chunks); + } + } + chunk.status = "fulfilled"; + chunk.value = stream; + chunk.reason = controller; + null !== id + ? wakeChunk(id, chunk.value, chunk) + : moveDebugInfoFromChunkToInnerValue(chunk, stream); + } + } else + (stream = new ReactPromise("fulfilled", stream, controller)), + resolveChunkDebugInfo(response, streamState, stream), + chunks.set(id, stream); + } + function startReadableStream(response, id, type, streamState) { + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream( + response, + id, + type, + { + enqueueValue: function (value) { + null === previousBlockedChunk + ? controller.enqueue(value) + : previousBlockedChunk.then(function () { + controller.enqueue(value); + }); + }, + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = createResolvedModelChunk(response, json); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk3 = createPendingChunk(response); + _chunk3.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk3; + chunk.then(function () { + previousBlockedChunk === _chunk3 && + (previousBlockedChunk = null); + resolveModelChunk(response, _chunk3, json); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }, + streamState + ); + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function startAsyncIterable(response, id, iterator, streamState) { + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = {}; + iterable[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new ReactPromise( + "fulfilled", + { done: !0, value: void 0 }, + null + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }; + resolveStream( + response, + id, + iterator ? iterable[ASYNC_ITERATOR]() : iterable, + { + enqueueValue: function (value) { + if (nextWriteIndex === buffer.length) + buffer[nextWriteIndex] = new ReactPromise( + "fulfilled", + { done: !1, value: value }, + null + ); + else { + var chunk = buffer[nextWriteIndex], + resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "fulfilled"; + chunk.value = { done: !1, value: value }; + null !== resolveListeners && + wakeChunkIfInitialized( + chunk, + resolveListeners, + rejectListeners + ); + } + nextWriteIndex++; + }, + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !1 + ); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !0 + ); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + response, + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(response, buffer[nextWriteIndex++], error); + } + }, + streamState + ); + } + function resolveErrorDev(response, errorInfo) { + var name = errorInfo.name, + env = errorInfo.env; + var error = buildFakeCallStack( + response, + errorInfo.stack, + env, + !1, + Error.bind( + null, + errorInfo.message || + "An error occurred in the Server Components render but no message was provided" + ) + ); + var ownerTask = null; + null != errorInfo.owner && + ((errorInfo = errorInfo.owner.slice(1)), + (errorInfo = getOutlinedModel( + response, + errorInfo, + {}, + "", + createModel + )), + null !== errorInfo && + (ownerTask = initializeFakeTask(response, errorInfo))); + null === ownerTask + ? ((response = getRootTask(response, env)), + (error = null != response ? response.run(error) : error())) + : (error = ownerTask.run(error)); + error.name = name; + error.environmentName = env; + return error; + } + function createFakeFunction( + name, + filename, + sourceMap, + line, + col, + enclosingLine, + enclosingCol, + environmentName + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--; + 1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--; + 1 > line ? (line = 0) : line--; + 1 > col ? (col = 0) : col--; + if ( + line < enclosingLine || + (line === enclosingLine && col < enclosingCol) + ) + enclosingCol = enclosingLine = 0; + 1 > line + ? ((line = encodedName.length + 3), + (enclosingCol -= line), + 0 > enclosingCol && (enclosingCol = 0), + (col = col - enclosingCol - line - 3), + 0 > col && (col = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : 1 > enclosingLine + ? ((enclosingCol -= encodedName.length + 3), + 0 > enclosingCol && (enclosingCol = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})")) + : enclosingLine === line + ? ((col = col - enclosingCol - 3), + 0 > col && (col = 0), + (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})"); + encodedName = + 1 > enclosingLine + ? encodedName + + "\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + : "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + + encodedName; + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((encodedName += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?" + + fakeFunctionIdx++), + (encodedName += "\n//# sourceMappingURL=" + sourceMap)) + : (encodedName = filename + ? encodedName + ("\n//# sourceURL=" + encodeURI(filename)) + : encodedName + "\n//# sourceURL="); + try { + var fn = (0, eval)(encodedName)[name]; + } catch (x) { + fn = function (_) { + return _(); + }; + } + return fn; + } + function buildFakeCallStack( + response, + stack, + environmentName, + useEnclosingLine, + innerCall + ) { + for (var i = 0; i < stack.length; i++) { + var frame = stack[i], + frameKey = + frame.join("-") + + "-" + + environmentName + + (useEnclosingLine ? "-e" : "-n"), + fn = fakeFunctionCache.get(frameKey); + if (void 0 === fn) { + fn = frame[0]; + var filename = frame[1], + line = frame[2], + col = frame[3], + enclosingLine = frame[4]; + frame = frame[5]; + var findSourceMapURL = response._debugFindSourceMapURL; + findSourceMapURL = findSourceMapURL + ? findSourceMapURL(filename, environmentName) + : null; + fn = createFakeFunction( + fn, + filename, + findSourceMapURL, + line, + col, + useEnclosingLine ? line : enclosingLine, + useEnclosingLine ? col : frame, + environmentName + ); + fakeFunctionCache.set(frameKey, fn); + } + innerCall = fn.bind(null, innerCall); + } + return innerCall; + } + function getRootTask(response, childEnvironmentName) { + var rootTask = response._debugRootTask; + return rootTask + ? response._rootEnvironmentName !== childEnvironmentName + ? ((response = console.createTask.bind( + console, + '"use ' + childEnvironmentName.toLowerCase() + '"' + )), + rootTask.run(response)) + : rootTask + : null; + } + function initializeFakeTask(response, debugInfo) { + if (!supportsCreateTask || null == debugInfo.stack) return null; + var cachedEntry = debugInfo.debugTask; + if (void 0 !== cachedEntry) return cachedEntry; + var useEnclosingLine = void 0 === debugInfo.key, + stack = debugInfo.stack, + env = + null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env; + cachedEntry = + null == debugInfo.owner || null == debugInfo.owner.env + ? response._rootEnvironmentName + : debugInfo.owner.env; + var ownerTask = + null == debugInfo.owner + ? null + : initializeFakeTask(response, debugInfo.owner); + env = + env !== cachedEntry + ? '"use ' + env.toLowerCase() + '"' + : void 0 !== debugInfo.key + ? "<" + (debugInfo.name || "...") + ">" + : void 0 !== debugInfo.name + ? debugInfo.name || "unknown" + : "await " + (debugInfo.awaited.name || "unknown"); + env = console.createTask.bind(console, env); + useEnclosingLine = buildFakeCallStack( + response, + stack, + cachedEntry, + useEnclosingLine, + env + ); + null === ownerTask + ? ((response = getRootTask(response, cachedEntry)), + (response = + null != response + ? response.run(useEnclosingLine) + : useEnclosingLine())) + : (response = ownerTask.run(useEnclosingLine)); + return (debugInfo.debugTask = response); + } + function fakeJSXCallSite() { + return Error("react-stack-top-frame"); + } + function initializeFakeStack(response, debugInfo) { + if (void 0 === debugInfo.debugStack) { + null != debugInfo.stack && + (debugInfo.debugStack = createFakeJSXCallStackInDEV( + response, + debugInfo.stack, + null == debugInfo.env ? "" : debugInfo.env + )); + var owner = debugInfo.owner; + null != owner && + (initializeFakeStack(response, owner), + void 0 === owner.debugLocation && + null != debugInfo.debugStack && + (owner.debugLocation = debugInfo.debugStack)); + } + } + function initializeDebugInfo(response, debugInfo) { + void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo); + if (null == debugInfo.owner && null != response._debugRootOwner) { + var _componentInfoOrAsyncInfo = debugInfo; + _componentInfoOrAsyncInfo.owner = response._debugRootOwner; + _componentInfoOrAsyncInfo.stack = null; + _componentInfoOrAsyncInfo.debugStack = response._debugRootStack; + _componentInfoOrAsyncInfo.debugTask = response._debugRootTask; + } else + void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo); + "number" === typeof debugInfo.time && + (debugInfo = { time: debugInfo.time + response._timeOrigin }); + return debugInfo; + } + function getCurrentStackInDEV() { + var owner = currentOwnerInDEV; + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = prepareStackTrace; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function resolveConsoleEntry(response, json) { + if (response._replayConsole) { + var blockedChunk = response._blockedConsole; + if (null == blockedChunk) + (blockedChunk = createResolvedModelChunk(response, json)), + initializeModelChunk(blockedChunk), + "fulfilled" === blockedChunk.status + ? replayConsoleWithCallStackInDEV(response, blockedChunk.value) + : (blockedChunk.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ), + (response._blockedConsole = blockedChunk)); + else { + var _chunk4 = createPendingChunk(response); + _chunk4.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ); + response._blockedConsole = _chunk4; + var unblock = function () { + response._blockedConsole === _chunk4 && + (response._blockedConsole = null); + resolveModelChunk(response, _chunk4, json); + }; + blockedChunk.then(unblock, unblock); + } + } + } + function initializeIOInfo(response, ioInfo) { + void 0 !== ioInfo.stack && + (initializeFakeTask(response, ioInfo), + initializeFakeStack(response, ioInfo)); + ioInfo.start += response._timeOrigin; + ioInfo.end += response._timeOrigin; + if (response._replayConsole) { + response = response._rootEnvironmentName; + var promise = ioInfo.value; + if (promise) + switch (promise.status) { + case "fulfilled": + logIOInfo(ioInfo, response, promise.value); + break; + case "rejected": + logIOInfoErrored(ioInfo, response, promise.reason); + break; + default: + promise.then( + logIOInfo.bind(null, ioInfo, response), + logIOInfoErrored.bind(null, ioInfo, response) + ); + } + else logIOInfo(ioInfo, response, void 0); + } + } + function resolveIOInfo(response, id, model) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk + ? (resolveModelChunk(response, chunk, model), + "resolved_model" === chunk.status && initializeModelChunk(chunk)) + : ((chunk = createResolvedModelChunk(response, model)), + chunks.set(id, chunk), + initializeModelChunk(chunk)); + "fulfilled" === chunk.status + ? initializeIOInfo(response, chunk.value) + : chunk.then( + function (v) { + initializeIOInfo(response, v); + }, + function () {} + ); + } + function mergeBuffer(buffer, lastChunk) { + for ( + var l = buffer.length, byteLength = lastChunk.length, i = 0; + i < l; + i++ + ) + byteLength += buffer[i].byteLength; + byteLength = new Uint8Array(byteLength); + for (var _i3 = (i = 0); _i3 < l; _i3++) { + var chunk = buffer[_i3]; + byteLength.set(chunk, i); + i += chunk.byteLength; + } + byteLength.set(lastChunk, i); + return byteLength; + } + function resolveTypedArray( + response, + id, + buffer, + lastChunk, + constructor, + bytesPerElement, + streamState + ) { + buffer = + 0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement + ? lastChunk + : mergeBuffer(buffer, lastChunk); + constructor = new constructor( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength / bytesPerElement + ); + resolveBuffer(response, id, constructor, streamState); + } + function flushComponentPerformance( + response$jscomp$0, + root, + trackIdx$jscomp$6, + trackTime, + parentEndTime + ) { + if (!isArrayImpl(root._children)) { + var previousResult = root._children, + previousEndTime = previousResult.endTime; + if ( + -Infinity < parentEndTime && + parentEndTime < previousEndTime && + null !== previousResult.component + ) { + var componentInfo = previousResult.component, + trackIdx = trackIdx$jscomp$6, + startTime = parentEndTime; + if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) { + var color = + componentInfo.env === response$jscomp$0._rootEnvironmentName + ? "primary-light" + : "secondary-light", + entryName = componentInfo.name + " [deduped]", + debugTask = componentInfo.debugTask; + debugTask + ? debugTask.run( + console.timeStamp.bind( + console, + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ) + ) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ); + } + } + previousResult.track = trackIdx$jscomp$6; + return previousResult; + } + var children = root._children; + var debugInfo = root._debugInfo; + if (0 === debugInfo.length && "fulfilled" === root.status) { + var resolvedValue = resolveLazy(root.value); + "object" === typeof resolvedValue && + null !== resolvedValue && + (isArrayImpl(resolvedValue) || + "function" === typeof resolvedValue[ASYNC_ITERATOR] || + resolvedValue.$$typeof === REACT_ELEMENT_TYPE || + resolvedValue.$$typeof === REACT_LAZY_TYPE) && + isArrayImpl(resolvedValue._debugInfo) && + (debugInfo = resolvedValue._debugInfo); + } + if (debugInfo) { + for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + "number" === typeof info.time && (startTime$jscomp$0 = info.time); + if ("string" === typeof info.name) { + startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++; + trackTime = startTime$jscomp$0; + break; + } + } + for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) { + var _info = debugInfo[_i4]; + if ("number" === typeof _info.time && _info.time > parentEndTime) { + parentEndTime = _info.time; + break; + } + } + } + var result = { + track: trackIdx$jscomp$6, + endTime: -Infinity, + component: null + }; + root._children = result; + for ( + var childrenEndTime = -Infinity, + childTrackIdx = trackIdx$jscomp$6, + childTrackTime = trackTime, + _i5 = 0; + _i5 < children.length; + _i5++ + ) { + var childResult = flushComponentPerformance( + response$jscomp$0, + children[_i5], + childTrackIdx, + childTrackTime, + parentEndTime + ); + null !== childResult.component && + (result.component = childResult.component); + childTrackIdx = childResult.track; + var childEndTime = childResult.endTime; + childEndTime > childTrackTime && (childTrackTime = childEndTime); + childEndTime > childrenEndTime && (childrenEndTime = childEndTime); + } + if (debugInfo) + for ( + var componentEndTime = 0, + isLastComponent = !0, + endTime = -1, + endTimeIdx = -1, + _i6 = debugInfo.length - 1; + 0 <= _i6; + _i6-- + ) { + var _info2 = debugInfo[_i6]; + if ("number" === typeof _info2.time) { + 0 === componentEndTime && (componentEndTime = _info2.time); + var time = _info2.time; + if (-1 < endTimeIdx) + for (var j = endTimeIdx - 1; j > _i6; j--) { + var candidateInfo = debugInfo[j]; + if ("string" === typeof candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var componentInfo$jscomp$0 = candidateInfo, + response = response$jscomp$0, + componentInfo$jscomp$1 = componentInfo$jscomp$0, + trackIdx$jscomp$0 = trackIdx$jscomp$6, + startTime$jscomp$1 = time, + componentEndTime$jscomp$0 = componentEndTime, + childrenEndTime$jscomp$0 = childrenEndTime; + if ( + isLastComponent && + "rejected" === root.status && + root.reason !== response._closedReason + ) { + var componentInfo$jscomp$2 = componentInfo$jscomp$1, + trackIdx$jscomp$1 = trackIdx$jscomp$0, + startTime$jscomp$2 = startTime$jscomp$1, + childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0, + error = root.reason; + if (supportsUserTiming) { + var env = componentInfo$jscomp$2.env, + name = componentInfo$jscomp$2.name, + entryName$jscomp$0 = + env === response._rootEnvironmentName || + void 0 === env + ? name + : name + " [" + env + "]", + measureName = "\u200b" + entryName$jscomp$0, + properties = [ + [ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]; + null != componentInfo$jscomp$2.key && + addValueToProperties( + "key", + componentInfo$jscomp$2.key, + properties, + 0, + "" + ); + null != componentInfo$jscomp$2.props && + addObjectToProperties( + componentInfo$jscomp$2.props, + properties, + 0, + "" + ); + performance.measure(measureName, { + start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2, + end: childrenEndTime$jscomp$1, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$1], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$0 + " Errored", + properties: properties + } + } + }); + performance.clearMeasures(measureName); + } + } else { + var componentInfo$jscomp$3 = componentInfo$jscomp$1, + trackIdx$jscomp$2 = trackIdx$jscomp$0, + startTime$jscomp$3 = startTime$jscomp$1, + childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0; + if ( + supportsUserTiming && + 0 <= childrenEndTime$jscomp$2 && + 10 > trackIdx$jscomp$2 + ) { + var env$jscomp$0 = componentInfo$jscomp$3.env, + name$jscomp$0 = componentInfo$jscomp$3.name, + isPrimaryEnv = + env$jscomp$0 === response._rootEnvironmentName, + selfTime = + componentEndTime$jscomp$0 - startTime$jscomp$3, + color$jscomp$0 = + 0.5 > selfTime + ? isPrimaryEnv + ? "primary-light" + : "secondary-light" + : 50 > selfTime + ? isPrimaryEnv + ? "primary" + : "secondary" + : 500 > selfTime + ? isPrimaryEnv + ? "primary-dark" + : "secondary-dark" + : "error", + debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask, + measureName$jscomp$0 = + "\u200b" + + (isPrimaryEnv || void 0 === env$jscomp$0 + ? name$jscomp$0 + : name$jscomp$0 + " [" + env$jscomp$0 + "]"); + if (debugTask$jscomp$0) { + var properties$jscomp$0 = []; + null != componentInfo$jscomp$3.key && + addValueToProperties( + "key", + componentInfo$jscomp$3.key, + properties$jscomp$0, + 0, + "" + ); + null != componentInfo$jscomp$3.props && + addObjectToProperties( + componentInfo$jscomp$3.props, + properties$jscomp$0, + 0, + "" + ); + debugTask$jscomp$0.run( + performance.measure.bind( + performance, + measureName$jscomp$0, + { + start: + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + end: childrenEndTime$jscomp$2, + detail: { + devtools: { + color: color$jscomp$0, + track: trackNames[trackIdx$jscomp$2], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(measureName$jscomp$0); + } else + console.timeStamp( + measureName$jscomp$0, + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + childrenEndTime$jscomp$2, + trackNames[trackIdx$jscomp$2], + "Server Components \u269b", + color$jscomp$0 + ); + } + } + componentEndTime = time; + result.component = componentInfo$jscomp$0; + isLastComponent = !1; + } else if ( + candidateInfo.awaited && + null != candidateInfo.awaited.env + ) { + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo = candidateInfo, + env$jscomp$1 = response$jscomp$0._rootEnvironmentName, + promise = asyncInfo.awaited.value; + if (promise) { + var thenable = promise; + switch (thenable.status) { + case "fulfilled": + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + thenable.value + ); + break; + case "rejected": + var asyncInfo$jscomp$0 = asyncInfo, + trackIdx$jscomp$3 = trackIdx$jscomp$6, + startTime$jscomp$4 = time, + endTime$jscomp$0 = endTime, + rootEnv = env$jscomp$1, + error$jscomp$0 = thenable.reason; + if (supportsUserTiming && 0 < endTime$jscomp$0) { + var description = getIODescription(error$jscomp$0), + entryName$jscomp$1 = + "await " + + getIOShortName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ), + debugTask$jscomp$1 = + asyncInfo$jscomp$0.debugTask || + asyncInfo$jscomp$0.awaited.debugTask; + if (debugTask$jscomp$1) { + var properties$jscomp$1 = [ + [ + "Rejected", + "object" === typeof error$jscomp$0 && + null !== error$jscomp$0 && + "string" === typeof error$jscomp$0.message + ? String(error$jscomp$0.message) + : String(error$jscomp$0) + ] + ], + tooltipText = + getIOLongName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ) + " Rejected"; + debugTask$jscomp$1.run( + performance.measure.bind( + performance, + entryName$jscomp$1, + { + start: + 0 > startTime$jscomp$4 + ? 0 + : startTime$jscomp$4, + end: endTime$jscomp$0, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$3], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$1, + tooltipText: tooltipText + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$1); + } else + console.timeStamp( + entryName$jscomp$1, + 0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4, + endTime$jscomp$0, + trackNames[trackIdx$jscomp$3], + "Server Components \u269b", + "error" + ); + } + break; + default: + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } else + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } + else { + endTime = time; + for (var _j = debugInfo.length - 1; _j > _i6; _j--) { + var _candidateInfo = debugInfo[_j]; + if ("string" === typeof _candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var _componentInfo = _candidateInfo, + _env = response$jscomp$0._rootEnvironmentName, + componentInfo$jscomp$4 = _componentInfo, + trackIdx$jscomp$4 = trackIdx$jscomp$6, + startTime$jscomp$5 = time, + childrenEndTime$jscomp$3 = childrenEndTime; + if (supportsUserTiming) { + var env$jscomp$2 = componentInfo$jscomp$4.env, + name$jscomp$1 = componentInfo$jscomp$4.name, + entryName$jscomp$2 = + env$jscomp$2 === _env || void 0 === env$jscomp$2 + ? name$jscomp$1 + : name$jscomp$1 + " [" + env$jscomp$2 + "]", + measureName$jscomp$1 = "\u200b" + entryName$jscomp$2, + properties$jscomp$2 = [ + [ + "Aborted", + "The stream was aborted before this Component finished rendering." + ] + ]; + null != componentInfo$jscomp$4.key && + addValueToProperties( + "key", + componentInfo$jscomp$4.key, + properties$jscomp$2, + 0, + "" + ); + null != componentInfo$jscomp$4.props && + addObjectToProperties( + componentInfo$jscomp$4.props, + properties$jscomp$2, + 0, + "" + ); + performance.measure(measureName$jscomp$1, { + start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5, + end: childrenEndTime$jscomp$3, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$4], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$2 + " Aborted", + properties: properties$jscomp$2 + } + } + }); + performance.clearMeasures(measureName$jscomp$1); + } + componentEndTime = time; + result.component = _componentInfo; + isLastComponent = !1; + } else if ( + _candidateInfo.awaited && + null != _candidateInfo.awaited.env + ) { + var _asyncInfo = _candidateInfo, + _env2 = response$jscomp$0._rootEnvironmentName; + _asyncInfo.awaited.end > endTime && + (endTime = _asyncInfo.awaited.end); + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo$jscomp$1 = _asyncInfo, + trackIdx$jscomp$5 = trackIdx$jscomp$6, + startTime$jscomp$6 = time, + endTime$jscomp$1 = endTime, + rootEnv$jscomp$0 = _env2; + if (supportsUserTiming && 0 < endTime$jscomp$1) { + var entryName$jscomp$3 = + "await " + + getIOShortName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ), + debugTask$jscomp$2 = + asyncInfo$jscomp$1.debugTask || + asyncInfo$jscomp$1.awaited.debugTask; + if (debugTask$jscomp$2) { + var tooltipText$jscomp$0 = + getIOLongName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ) + " Aborted"; + debugTask$jscomp$2.run( + performance.measure.bind( + performance, + entryName$jscomp$3, + { + start: + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + end: endTime$jscomp$1, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$5], + trackGroup: "Server Components \u269b", + properties: [ + [ + "Aborted", + "The stream was aborted before this Promise resolved." + ] + ], + tooltipText: tooltipText$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$3); + } else + console.timeStamp( + entryName$jscomp$3, + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + endTime$jscomp$1, + trackNames[trackIdx$jscomp$5], + "Server Components \u269b", + "warning" + ); + } + } + } + } + endTime = time; + endTimeIdx = _i6; + } + } + result.endTime = childrenEndTime; + return result; + } + function flushInitialRenderPerformance(response) { + if (response._replayConsole) { + var rootChunk = getChunk(response, 0); + isArrayImpl(rootChunk._children) && + (markAllTracksInOrder(), + flushComponentPerformance( + response, + rootChunk, + 0, + -Infinity, + -Infinity + )); + } + } + function processFullBinaryRow( + response, + streamState, + id, + tag, + buffer, + chunk + ) { + switch (tag) { + case 65: + resolveBuffer( + response, + id, + mergeBuffer(buffer, chunk).buffer, + streamState + ); + return; + case 79: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int8Array, + 1, + streamState + ); + return; + case 111: + resolveBuffer( + response, + id, + 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk), + streamState + ); + return; + case 85: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint8ClampedArray, + 1, + streamState + ); + return; + case 83: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int16Array, + 2, + streamState + ); + return; + case 115: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint16Array, + 2, + streamState + ); + return; + case 76: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int32Array, + 4, + streamState + ); + return; + case 108: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint32Array, + 4, + streamState + ); + return; + case 71: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float32Array, + 4, + streamState + ); + return; + case 103: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float64Array, + 8, + streamState + ); + return; + case 77: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigInt64Array, + 8, + streamState + ); + return; + case 109: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigUint64Array, + 8, + streamState + ); + return; + case 86: + resolveTypedArray( + response, + id, + buffer, + chunk, + DataView, + 1, + streamState + ); + return; + } + for ( + var stringDecoder = response._stringDecoder, row = "", i = 0; + i < buffer.length; + i++ + ) + row += stringDecoder.decode(buffer[i], decoderOptions); + buffer = row += stringDecoder.decode(chunk); + switch (tag) { + case 73: + resolveModule(response, id, buffer, streamState); + break; + case 72: + id = buffer[0]; + streamState = buffer.slice(1); + response = JSON.parse(streamState, response._fromJSON); + streamState = ReactDOMSharedInternals.d; + switch (id) { + case "D": + streamState.D(response); + break; + case "C": + "string" === typeof response + ? streamState.C(response) + : streamState.C(response[0], response[1]); + break; + case "L": + id = response[0]; + buffer = response[1]; + 3 === response.length + ? streamState.L(id, buffer, response[2]) + : streamState.L(id, buffer); + break; + case "m": + "string" === typeof response + ? streamState.m(response) + : streamState.m(response[0], response[1]); + break; + case "X": + "string" === typeof response + ? streamState.X(response) + : streamState.X(response[0], response[1]); + break; + case "S": + "string" === typeof response + ? streamState.S(response) + : streamState.S( + response[0], + 0 === response[1] ? void 0 : response[1], + 3 === response.length ? response[2] : void 0 + ); + break; + case "M": + "string" === typeof response + ? streamState.M(response) + : streamState.M(response[0], response[1]); + } + break; + case 69: + tag = response._chunks; + chunk = tag.get(id); + buffer = JSON.parse(buffer); + stringDecoder = resolveErrorDev(response, buffer); + stringDecoder.digest = buffer.digest; + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + triggerErrorOnChunk(response, chunk, stringDecoder)) + : ((buffer = new ReactPromise("rejected", null, stringDecoder)), + resolveChunkDebugInfo(response, streamState, buffer), + tag.set(id, buffer)); + break; + case 84: + tag = response._chunks; + (chunk = tag.get(id)) && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : (chunk && releasePendingChunk(response, chunk), + (buffer = new ReactPromise("fulfilled", buffer, null)), + resolveChunkDebugInfo(response, streamState, buffer), + tag.set(id, buffer)); + break; + case 78: + response._timeOrigin = +buffer - performance.timeOrigin; + break; + case 68: + id = getChunk(response, id); + "fulfilled" !== id.status && + "rejected" !== id.status && + "halted" !== id.status && + "blocked" !== id.status && + "resolved_module" !== id.status && + ((streamState = id._debugChunk), + (tag = createResolvedModelChunk(response, buffer)), + (tag._debugChunk = streamState), + (id._debugChunk = tag), + initializeDebugChunk(response, id), + "blocked" !== tag.status || + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + '"' !== buffer[0] || + "$" !== buffer[1] || + ((streamState = buffer.slice(2, buffer.length - 1).split(":")), + (streamState = parseInt(streamState[0], 16)), + "pending" === getChunk(response, streamState).status && + (id._debugChunk = null))); + break; + case 74: + resolveIOInfo(response, id, buffer); + break; + case 87: + resolveConsoleEntry(response, buffer); + break; + case 82: + startReadableStream(response, id, void 0, streamState); + break; + case 114: + startReadableStream(response, id, "bytes", streamState); + break; + case 88: + startAsyncIterable(response, id, !1, streamState); + break; + case 120: + startAsyncIterable(response, id, !0, streamState); + break; + case 67: + (response = response._chunks.get(id)) && + "fulfilled" === response.status && + response.reason.close("" === buffer ? '"$undefined"' : buffer); + break; + default: + if ("" === buffer) { + if ( + ((streamState = response._chunks), + (buffer = streamState.get(id)) || + streamState.set(id, (buffer = createPendingChunk(response))), + "pending" === buffer.status || "blocked" === buffer.status) + ) + releasePendingChunk(response, buffer), + (response = buffer), + (response.status = "halted"), + (response.value = null), + (response.reason = null); + } else + (tag = response._chunks), + (chunk = tag.get(id)) + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModelChunk(response, chunk, buffer)) + : ((buffer = createResolvedModelChunk(response, buffer)), + resolveChunkDebugInfo(response, streamState, buffer), + tag.set(id, buffer)); + } + } + function createFromJSONCallback(response) { + return function (key, value) { + if ("string" === typeof value) + return parseModelString(response, this, key, value); + if ("object" === typeof value && null !== value) { + if (value[0] === REACT_ELEMENT_TYPE) + b: { + var owner = value[4], + stack = value[5]; + key = value[6]; + value = { + $$typeof: REACT_ELEMENT_TYPE, + type: value[1], + key: value[2], + props: value[3], + _owner: void 0 === owner ? null : owner + }; + Object.defineProperty(value, "ref", { + enumerable: !1, + get: nullRefGetter + }); + value._store = {}; + Object.defineProperty(value._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: key + }); + Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + Object.defineProperty(value, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: void 0 === stack ? null : stack + }); + Object.defineProperty(value, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + if (null !== initializingHandler) { + owner = initializingHandler; + initializingHandler = owner.parent; + if (owner.errored) { + stack = new ReactPromise("rejected", null, owner.reason); + initializeElement(response, value, null); + owner = { + name: getComponentNameFromType(value.type) || "", + owner: value._owner + }; + owner.debugStack = value._debugStack; + supportsCreateTask && (owner.debugTask = value._debugTask); + stack._debugInfo = [owner]; + key = createLazyChunkWrapper(stack, key); + break b; + } + if (0 < owner.deps) { + stack = new ReactPromise("blocked", null, null); + owner.value = value; + owner.chunk = stack; + key = createLazyChunkWrapper(stack, key); + value = initializeElement.bind(null, response, value, key); + stack.then(value, value); + break b; + } + } + initializeElement(response, value, null); + key = value; + } + else key = value; + return key; + } + return value; + }; + } + function close(weakResponse) { + reportGlobalError(weakResponse, Error("Connection closed.")); + } + function noServerCall() { + throw Error( + "Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead." + ); + } + function createResponseFromOptions(options) { + return new ResponseInstance( + options.serverConsumerManifest.moduleMap, + options.serverConsumerManifest.serverModuleMap, + options.serverConsumerManifest.moduleLoading, + noServerCall, + options.encodeFormAction, + "string" === typeof options.nonce ? options.nonce : void 0, + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + options && options.findSourceMapURL ? options.findSourceMapURL : void 0, + options ? !0 === options.replayConsoleLogs : !1, + options && options.environmentName ? options.environmentName : void 0, + options && null != options.startTime ? options.startTime : void 0, + options && void 0 !== options.debugChannel + ? { + hasReadable: void 0 !== options.debugChannel.readable, + callback: null + } + : void 0 + )._weakResponse; + } + function startReadingFromStream( + response$jscomp$0, + stream, + onDone, + debugValue + ) { + function progress(_ref) { + var value = _ref.value; + if (_ref.done) return onDone(); + _ref = streamState; + if (void 0 !== response$jscomp$0.weak.deref()) { + var response = unwrapWeakResponse(response$jscomp$0), + i = 0, + rowState = _ref._rowState, + rowID = _ref._rowID, + rowTag = _ref._rowTag, + rowLength = _ref._rowLength, + buffer = _ref._buffer, + chunkLength = value.length, + debugInfo = _ref._debugInfo, + endTime = performance.now(), + previousEndTime = debugInfo.end, + newByteLength = debugInfo.byteSize + chunkLength; + newByteLength > _ref._debugTargetChunkSize || + endTime > previousEndTime + 10 + ? ((_ref._debugInfo = { + name: debugInfo.name, + start: debugInfo.start, + end: endTime, + byteSize: newByteLength, + value: debugInfo.value, + owner: debugInfo.owner, + debugStack: debugInfo.debugStack, + debugTask: debugInfo.debugTask + }), + (_ref._debugTargetChunkSize = newByteLength + MIN_CHUNK_SIZE)) + : ((debugInfo.end = endTime), (debugInfo.byteSize = newByteLength)); + for (; i < chunkLength; ) { + debugInfo = -1; + switch (rowState) { + case 0: + debugInfo = value[i++]; + 58 === debugInfo + ? (rowState = 1) + : (rowID = + (rowID << 4) | + (96 < debugInfo ? debugInfo - 87 : debugInfo - 48)); + continue; + case 1: + rowState = value[i]; + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 35 === rowState || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + debugInfo = value[i++]; + 44 === debugInfo + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < debugInfo ? debugInfo - 87 : debugInfo - 48)); + continue; + case 3: + debugInfo = value.indexOf(10, i); + break; + case 4: + (debugInfo = i + rowLength), + debugInfo > value.length && (debugInfo = -1); + } + endTime = value.byteOffset + i; + if (-1 < debugInfo) + (rowLength = new Uint8Array( + value.buffer, + endTime, + debugInfo - i + )), + processFullBinaryRow( + response, + _ref, + rowID, + rowTag, + buffer, + rowLength + ), + (i = debugInfo), + 3 === rowState && i++, + (rowLength = rowID = rowTag = rowState = 0), + (buffer.length = 0); + else { + value = new Uint8Array( + value.buffer, + endTime, + value.byteLength - i + ); + buffer.push(value); + rowLength -= value.byteLength; + break; + } + } + _ref._rowState = rowState; + _ref._rowID = rowID; + _ref._rowTag = rowTag; + _ref._rowLength = rowLength; + } + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response$jscomp$0, e); + } + var streamState = createStreamState(response$jscomp$0, debugValue), + reader = stream.getReader(); + reader.read().then(progress).catch(error); + } + var ReactDOM = require("react-dom"), + React = require("react"), + decoderOptions = { stream: !0 }, + bind$1 = Function.prototype.bind, + chunkCache = new Map(), + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_PORTAL_TYPE = Symbol.for("react.portal"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), + REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + ObjectPrototype = Object.prototype, + knownServerReferences = new WeakMap(), + boundCache = new WeakMap(), + fakeServerFunctionIdx = 0, + FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice, + v8FrameRegExp = + /^ {3} at (?:(.+) \((.+):(\d+):(\d+)\)|(?:async )?(.+):(\d+):(\d+))$/, + jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\d+):(\d+)/, + hasOwnProperty = Object.prototype.hasOwnProperty, + REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + supportsUserTiming = + "undefined" !== typeof console && + "function" === typeof console.timeStamp && + "undefined" !== typeof performance && + "function" === typeof performance.measure, + trackNames = + "Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split( + " " + ), + prefix, + suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var ReactSharedInteralsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE || + ReactSharedInteralsServer; + ReactPromise.prototype = Object.create(Promise.prototype); + ReactPromise.prototype.then = function (resolve, reject) { + var _this = this; + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + break; + case "resolved_module": + initializeModuleChunk(this); + } + var resolveCallback = resolve, + rejectCallback = reject, + wrapperPromise = new Promise(function (res, rej) { + resolve = function (value) { + wrapperPromise._debugInfo = _this._debugInfo; + res(value); + }; + reject = function (reason) { + wrapperPromise._debugInfo = _this._debugInfo; + rej(reason); + }; + }); + wrapperPromise.then(resolveCallback, rejectCallback); + switch (this.status) { + case "fulfilled": + "function" === typeof resolve && resolve(this.value); + break; + case "pending": + case "blocked": + "function" === typeof resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + "function" === typeof reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + case "halted": + break; + default: + "function" === typeof reject && reject(this.reason); + } + }; + var debugChannelRegistry = + "function" === typeof FinalizationRegistry + ? new FinalizationRegistry(closeDebugChannel) + : null, + initializingHandler = null, + initializingChunk = null, + mightHaveStaticConstructor = /\bclass\b.*\bstatic\b/, + MIN_CHUNK_SIZE = 65536, + supportsCreateTask = !!console.createTask, + fakeFunctionCache = new Map(), + fakeFunctionIdx = 0, + createFakeJSXCallStack = { + react_stack_bottom_frame: function (response, stack, environmentName) { + return buildFakeCallStack( + response, + stack, + environmentName, + !1, + fakeJSXCallSite + )(); + } + }, + createFakeJSXCallStackInDEV = + createFakeJSXCallStack.react_stack_bottom_frame.bind( + createFakeJSXCallStack + ), + currentOwnerInDEV = null, + replayConsoleWithCallStack = { + react_stack_bottom_frame: function (response, payload) { + var methodName = payload[0], + stackTrace = payload[1], + owner = payload[2], + env = payload[3]; + payload = payload.slice(4); + var prevStack = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; + currentOwnerInDEV = null === owner ? response._debugRootOwner : owner; + try { + a: { + var offset = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + var JSCompiler_inline_result = bind$1.apply( + console[methodName], + [console].concat(payload) + ); + break a; + case "assert": + offset = 1; + } + var newArgs = payload.slice(0); + "string" === typeof newArgs[offset] + ? newArgs.splice( + offset, + 1, + "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + newArgs[offset], + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ) + : newArgs.splice( + offset, + 0, + "\u001b[0m\u001b[7m%c%s\u001b[0m%c", + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ); + newArgs.unshift(console); + JSCompiler_inline_result = bind$1.apply( + console[methodName], + newArgs + ); + } + var callStack = buildFakeCallStack( + response, + stackTrace, + env, + !1, + JSCompiler_inline_result + ); + if (null != owner) { + var task = initializeFakeTask(response, owner); + initializeFakeStack(response, owner); + if (null !== task) { + task.run(callStack); + return; + } + } + var rootTask = getRootTask(response, env); + null != rootTask ? rootTask.run(callStack) : callStack(); + } finally { + (currentOwnerInDEV = null), + (ReactSharedInternals.getCurrentStack = prevStack); + } + } + }, + replayConsoleWithCallStackInDEV = + replayConsoleWithCallStack.react_stack_bottom_frame.bind( + replayConsoleWithCallStack + ); + exports.createFromFetch = function (promiseForResponse, options) { + var response = createResponseFromOptions(options); + promiseForResponse.then( + function (r) { + if ( + options && + options.debugChannel && + options.debugChannel.readable + ) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromStream( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream(response, r.body, handleDone, r); + } else + startReadingFromStream( + response, + r.body, + close.bind(null, response), + r + ); + }, + function (e) { + reportGlobalError(response, e); + } + ); + return getRoot(response); + }; + exports.createFromReadableStream = function (stream, options) { + var response = createResponseFromOptions(options); + if (options && options.debugChannel && options.debugChannel.readable) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromStream( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream(response, stream, handleDone, stream); + } else + startReadingFromStream( + response, + stream, + close.bind(null, response), + stream + ); + return getRoot(response); + }; + exports.createServerReference = function (id) { + return createServerReference$1(id, noServerCall); + }; + exports.createTemporaryReferenceSet = function () { + return new Map(); + }; + exports.encodeReply = function (value, options) { + return new Promise(function (resolve, reject) { + var abort = processReply( + value, + "", + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + resolve, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(signal.reason); + else { + var listener = function () { + abort(signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + }); + }; + exports.registerServerReference = function ( + reference, + id, + encodeFormAction + ) { + registerBoundServerReference(reference, id, null, encodeFormAction); + return reference; + }; + })(); diff --git a/.socket/blob/0c812846e214b720f64c074c9f1ec5e18c99f3095c618741f8751fcd9be3ca0b b/.socket/blob/0c812846e214b720f64c074c9f1ec5e18c99f3095c618741f8751fcd9be3ca0b new file mode 100644 index 0000000..8de87cd --- /dev/null +++ b/.socket/blob/0c812846e214b720f64c074c9f1ec5e18c99f3095c618741f8751fcd9be3ca0b @@ -0,0 +1,3387 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-server.node.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 strict"; +var stream = require("stream"), + util = require("util"); +require("crypto"); +var async_hooks = require("async_hooks"), + ReactDOM = require("react-dom"), + React = require("react"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), + REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; +} +var ASYNC_ITERATOR = Symbol.asyncIterator, + scheduleMicrotask = queueMicrotask, + currentView = null, + writtenBytes = 0, + destinationHasCapacity = !0; +function writeToDestination(destination, view) { + destination = destination.write(view); + destinationHasCapacity = destinationHasCapacity && destination; +} +function writeChunkAndReturn(destination, chunk) { + if ("string" === typeof chunk) { + if (0 !== chunk.length) + if (4096 < 3 * chunk.length) + 0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk); + else { + var target = currentView; + 0 < writtenBytes && (target = currentView.subarray(writtenBytes)); + target = textEncoder.encodeInto(chunk, target); + var read = target.read; + writtenBytes += target.written; + read < chunk.length && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = textEncoder.encodeInto( + chunk.slice(read), + currentView + ).written)); + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)); + } + } else + 0 !== chunk.byteLength && + (4096 < chunk.byteLength + ? (0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk)) + : ((target = currentView.length - writtenBytes), + target < chunk.byteLength && + (0 === target + ? writeToDestination(destination, currentView) + : (currentView.set(chunk.subarray(0, target), writtenBytes), + (writtenBytes += target), + writeToDestination(destination, currentView), + (chunk = chunk.subarray(target))), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + currentView.set(chunk, writtenBytes), + (writtenBytes += chunk.byteLength), + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)))); + return destinationHasCapacity; +} +var textEncoder = new util.TextEncoder(); +function byteLengthOfChunk(chunk) { + return "string" === typeof chunk + ? Buffer.byteLength(chunk, "utf8") + : chunk.byteLength; +} +var CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"); +function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); +} +var FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice; +function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; +} +var PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }; +function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl({}, target.$$id, !0), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; +} +var proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; +ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: prefetchDNS, + C: preconnect, + L: preload, + m: preloadModule$1, + X: preinitScript, + S: preinitStyle, + M: preinitModuleScript +}; +function prefetchDNS(href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } +} +function preconnect(href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "C|" + (null == crossOrigin ? "null" : crossOrigin) + "|" + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } +} +function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } +} +function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } +} +function preinitStyle(href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } +} +function preinitScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } +} +function preinitModuleScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } +} +function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } +} +var requestStorage = new async_hooks.AsyncLocalStorage(), + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }; +function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; +} +function noop() {} +var SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." +); +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; +} +var currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null; +function getThenableStateAfterSuspending() { + var state = thenableState || []; + thenableState = null; + return state; +} +var HooksDispatcher = { + readContext: unsupportedContext, + use: use, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: useId, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } +}; +HooksDispatcher.useEffectEvent = unsupportedHook; +function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); +} +function unsupportedRefresh() { + throw Error("Refreshing the cache is not supported in Server Components."); +} +function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); +} +function useId() { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return "_" + currentRequest$1.identifierPrefix + "S_" + id.toString(32) + "_"; +} +function use(usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (usable.$$typeof === CLIENT_REFERENCE_TAG$1) { + if (null != usable.value && usable.value.$$typeof === REACT_CONTEXT_TYPE) + throw Error("Cannot read a Client Context from a Server Component."); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error("An unsupported type was passed to use(): " + String(usable)); +} +var DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var JSCompiler_inline_result = (JSCompiler_inline_result = + resolveRequest()) + ? JSCompiler_inline_result.cache + : new Map(); + var entry = JSCompiler_inline_result.get(resourceType); + void 0 === entry && + ((entry = resourceType()), + JSCompiler_inline_result.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }, + ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); +var isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf; +function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); +} +function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } +} +function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; +} +var CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); +function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + objKind = -1; + var length = 0; + if (isArrayImpl(objectOrArray)) { + var str = "["; + for (var i = 0; i < objectOrArray.length; i++) { + 0 < i && (str += ", "); + var value = objectOrArray[i]; + value = + "object" === typeof value && null !== value + ? describeObjectForErrorMessage(value) + : describeValueForErrorMessage(value); + "" + i === expandedName + ? ((objKind = str.length), (length = value.length), (str += value)) + : (str = + 10 > value.length && 40 > str.length + value.length + ? str + value + : str + "..."); + } + str += "]"; + } else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + str = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + str = "{"; + i = Object.keys(objectOrArray); + for (value = 0; value < i.length; value++) { + 0 < value && (str += ", "); + var name = i[value], + encodedKey = JSON.stringify(name); + str += ('"' + name + '"' === encodedKey ? name : encodedKey) + ": "; + encodedKey = objectOrArray[name]; + encodedKey = + "object" === typeof encodedKey && null !== encodedKey + ? describeObjectForErrorMessage(encodedKey) + : describeValueForErrorMessage(encodedKey); + name === expandedName + ? ((objKind = str.length), + (length = encodedKey.length), + (str += encodedKey)) + : (str = + 10 > encodedKey.length && 40 > str.length + encodedKey.length + ? str + encodedKey + : str + "..."); + } + str += "}"; + } + return void 0 === expandedName + ? str + : -1 < objKind && 0 < length + ? ((objectOrArray = " ".repeat(objKind) + "^".repeat(length)), + "\n " + str + "\n " + objectOrArray) + : "\n " + str; +} +var hasOwnProperty = Object.prototype.hasOwnProperty, + ObjectPrototype = Object.prototype, + stringify = JSON.stringify, + TaintRegistryObjects = ReactSharedInternalsServer.TaintRegistryObjects, + TaintRegistryValues = ReactSharedInternalsServer.TaintRegistryValues, + TaintRegistryByteLengths = + ReactSharedInternalsServer.TaintRegistryByteLengths, + TaintRegistryPendingRequests = + ReactSharedInternalsServer.TaintRegistryPendingRequests; +function throwTaintViolation(message) { + throw Error(message); +} +function cleanupTaintQueue(request) { + request = request.taintCleanupQueue; + TaintRegistryPendingRequests.delete(request); + for (var i = 0; i < request.length; i++) { + var entryValue = request[i], + entry = TaintRegistryValues.get(entryValue); + void 0 !== entry && + (1 === entry.count + ? TaintRegistryValues.delete(entryValue) + : entry.count--); + } + request.length = 0; +} +function defaultErrorHandler(error) { + console.error(error); +} +function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences +) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error("Currently React only supports one RSC renderer at a time."); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + var abortSet = new Set(), + pingedTasks = [], + cleanupQueue = []; + TaintRegistryPendingRequests.add(cleanupQueue); + var hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = cleanupQueue; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = void 0 === onPostpone ? noop : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + type = createTask(this, model, null, !1, 0, abortSet); + pingedTasks.push(type); +} +var currentRequest = null; +function resolveRequest() { + if (currentRequest) return currentRequest; + var store = requestStorage.getStore(); + return store ? store : null; +} +function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + switch (thenable.status) { + case "fulfilled": + return ( + (newTask.model = thenable.value), pingTask(request, newTask), newTask.id + ); + case "rejected": + return erroredTask(request, newTask, thenable.reason), newTask.id; + default: + if (12 === request.status) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + (erroredTask(request, newTask, reason), enqueueFlush(request)); + } + ); + return newTask.id; +} +function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(entry), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$8) { + error(x$8); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener("abort", abortStream), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(task); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); +} +function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModelWithFormatContext( + request, + entry.value, + 0 + ); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(endStreamRow); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + iterator.next().then(progress, error); + } catch (x$9) { + error(x$9); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + iterable = iterable === iterator; + var streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (iterable ? "x" : "X") + "\n"; + request.completedRegularChunks.push(task); + request.cacheController.signal.addEventListener("abort", abortIterable); + iterator.next().then(progress, error); + return serializeByValueID(streamTask.id); +} +function emitHint(request, code, model) { + model = stringify(model); + request.completedHintChunks.push(":H" + code + model + "\n"); + enqueueFlush(request); +} +function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; +} +function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return wakeable.value; + case "rejected": + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { $$typeof: REACT_LAZY_TYPE, _payload: wakeable, _init: readThenable }; +} +function voidHandler() {} +function processServerComponentReturnValue(request, task, Component, result) { + if ( + "object" !== typeof result || + null === result || + result.$$typeof === CLIENT_REFERENCE_TAG$1 + ) + return result; + if ("function" === typeof result.then) + return createLazyWrapperAroundWakeable(request, task, result); + var iteratorFn = getIteratorFn(result); + return iteratorFn + ? ((request = {}), + (request[Symbol.iterator] = function () { + return iteratorFn.call(result); + }), + request) + : "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((request = {}), + (request[ASYNC_ITERATOR] = function () { + return result[ASYNC_ITERATOR](); + }), + request); +} +function renderFunctionComponent(request, task, key, Component, props) { + var prevThenableState = task.thenableState; + task.thenableState = null; + thenableIndexCounter = 0; + thenableState = prevThenableState; + props = Component(props, void 0); + if (12 === request.status) + throw ( + ("object" === typeof props && + null !== props && + "function" === typeof props.then && + props.$$typeof !== CLIENT_REFERENCE_TAG$1 && + props.then(voidHandler, voidHandler), + null) + ); + props = processServerComponentReturnValue(request, task, Component, props); + Component = task.keyPath; + prevThenableState = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = prevThenableState; + return request; +} +function renderFragment(request, task, children) { + return null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children } + ]), + task.implicitSlot ? [request] : request) + : children; +} +var serializedSize = 0; +function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + pingTask(request, task); + return serializeLazyID(task.id); +} +function renderElement(request, task, type, key, ref, props) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + if ( + "function" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 && + type.$$typeof !== TEMPORARY_REFERENCE_TAG + ) + return renderFunctionComponent(request, task, key, type, props); + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + (type = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (props = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = type), + props + ); + if ( + null != type && + "object" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + var init = type._init; + type = init(type._payload); + if (12 === request.status) throw null; + return renderElement(request, task, type, key, ref, props); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent(request, task, key, type.render, props); + case REACT_MEMO_TYPE: + return renderElement(request, task, type.type, key, ref, props); + } + else + "string" === typeof type && + ((ref = task.formatContext), + (init = getChildFormatContext(ref, type, props)), + ref !== init && + null != props.children && + outlineModelWithFormatContext(request, props.children, init)); + request = key; + key = task.keyPath; + null === request + ? (request = key) + : null !== key && (request = key + "," + request); + props = [REACT_ELEMENT_TYPE, type, request, props]; + task = task.implicitSlot && null !== request ? [props] : props; + return task; +} +function pingTask(request, task) { + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : setImmediate(function () { + return performWork(request); + })); +} +function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet +) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + serializedSize += parentPropertyName.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + var JSCompiler_inline_result = renderModelDestructive( + request, + task, + this, + parentPropertyName, + value + ); + } catch (thrownValue) { + if ( + ((parentPropertyName = task.model), + (parentPropertyName = + "object" === typeof parentPropertyName && + null !== parentPropertyName && + (parentPropertyName.$$typeof === REACT_ELEMENT_TYPE || + parentPropertyName.$$typeof === REACT_LAZY_TYPE)), + 12 === request.status) + ) + (task.status = 3), + 21 === request.type + ? ((prevKeyPath = request.nextChunkId++), + (prevKeyPath = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)), + (JSCompiler_inline_result = prevKeyPath)) + : ((prevKeyPath = request.fatalError), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath))); + else if ( + ((value = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue), + "object" === typeof value && + null !== value && + "function" === typeof value.then) + ) { + JSCompiler_inline_result = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + var ping = JSCompiler_inline_result.ping; + value.then(ping, ping); + JSCompiler_inline_result.thenableState = + getThenableStateAfterSuspending(); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(JSCompiler_inline_result.id) + : serializeByValueID(JSCompiler_inline_result.id); + } else + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + request.pendingChunks++, + (prevKeyPath = request.nextChunkId++), + "object" === typeof value && + null !== value && + value.$$typeof === REACT_POSTPONE_TYPE + ? (logPostpone(request, value.message, task), + emitPostponeChunk(request, prevKeyPath)) + : ((prevImplicitSlot = logRecoverableError(request, value, task)), + emitErrorChunk(request, prevKeyPath, prevImplicitSlot)), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)); + } + return JSCompiler_inline_result; + }, + thenableState: null + }; + abortSet.add(task); + return task; +} +function serializeByValueID(id) { + return "$" + id.toString(16); +} +function serializeLazyID(id) { + return "$L" + id.toString(16); +} +function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + return id.toString(16) + ":" + request + "\n"; +} +function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference +) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var config = request.bundlerConfig, + modulePath = clientReference.$$id; + existingId = ""; + var resolvedModuleData = config[modulePath]; + if (resolvedModuleData) existingId = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((existingId = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + var JSCompiler_inline_result = + !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, existingId, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, existingId]; + request.pendingChunks++; + var importId = request.nextChunkId++, + json = stringify(JSCompiler_inline_result), + processedChunk = importId.toString(16) + ":I" + json + "\n"; + request.completedImportChunks.push(processedChunk); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName), + serializeByValueID(parent) + ); + } +} +function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks + ); + retryTask(request, value); + return value.id; +} +function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); +} +function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener("abort", abortBlob), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener("abort", abortBlob), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask(request, model, null, !1, 0, request.abortableTasks), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); +} +var modelRoot = !1; +function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value +) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var existingReference = writtenObjects.get(value); + if (void 0 !== existingReference) + if (modelRoot === value) modelRoot = null; + else return existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((parent = writtenObjects.get(parent)), + void 0 !== parent && + ((elementReference = parent + ":" + parentPropertyName), + writtenObjects.set(value, elementReference))); + } + if (3200 < serializedSize) return deferTask(request, task); + parentPropertyName = value.props; + parent = parentPropertyName.ref; + value = renderElement( + request, + task, + value.type, + value.key, + void 0 !== parent ? parent : null, + parentPropertyName + ); + "object" === typeof value && + null !== value && + null !== elementReference && + (writtenObjects.has(value) || + writtenObjects.set(value, elementReference)); + return value; + case REACT_LAZY_TYPE: + if (3200 < serializedSize) return deferTask(request, task); + task.thenableState = null; + parentPropertyName = value._init; + value = parentPropertyName(value._payload); + if (12 === request.status) throw null; + return renderModelDestructive(request, task, emptyRoot, "", value); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = TaintRegistryObjects.get(value); + void 0 !== elementReference && throwTaintViolation(elementReference); + elementReference = request.writtenObjects; + writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return "$@" + serializeThenable(request, task, value).toString(16); + if (modelRoot === value) modelRoot = null; + else return writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== writtenObjects) + if (modelRoot === value) { + if (writtenObjects !== serializeByValueID(task.id)) + return writtenObjects; + modelRoot = null; + } else return writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((writtenObjects = elementReference.get(parent)), + void 0 !== writtenObjects) + ) { + existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + existingReference = "type"; + break; + case "2": + existingReference = "key"; + break; + case "3": + existingReference = "props"; + break; + case "4": + existingReference = "_owner"; + } + elementReference.set(value, writtenObjects + ":" + existingReference); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) + return ( + (value = Array.from(value)), + "$Q" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Set) + return ( + (value = Array.from(value)), + "$W" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Error) return "$Z"; + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (parentPropertyName = elementReference.call(value)), + parentPropertyName === value + ? ((value = Array.from(parentPropertyName)), + "$i" + + outlineModelWithFormatContext(request, value, 0).toString(16)) + : renderFragment(request, task, Array.from(parentPropertyName)) + ); + if ("function" === typeof ReadableStream && value instanceof ReadableStream) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return ( + null !== task.keyPath + ? ((value = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: value } + ]), + (value = task.implicitSlot ? [value] : value)) + : ((parentPropertyName = elementReference.call(value)), + (value = serializeAsyncIterable( + request, + task, + value, + parentPropertyName + ))), + value + ); + if (value instanceof Date) return "$D" + value.toJSON(); + request = getPrototypeOf(value); + if ( + request !== ObjectPrototype && + (null === request || null !== getPrototypeOf(request)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + return value; + } + if ("string" === typeof value) { + task = TaintRegistryValues.get(value); + void 0 !== task && throwTaintViolation(task.message); + serializedSize += value.length; + if ( + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ) + return "$D" + value; + if (1024 <= value.length && null !== byteLengthOfChunk) + return ( + request.pendingChunks++, + (task = request.nextChunkId++), + emitTextChunk(request, task, value, !1), + serializeByValueID(task) + ); + value = "$" === value[0] ? "$" + value : value; + return value; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) + return Number.isFinite(value) + ? 0 === value && -Infinity === 1 / value + ? "$-0" + : value + : Infinity === value + ? "$Infinity" + : -Infinity === value + ? "$-Infinity" + : "$NaN"; + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return ( + (task = request.writtenServerReferences), + (parentPropertyName = task.get(value)), + void 0 !== parentPropertyName + ? (value = "$F" + parentPropertyName.toString(16)) + : ((parentPropertyName = value.$$bound), + (parentPropertyName = + null === parentPropertyName + ? null + : Promise.resolve(parentPropertyName)), + (request = outlineModelWithFormatContext( + request, + { id: value.$$id, bound: parentPropertyName }, + 0 + )), + task.set(value, request), + (value = "$F" + request.toString(16))), + value + ); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), void 0 !== request) + ) + return "$T" + request; + request = TaintRegistryObjects.get(value); + void 0 !== request && throwTaintViolation(request); + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + parentPropertyName = request.nextChunkId++; + parent = encodeReferenceChunk( + request, + parentPropertyName, + "$S" + elementReference + ); + request.completedImportChunks.push(parent); + task.set(value, parentPropertyName); + return serializeByValueID(parentPropertyName); + } + if ("bigint" === typeof value) + return ( + (request = TaintRegistryValues.get(value)), + void 0 !== request && throwTaintViolation(request.message), + "$n" + value.toString(10) + ); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); +} +function logPostpone(request, reason) { + var prevRequest = currentRequest; + currentRequest = null; + try { + requestStorage.run(void 0, request.onPostpone, reason); + } finally { + currentRequest = prevRequest; + } +} +function logRecoverableError(request, error) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var errorDigest = requestStorage.run(void 0, request.onError, error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; +} +function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + cleanupTaintQueue(request); + null !== request.destination + ? ((request.status = 14), request.destination.destroy(error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); +} +function emitPostponeChunk(request, id) { + id = id.toString(16) + ":P\n"; + request.completedErrorChunks.push(id); +} +function emitErrorChunk(request, id, digest) { + digest = { digest: digest }; + id = id.toString(16) + ":E" + stringify(digest) + "\n"; + request.completedErrorChunks.push(id); +} +function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + if (TaintRegistryByteLengths.has(typedArray.byteLength)) { + var tainted = TaintRegistryValues.get( + String.fromCharCode.apply( + String, + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ) + ); + void 0 !== tainted && throwTaintViolation(tainted.message); + } + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + typedArray = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + debug = typedArray.byteLength; + id = id.toString(16) + ":" + tag + debug.toString(16) + ","; + request.completedRegularChunks.push(id, typedArray); +} +function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + debug = byteLengthOfChunk(text); + id = id.toString(16) + ":T" + debug.toString(16) + ","; + request.completedRegularChunks.push(id, text); +} +function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? ((task = TaintRegistryValues.get(value)), + void 0 !== task && throwTaintViolation(task.message), + emitTextChunk(request, id, value, !1)) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk(request, id, "m", value, !1) + : value instanceof DataView + ? emitTypedArrayChunk(request, id, "V", value, !1) + : ((value = stringify(value, task.toJSON)), + (task = + task.id.toString(16) + ":" + value + "\n"), + request.completedRegularChunks.push(task)); +} +function erroredTask(request, task, error) { + task.status = 4; + "object" === typeof error && + null !== error && + error.$$typeof === REACT_POSTPONE_TYPE + ? (logPostpone(request, error.message, task), + emitPostponeChunk(request, task.id)) + : ((error = logRecoverableError(request, error, task)), + emitErrorChunk(request, task.id, error)); + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); +} +var emptyRoot = {}; +function retryTask(request, task) { + if (0 === task.status) { + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set(resolvedModel, serializeByValueID(task.id)), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel), + processedChunk = task.id.toString(16) + ":" + json + "\n"; + request.completedRegularChunks.push(processedChunk); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (12 === request.status) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + serializedSize = parentSerializedSize; + } + } +} +function tryStreamTask(request, task) { + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + serializedSize = parentSerializedSize; + } +} +function performWork(request) { + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } +} +function abortTask(task) { + 0 === task.status && (task.status = 3); +} +function finishAbortedTask(task, request, errorId) { + 3 === task.status && + ((errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); +} +function haltTask(task) { + 0 === task.status && (task.status = 3); +} +function finishHaltedTask(task, request) { + 3 === task.status && request.pendingChunks--; +} +function flushCompletedChunks(request) { + var destination = request.destination; + if (null !== destination) { + currentView = new Uint8Array(4096); + writtenBytes = 0; + destinationHasCapacity = !0; + try { + for ( + var importsChunks = request.completedImportChunks, i = 0; + i < importsChunks.length; + i++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(destination, importsChunks[i])) + ) { + request.destination = null; + i++; + break; + } + importsChunks.splice(0, i); + var hintChunks = request.completedHintChunks; + for (i = 0; i < hintChunks.length; i++) + if (!writeChunkAndReturn(destination, hintChunks[i])) { + request.destination = null; + i++; + break; + } + hintChunks.splice(0, i); + var regularChunks = request.completedRegularChunks; + for (i = 0; i < regularChunks.length; i++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(destination, regularChunks[i])) + ) { + request.destination = null; + i++; + break; + } + regularChunks.splice(0, i); + var errorChunks = request.completedErrorChunks; + for (i = 0; i < errorChunks.length; i++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(destination, errorChunks[i])) + ) { + request.destination = null; + i++; + break; + } + errorChunks.splice(0, i); + } finally { + (request.flushScheduled = !1), + currentView && + 0 < writtenBytes && + destination.write(currentView.subarray(0, writtenBytes)), + (currentView = null), + (writtenBytes = 0), + (destinationHasCapacity = !0); + } + "function" === typeof destination.flush && destination.flush(); + } + 0 === request.pendingChunks && + (cleanupTaintQueue(request), + 12 > request.status && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = 14), + request.destination.end(), + (request.destination = null))); +} +function startWork(request) { + request.flushScheduled = null !== request.destination; + scheduleMicrotask(function () { + requestStorage.run(request, performWork, request); + }); + setImmediate(function () { + 10 === request.status && (request.status = 11); + }); +} +function enqueueFlush(request) { + !1 === request.flushScheduled && + 0 === request.pingedTasks.length && + null !== request.destination && + ((request.flushScheduled = !0), + setImmediate(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + })); +} +function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); +} +function startFlowing(request, destination) { + if (13 === request.status) + (request.status = 14), destination.destroy(request.fatalError); + else if (14 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} +function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = 12; + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + setImmediate(function () { + return finishHalt(request, abortableTasks); + }); + else if ( + "object" === typeof reason && + null !== reason && + reason.$$typeof === REACT_POSTPONE_TYPE + ) { + logPostpone(request, reason.message, null); + var errorId = request.nextChunkId++; + request.fatalError = errorId; + request.pendingChunks++; + emitPostponeChunk(request, errorId, reason); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId); + }); + setImmediate(function () { + return finishAbort(request, abortableTasks, errorId); + }); + } else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + errorId$26 = request.nextChunkId++; + request.fatalError = errorId$26; + request.pendingChunks++; + emitErrorChunk(request, errorId$26, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId$26); + }); + setImmediate(function () { + return finishAbort(request, abortableTasks, errorId$26); + }); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$27) { + logRecoverableError(request, error$27, null), + fatalError(request, error$27); + } +} +function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; +} +function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; +} +var instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(); +function ignoreReject() {} +function preloadModule(metadata) { + for (var chunks = metadata[1], promises = [], i = 0; i < chunks.length; i++) { + var thenable = globalThis.__next_chunk_load__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; +} +function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); +} +function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; +} +Chunk.prototype = Object.create(Promise.prototype); +Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), this.reason.push(reject)); + break; + default: + reject(this.reason); + } +}; +function createPendingChunk(response) { + return new Chunk("pending", null, null, response); +} +function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); +} +function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } +} +function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } +} +function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1, + response + ); +} +function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1 + ); +} +function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key +) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; +} +function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString(response, parentObj, parentKey, value, reference); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel(response, value, i, value[i], parentObj)), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; +} +var initializingChunk = null, + initializingChunkBlockedModel = null; +function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } +} +function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); +} +function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; +} +function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path +) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && null === blocked.value && (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; +} +function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; +} +function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } +} +function createMap(response, model) { + return new Map(model); +} +function createSet(response, model) { + return new Set(model); +} +function extractIterator(response, model) { + return model[Symbol.iterator](); +} +function createModel(response, model) { + return model; +} +function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey +) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; +} +function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close("C" === chunks ? '"$undefined"' : chunks.slice(1)) + : controller.enqueueModel(chunks); +} +function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var chunk$30 = createPendingChunk(response); + chunk$30.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = chunk$30; + chunk.then(function () { + previousBlockedChunk === chunk$30 && (previousBlockedChunk = null); + resolveModelChunk(chunk$30, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; +} +function asyncIterator() { + return this; +} +function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; +} +function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + $jscomp$compprop2 = {}; + $jscomp$compprop2 = + (($jscomp$compprop2[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }), + $jscomp$compprop2); + iterator = iterator ? $jscomp$compprop2[ASYNC_ITERATOR]() : $jscomp$compprop2; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; +} +function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return (obj = parseInt(value.slice(2), 16)), getChunk(response, obj); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel(response, value, obj, key, createModel)), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if (void 0 === reference || void 0 === response._temporaryReferences) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray(response, value, Uint8ClampedArray, 1, obj, key); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray(response, value, BigUint64Array, 8, obj, key); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; +} +function createResponse(bundlerConfig, formFieldPrefix, temporaryReferences) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; +} +function resolveField(response, key, value) { + response._formData.append(key, value); + var prefix = response._prefix; + key.startsWith(prefix) && + ((response = response._chunks), + (key = +key.slice(prefix.length)), + (prefix = response.get(key)) && resolveModelChunk(prefix, value, key)); +} +function close(response) { + reportGlobalError(response, Error("Connection closed.")); +} +function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); +} +function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; +} +function createDrainHandler(destination, request) { + return function () { + return startFlowing(request, destination); + }; +} +function createCancelHandler(request, reason) { + return function () { + request.destination = null; + abort(request, Error(reason)); + }; +} +function createFakeWritableFromReadableStreamController(controller) { + return { + write: function (chunk) { + "string" === typeof chunk && (chunk = textEncoder.encode(chunk)); + controller.enqueue(chunk); + return !0; + }, + end: function () { + controller.close(); + }, + destroy: function (error) { + "function" === typeof controller.error + ? controller.error(error) + : controller.close(); + } + }; +} +function createFakeWritableFromNodeReadable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; +} +exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); +}; +exports.createTemporaryReferenceSet = function () { + return new WeakMap(); +}; +exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference(serverManifest, value.id, value.bound))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); +}; +exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); +}; +exports.decodeReply = function (body, turbopackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + turbopackMap = getChunk(body, 0); + close(body); + return turbopackMap; +}; +exports.decodeReplyFromAsyncIterable = function ( + iterable, + turbopackMap, + options +) { + function progress(entry) { + if (entry.done) close(response); + else { + var _entry$value = entry.value; + entry = _entry$value[0]; + _entry$value = _entry$value[1]; + "string" === typeof _entry$value + ? resolveField(response, entry, _entry$value) + : response._formData.append(entry, _entry$value); + iterator.next().then(progress, error); + } + } + function error(reason) { + reportGlobalError(response, reason); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + var iterator = iterable[ASYNC_ITERATOR](), + response = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0 + ); + iterator.next().then(progress, error); + return getChunk(response, 0); +}; +exports.decodeReplyFromBusboy = function (busboyStream, turbopackMap, options) { + var response = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0 + ), + pendingFiles = 0, + queuedFields = []; + busboyStream.on("field", function (name, value) { + 0 < pendingFiles + ? queuedFields.push(name, value) + : resolveField(response, name, value); + }); + busboyStream.on("file", function (name, value, _ref2) { + var filename = _ref2.filename, + mimeType = _ref2.mimeType; + if ("base64" === _ref2.encoding.toLowerCase()) + throw Error( + "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it." + ); + pendingFiles++; + var JSCompiler_object_inline_chunks_280 = []; + value.on("data", function (chunk) { + JSCompiler_object_inline_chunks_280.push(chunk); + }); + value.on("end", function () { + var blob = new Blob(JSCompiler_object_inline_chunks_280, { + type: mimeType + }); + response._formData.append(name, blob, filename); + pendingFiles--; + if (0 === pendingFiles) { + for (blob = 0; blob < queuedFields.length; blob += 2) + resolveField(response, queuedFields[blob], queuedFields[blob + 1]); + queuedFields.length = 0; + } + }); + }); + busboyStream.on("finish", function () { + close(response); + }); + busboyStream.on("error", function (err) { + reportGlobalError(response, err); + }); + return getChunk(response, 0); +}; +exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + 21, + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + function () { + var writable, + stream = new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = + createFakeWritableFromReadableStreamController(controller); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; +exports.prerenderToNodeStream = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + 21, + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritableFromNodeReadable(readable); + resolve({ prelude: readable }); + }, + reject, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; +exports.registerClientReference = function ( + proxyImplementation, + id, + exportName +) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); +}; +exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); +}; +exports.renderToPipeableStream = function (model, turbopackMap, options) { + var request = new RequestInstance( + 20, + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + noop, + noop, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ), + hasStartedFlowing = !1; + startWork(request); + return { + pipe: function (destination) { + if (hasStartedFlowing) + throw Error( + "React currently only supports piping to one writable stream." + ); + hasStartedFlowing = !0; + startFlowing(request, destination); + destination.on("drain", createDrainHandler(destination, request)); + destination.on( + "error", + createCancelHandler( + request, + "The destination stream errored while writing data." + ) + ); + destination.on( + "close", + createCancelHandler(request, "The destination stream closed early.") + ); + return destination; + }, + abort: function (reason) { + abort(request, reason); + } + }; +}; +exports.renderToReadableStream = function (model, turbopackMap, options) { + var request = new RequestInstance( + 20, + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + noop, + noop, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + var writable; + return new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = createFakeWritableFromReadableStreamController(controller); + startWork(request); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); +}; diff --git a/.socket/blob/10f1f1367537cbeb4c278e30cb326dcdebdd29fce412b3ee6029966a63504aee b/.socket/blob/10f1f1367537cbeb4c278e30cb326dcdebdd29fce412b3ee6029966a63504aee new file mode 100644 index 0000000..6b35839 --- /dev/null +++ b/.socket/blob/10f1f1367537cbeb4c278e30cb326dcdebdd29fce412b3ee6029966a63504aee @@ -0,0 +1,6207 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-server.node.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function voidHandler() {} + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function _defineProperty(obj, key, value) { + a: if ("object" == typeof key && key) { + var e = key[Symbol.toPrimitive]; + if (void 0 !== e) { + key = e.call(key, "string"); + if ("object" != typeof key) break a; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + key = String(key); + } + key = "symbol" == typeof key ? key : key + ""; + key in obj + ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) + : (obj[key] = value); + return obj; + } + function flushBuffered(destination) { + "function" === typeof destination.flush && destination.flush(); + } + function writeToDestination(destination, view) { + destination = destination.write(view); + destinationHasCapacity = destinationHasCapacity && destination; + } + function writeChunkAndReturn(destination, chunk) { + if ("string" === typeof chunk) { + if (0 !== chunk.length) + if (4096 < 3 * chunk.length) + 0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk); + else { + var target = currentView; + 0 < writtenBytes && (target = currentView.subarray(writtenBytes)); + target = textEncoder.encodeInto(chunk, target); + var read = target.read; + writtenBytes += target.written; + read < chunk.length && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = textEncoder.encodeInto( + chunk.slice(read), + currentView + ).written)); + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)); + } + } else + 0 !== chunk.byteLength && + (4096 < chunk.byteLength + ? (0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk)) + : ((target = currentView.length - writtenBytes), + target < chunk.byteLength && + (0 === target + ? writeToDestination(destination, currentView) + : (currentView.set(chunk.subarray(0, target), writtenBytes), + (writtenBytes += target), + writeToDestination(destination, currentView), + (chunk = chunk.subarray(target))), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + currentView.set(chunk, writtenBytes), + (writtenBytes += chunk.byteLength), + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)))); + return destinationHasCapacity; + } + function completeWriting(destination) { + currentView && + 0 < writtenBytes && + destination.write(currentView.subarray(0, writtenBytes)); + currentView = null; + writtenBytes = 0; + destinationHasCapacity = !0; + } + function byteLengthOfChunk(chunk) { + return "string" === typeof chunk + ? Buffer.byteLength(chunk, "utf8") + : chunk.byteLength; + } + function isClientReference(reference) { + return reference.$$typeof === CLIENT_REFERENCE_TAG$1; + } + function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); + } + function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + null != arguments[0] && + console.error( + 'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().' + ); + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + $$location: { value: this.$$location, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; + } + function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl( + {}, + target.$$id, + !0 + ), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; + } + function resolveClientReferenceMetadata(config, clientReference) { + var modulePath = clientReference.$$id, + name = "", + resolvedModuleData = config[modulePath]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((name = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + return !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } + } + function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } + } + function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; + } + function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } + } + function resolveOwner() { + if (currentOwner) return currentOwner; + var owner = componentStorage.getStore(); + return owner ? owner : null; + } + function resolvePromiseOrAwaitNode(unresolvedNode, endTime) { + unresolvedNode.tag = 3 === unresolvedNode.tag ? 1 : 2; + unresolvedNode.end = endTime; + return unresolvedNode; + } + function getAsyncSequenceFromPromise(promise) { + try { + var asyncId = getAsyncId.call(promise); + } catch (x) {} + if (void 0 === asyncId) return null; + promise = pendingOperations.get(asyncId); + return void 0 === promise ? null : promise; + } + function collectStackTracePrivate(error, structuredStackTrace) { + error = []; + for (var i = framesToSkip; i < structuredStackTrace.length; i++) { + var callSite = structuredStackTrace[i], + name = callSite.getFunctionName() || ""; + if (name.includes("react_stack_bottom_frame")) break; + else if (callSite.isNative()) + (callSite = callSite.isAsync()), + error.push([name, "", 0, 0, 0, 0, callSite]); + else { + if (callSite.isConstructor()) name = "new " + name; + else if (!callSite.isToplevel()) { + var callSite$jscomp$0 = callSite; + name = callSite$jscomp$0.getTypeName(); + var methodName = callSite$jscomp$0.getMethodName(); + callSite$jscomp$0 = callSite$jscomp$0.getFunctionName(); + var result = ""; + callSite$jscomp$0 + ? (name && + identifierRegExp.test(callSite$jscomp$0) && + callSite$jscomp$0 !== name && + (result += name + "."), + (result += callSite$jscomp$0), + !methodName || + callSite$jscomp$0 === methodName || + callSite$jscomp$0.endsWith("." + methodName) || + callSite$jscomp$0.endsWith(" " + methodName) || + (result += " [as " + methodName + "]")) + : (name && (result += name + "."), + (result = methodName + ? result + methodName + : result + "")); + name = result; + } + "" === name && (name = ""); + methodName = callSite.getScriptNameOrSourceURL() || ""; + "" === methodName && + ((methodName = ""), + callSite.isEval() && + (callSite$jscomp$0 = callSite.getEvalOrigin()) && + (methodName = callSite$jscomp$0.toString() + ", ")); + callSite$jscomp$0 = callSite.getLineNumber() || 0; + result = callSite.getColumnNumber() || 0; + var enclosingLine = + "function" === typeof callSite.getEnclosingLineNumber + ? callSite.getEnclosingLineNumber() || 0 + : 0, + enclosingCol = + "function" === typeof callSite.getEnclosingColumnNumber + ? callSite.getEnclosingColumnNumber() || 0 + : 0; + callSite = callSite.isAsync(); + error.push([ + name, + methodName, + callSite$jscomp$0, + result, + enclosingLine, + enclosingCol, + callSite + ]); + } + } + collectedStackTrace = error; + return ""; + } + function collectStackTrace(error, structuredStackTrace) { + collectStackTracePrivate(error, structuredStackTrace); + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function parseStackTracePrivate(error, skipFrames) { + collectedStackTrace = null; + framesToSkip = skipFrames; + skipFrames = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTracePrivate; + try { + if ("" !== error.stack) return null; + } finally { + Error.prepareStackTrace = skipFrames; + } + return collectedStackTrace; + } + function parseStackTrace(error, skipFrames) { + var existing = stackTraceCache.get(error); + if (void 0 !== existing) return existing; + collectedStackTrace = null; + framesToSkip = skipFrames; + existing = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTrace; + try { + var stack = String(error.stack); + } finally { + Error.prepareStackTrace = existing; + } + if (null !== collectedStackTrace) + return ( + (stack = collectedStackTrace), + (collectedStackTrace = null), + stackTraceCache.set(error, stack), + stack + ); + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + existing = stack.indexOf("react_stack_bottom_frame"); + -1 !== existing && (existing = stack.lastIndexOf("\n", existing)); + -1 !== existing && (stack = stack.slice(0, existing)); + stack = stack.split("\n"); + for (existing = []; skipFrames < stack.length; skipFrames++) { + var parsed = frameRegExp.exec(stack[skipFrames]); + if (parsed) { + var name = parsed[1] || "", + isAsync = "async " === parsed[8]; + "" === name + ? (name = "") + : name.startsWith("async ") && + ((name = name.slice(5)), (isAsync = !0)); + var filename = parsed[2] || parsed[5] || ""; + "" === filename && (filename = ""); + existing.push([ + name, + filename, + +(parsed[3] || parsed[6]), + +(parsed[4] || parsed[7]), + 0, + 0, + isAsync + ]); + } + } + stackTraceCache.set(error, existing); + return existing; + } + function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? (thenableState.push(thenable), + (thenableState._stacks || (thenableState._stacks = [])).push(Error())) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; + } + function getThenableStateAfterSuspending() { + var state = thenableState || []; + state._componentDebugInfo = currentComponentDebugInfo; + thenableState = currentComponentDebugInfo = null; + return state; + } + function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); + } + function unsupportedRefresh() { + throw Error( + "Refreshing the cache is not supported in Server Components." + ); + } + function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); + } + function prepareStackTrace(error, structuredStackTrace) { + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function resetOwnerStackLimit() { + var now = getCurrentTime(); + 1e3 < now - lastResetTime && + ((ReactSharedInternalsServer.recentlyCreatedOwnerStacks = 0), + (lastResetTime = now)); + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isGetter(object, name) { + if (object === Object.prototype || null === object) return !1; + var descriptor = Object.getOwnPropertyDescriptor(object, name); + return void 0 === descriptor + ? isGetter(getPrototypeOf(object), name) + : "function" === typeof descriptor.get; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function defaultFilterStackFrame(filename) { + return ( + "" !== filename && + !filename.startsWith("node:") && + !filename.includes("node_modules") + ); + } + function devirtualizeURL(url) { + if (url.startsWith("about://React/")) { + var envIdx = url.indexOf("/", 14), + suffixIdx = url.lastIndexOf("?"); + if (-1 < envIdx && -1 < suffixIdx) + return decodeURI(url.slice(envIdx + 1, suffixIdx)); + } + return url; + } + function isPromiseCreationInternal(url, functionName) { + if ("node:internal/async_hooks" === url) return !0; + if ("" !== url) return !1; + switch (functionName) { + case "new Promise": + case "Function.withResolvers": + case "Function.reject": + case "Function.resolve": + case "Function.all": + case "Function.allSettled": + case "Function.race": + case "Function.try": + return !0; + default: + return !1; + } + } + function filterStackTrace(request, stack) { + request = request.filterStackFrame; + for (var filteredStack = [], i = 0; i < stack.length; i++) { + var callsite = stack[i], + functionName = callsite[0], + url = devirtualizeURL(callsite[1]); + request(url, functionName, callsite[2], callsite[3]) && + ((callsite = callsite.slice(0)), + (callsite[1] = url), + filteredStack.push(callsite)); + } + return filteredStack; + } + function hasUnfilteredFrame(request, stack) { + request = request.filterStackFrame; + for (var i = 0; i < stack.length; i++) { + var callsite = stack[i], + functionName = callsite[0], + url = devirtualizeURL(callsite[1]), + lineNumber = callsite[2], + columnNumber = callsite[3]; + if ( + !callsite[6] && + request(url, functionName, lineNumber, columnNumber) && + "" !== url + ) + return !0; + } + return !1; + } + function isPromiseAwaitInternal(url, functionName) { + if ("node:internal/async_hooks" === url) return !0; + if ("" !== url) return !1; + switch (functionName) { + case "Promise.then": + case "Promise.catch": + case "Promise.finally": + case "Function.reject": + case "Function.resolve": + case "Function.all": + case "Function.allSettled": + case "Function.race": + case "Function.try": + return !0; + default: + return !1; + } + } + function isAwaitInUserspace(request, stack) { + for ( + var firstFrame = 0; + stack.length > firstFrame && + isPromiseAwaitInternal(stack[firstFrame][1], stack[firstFrame][0]); + + ) + firstFrame++; + if (stack.length > firstFrame) { + request = request.filterStackFrame; + stack = stack[firstFrame]; + firstFrame = stack[0]; + var url = devirtualizeURL(stack[1]); + return request(url, firstFrame, stack[2], stack[3]) && "" !== url; + } + return !1; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + parseStackTracePrivate(Error("react-stack-top-frame"), 1) || [] + ); + request.pendingDebugChunks++; + var owner = resolveOwner(), + args = Array.from(arguments); + a: { + var env = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + env = null; + break a; + case "assert": + env = 1; + } + var format = args[env], + style = args[env + 1], + badge = args[env + 2]; + "string" === typeof format && + format.startsWith("\u001b[0m\u001b[7m%c%s\u001b[0m%c") && + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px" === + style && + "string" === typeof badge + ? ((format = format.slice(18)), + " " === format[0] && (format = format.slice(1)), + args.splice(env, 4, format), + (env = badge.slice(1, badge.length - 1))) + : (env = null); + } + null === env && (env = (0, request.environmentName)()); + null != owner && outlineComponentInfo(request, owner); + badge = [methodName, stack, owner, env]; + badge.push.apply(badge, args); + args = serializeDebugModel( + request, + (null === request.deferredDebugObjects ? 500 : 10) + stack.length, + badge + ); + "[" !== args[0] && + (args = serializeDebugModel(request, 10 + stack.length, [ + methodName, + stack, + owner, + env, + "Unknown Value: React could not send it from the server." + ])); + request.completedDebugChunks.push(":W" + args + "\n"); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } + function getCurrentStackInDEV() { + var owner = resolveOwner(); + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = prepareStackTrace; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function defaultErrorHandler(error) { + console.error(error); + } + function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error( + "Currently React only supports one RSC renderer at a time." + ); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + ReactSharedInternalsServer.getCurrentStack = getCurrentStackInDEV; + var abortSet = new Set(), + pingedTasks = [], + hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = []; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = + void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + this.pendingDebugChunks = 0; + this.completedDebugChunks = []; + this.debugDestination = null; + this.environmentName = + void 0 === environmentName + ? function () { + return "Server"; + } + : "function" !== typeof environmentName + ? function () { + return environmentName; + } + : environmentName; + this.filterStackFrame = + void 0 === filterStackFrame + ? defaultFilterStackFrame + : filterStackFrame; + this.didWarnForKey = null; + this.writtenDebugObjects = new WeakMap(); + this.deferredDebugObjects = keepDebugAlive + ? { retained: new Map(), existing: new Map() } + : null; + type = this.timeOrigin = performance.now(); + emitTimeOriginChunk(this, type + performance.timeOrigin); + this.abortTime = -0; + model = createTask( + this, + model, + null, + !1, + 0, + abortSet, + type, + null, + null, + null + ); + pingedTasks.push(model); + } + function createRequest( + model, + bundlerConfig, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 20, + model, + bundlerConfig, + onError, + onPostpone, + noop, + noop, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function createPrerenderRequest( + model, + bundlerConfig, + onAllReady, + onFatalError, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 21, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function resolveRequest() { + if (currentRequest) return currentRequest; + var store = requestStorage.getStore(); + return store ? store : null; + } + function serializeDebugThenable(request, counter, thenable) { + request.pendingDebugChunks++; + var id = request.nextChunkId++, + ref = "$@" + id.toString(16); + request.writtenDebugObjects.set(thenable, ref); + switch (thenable.status) { + case "fulfilled": + return ( + emitOutlinedDebugModelChunk(request, id, counter, thenable.value), + ref + ); + case "rejected": + return ( + emitErrorChunk(request, id, "", thenable.reason, !0, null), ref + ); + } + if (request.status === ABORTING) + return emitDebugHaltChunk(request, id), ref; + var deferredDebugObjects = request.deferredDebugObjects; + if (null !== deferredDebugObjects) + return ( + deferredDebugObjects.retained.set(id, thenable), + (ref = "$Y@" + id.toString(16)), + request.writtenDebugObjects.set(thenable, ref), + ref + ); + var cancelled = !1; + thenable.then( + function (value) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : (isArrayImpl(value) && 200 < value.length) || + ((value instanceof ArrayBuffer || + value instanceof Int8Array || + value instanceof Uint8Array || + value instanceof Uint8ClampedArray || + value instanceof Int16Array || + value instanceof Uint16Array || + value instanceof Int32Array || + value instanceof Uint32Array || + value instanceof Float32Array || + value instanceof Float64Array || + value instanceof BigInt64Array || + value instanceof BigUint64Array || + value instanceof DataView) && + 1e3 < value.byteLength) + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value), + enqueueFlush(request)); + }, + function (reason) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null), + enqueueFlush(request)); + } + ); + Promise.resolve().then(function () { + cancelled || + ((cancelled = !0), + emitDebugHaltChunk(request, id), + enqueueFlush(request), + (counter = request = null)); + }); + return ref; + } + function emitRequestedDebugThenable(request, id, counter, thenable) { + thenable.then( + function (value) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value); + enqueueFlush(request); + }, + function (reason) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + } + ); + } + function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + switch (thenable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + (newTask.model = thenable.value), + pingTask(request, newTask), + newTask.id + ); + case "rejected": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + erroredTask(request, newTask, thenable.reason), + newTask.id + ); + default: + if (request.status === ABORTING) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + forwardDebugInfoFromCurrentContext(request, newTask, thenable); + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + ((newTask.timed = !0), + erroredTask(request, newTask, reason), + enqueueFlush(request)); + } + ); + return newTask.id; + } + function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(entry), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$0) { + error(x$0); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + request.pendingChunks++; + task = + streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(task); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); + } + function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModel(request, entry.value); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(endStreamRow); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + callIteratorInDEV(iterator, progress, error); + } catch (x$1) { + error(x$1); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + var isIterator = iterable === iterator, + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + (task = iterable._debugInfo) && + forwardDebugInfo(request, streamTask, task); + request.pendingChunks++; + isIterator = + streamTask.id.toString(16) + ":" + (isIterator ? "x" : "X") + "\n"; + request.completedRegularChunks.push(isIterator); + request.cacheController.signal.addEventListener("abort", abortIterable); + callIteratorInDEV(iterator, progress, error); + return serializeByValueID(streamTask.id); + } + function emitHint(request, code, model) { + model = stringify(model); + request.completedHintChunks.push(":H" + code + model + "\n"); + enqueueFlush(request); + } + function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; + } + function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable(request, task, wakeable, null, null), + wakeable.value + ); + case "rejected": + forwardDebugInfoFromThenable(request, task, wakeable, null, null); + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { + $$typeof: REACT_LAZY_TYPE, + _payload: wakeable, + _init: readThenable + }; + } + function callWithDebugContextInDEV(request, task, callback, arg) { + var componentDebugInfo = { + name: "", + env: task.environmentName, + key: null, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.debugStack = task.debugStack; + request = componentDebugInfo.debugTask = task.debugTask; + currentOwner = componentDebugInfo; + try { + return request ? request.run(callback.bind(null, arg)) : callback(arg); + } finally { + currentOwner = null; + } + } + function processServerComponentReturnValue( + request, + task, + Component, + result + ) { + if ( + "object" !== typeof result || + null === result || + isClientReference(result) + ) + return result; + if ("function" === typeof result.then) + return ( + result.then(function (resolvedValue) { + "object" === typeof resolvedValue && + null !== resolvedValue && + resolvedValue.$$typeof === REACT_ELEMENT_TYPE && + (resolvedValue._store.validated = 1); + }, voidHandler), + createLazyWrapperAroundWakeable(request, task, result) + ); + result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1); + var iteratorFn = getIteratorFn(result); + if (iteratorFn) { + var multiShot = _defineProperty({}, Symbol.iterator, function () { + var iterator = iteratorFn.call(result); + iterator !== result || + ("[object GeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object Generator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + }); + multiShot._debugInfo = result._debugInfo; + return multiShot; + } + return "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((multiShot = _defineProperty({}, ASYNC_ITERATOR, function () { + var iterator = result[ASYNC_ITERATOR](); + iterator !== result || + ("[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object AsyncGenerator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + })), + (multiShot._debugInfo = result._debugInfo), + multiShot); + } + function renderFunctionComponent( + request, + task, + key, + Component, + props, + validated + ) { + var prevThenableState = task.thenableState; + task.thenableState = null; + if (canEmitDebugInfo) + if (null !== prevThenableState) + var componentDebugInfo = prevThenableState._componentDebugInfo; + else { + var componentDebugID = task.id; + componentDebugInfo = Component.displayName || Component.name || ""; + var componentEnv = (0, request.environmentName)(); + request.pendingChunks++; + componentDebugInfo = { + name: componentDebugInfo, + env: componentEnv, + key: key, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.props = props; + componentDebugInfo.debugStack = task.debugStack; + componentDebugInfo.debugTask = task.debugTask; + outlineComponentInfo(request, componentDebugInfo); + advanceTaskTime(request, task, performance.now()); + emitDebugChunk(request, componentDebugID, componentDebugInfo); + task.environmentName = componentEnv; + 2 === validated && + warnForMissingKey(request, key, componentDebugInfo, task.debugTask); + } + else return outlineTask(request, task); + thenableIndexCounter = 0; + thenableState = prevThenableState; + currentComponentDebugInfo = componentDebugInfo; + props = task.debugTask + ? task.debugTask.run( + componentStorage.run.bind( + componentStorage, + componentDebugInfo, + callComponentInDEV, + Component, + props, + componentDebugInfo + ) + ) + : componentStorage.run( + componentDebugInfo, + callComponentInDEV, + Component, + props, + componentDebugInfo + ); + if (request.status === ABORTING) + throw ( + ("object" !== typeof props || + null === props || + "function" !== typeof props.then || + isClientReference(props) || + props.then(voidHandler, voidHandler), + null) + ); + validated = thenableState; + if (null !== validated) + for ( + prevThenableState = validated._stacks || (validated._stacks = []), + componentDebugID = 0; + componentDebugID < validated.length; + componentDebugID++ + ) + forwardDebugInfoFromThenable( + request, + task, + validated[componentDebugID], + componentDebugInfo, + prevThenableState[componentDebugID] + ); + props = processServerComponentReturnValue( + request, + task, + Component, + props + ); + task.debugOwner = componentDebugInfo; + task.debugStack = null; + task.debugTask = null; + Component = task.keyPath; + componentDebugInfo = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = componentDebugInfo; + return request; + } + function warnForMissingKey(request, key, componentDebugInfo, debugTask) { + function logKeyError() { + console.error( + 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', + "", + "" + ); + } + key = request.didWarnForKey; + null == key && (key = request.didWarnForKey = new WeakSet()); + request = componentDebugInfo.owner; + if (null != request) { + if (key.has(request)) return; + key.add(request); + } + debugTask + ? debugTask.run( + componentStorage.run.bind( + componentStorage, + componentDebugInfo, + callComponentInDEV, + logKeyError, + null, + componentDebugInfo + ) + ) + : componentStorage.run( + componentDebugInfo, + callComponentInDEV, + logKeyError, + null, + componentDebugInfo + ); + } + function renderFragment(request, task, children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + null === child || + "object" !== typeof child || + child.$$typeof !== REACT_ELEMENT_TYPE || + null !== child.key || + child._store.validated || + (child._store.validated = 2); + } + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + if ((i = children._debugInfo)) { + if (canEmitDebugInfo) forwardDebugInfo(request, task, i); + else return outlineTask(request, task); + children = Array.from(children); + } + return children; + } + function renderAsyncFragment(request, task, children, getAsyncIterator) { + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + getAsyncIterator = getAsyncIterator.call(children); + return serializeAsyncIterable(request, task, children, getAsyncIterator); + } + function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + pingTask(request, task); + return serializeLazyID(task.id); + } + function outlineTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + retryTask(request, task); + return 1 === task.status + ? serializeByValueID(task.id) + : serializeLazyID(task.id); + } + function renderElement(request, task, type, key, ref, props, validated) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + jsxPropsParents.set(props, type); + "object" === typeof props.children && + null !== props.children && + jsxChildrenParents.set(props.children, type); + if ( + "function" !== typeof type || + isClientReference(type) || + type.$$typeof === TEMPORARY_REFERENCE_TAG + ) { + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + 2 === validated && + ((validated = { + name: "Fragment", + env: (0, request.environmentName)(), + key: key, + owner: task.debugOwner, + stack: + null === task.debugStack + ? null + : filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ), + props: props, + debugStack: task.debugStack, + debugTask: task.debugTask + }), + warnForMissingKey(request, key, validated, task.debugTask)), + (validated = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (request = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = validated), + request + ); + if ( + null != type && + "object" === typeof type && + !isClientReference(type) + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + type = callLazyInitInDEV(type); + if (request.status === ABORTING) throw null; + return renderElement( + request, + task, + type, + key, + ref, + props, + validated + ); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent( + request, + task, + key, + type.render, + props, + validated + ); + case REACT_MEMO_TYPE: + return renderElement( + request, + task, + type.type, + key, + ref, + props, + validated + ); + case REACT_ELEMENT_TYPE: + type._store.validated = 1; + } + else if ("string" === typeof type) { + ref = task.formatContext; + var newFormatContext = getChildFormatContext(ref, type, props); + ref !== newFormatContext && + null != props.children && + outlineModelWithFormatContext( + request, + props.children, + newFormatContext + ); + } + } else + return renderFunctionComponent( + request, + task, + key, + type, + props, + validated + ); + ref = task.keyPath; + null === key ? (key = ref) : null !== ref && (key = ref + "," + key); + newFormatContext = null; + ref = task.debugOwner; + null !== ref && outlineComponentInfo(request, ref); + if (null !== task.debugStack) { + newFormatContext = filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ); + var id = outlineDebugModel( + request, + { objectLimit: 2 * newFormatContext.length + 1 }, + newFormatContext + ); + request.writtenObjects.set(newFormatContext, serializeByValueID(id)); + } + request = [ + REACT_ELEMENT_TYPE, + type, + key, + props, + ref, + newFormatContext, + validated + ]; + task = task.implicitSlot && null !== key ? [request] : request; + return task; + } + function visitAsyncNode(request, task, node, visited, cutOff) { + if (visited.has(node)) return null; + visited.add(node); + if (0 <= node.end && node.end <= request.timeOrigin) return null; + var previousIONode = null; + if ( + null !== node.previous && + ((previousIONode = visitAsyncNode( + request, + task, + node.previous, + visited, + cutOff + )), + void 0 === previousIONode) + ) + return; + switch (node.tag) { + case 0: + return node; + case 3: + return previousIONode; + case 1: + var awaited = node.awaited, + promise = node.promise.deref(); + if (null !== awaited) { + cutOff = visitAsyncNode(request, task, awaited, visited, cutOff); + if (void 0 === cutOff) break; + null !== cutOff + ? (previousIONode = + 1 === cutOff.tag + ? cutOff + : (null !== node.stack && + hasUnfilteredFrame(request, node.stack)) || + (void 0 !== promise && + "string" === typeof promise.displayName && + (null === cutOff.stack || + !hasUnfilteredFrame(request, cutOff.stack))) + ? node + : cutOff) + : request.status === ABORTING && + node.start < request.abortTime && + node.end > request.abortTime && + ((null !== node.stack && + hasUnfilteredFrame(request, node.stack)) || + (void 0 !== promise && + "string" === typeof promise.displayName)) && + (previousIONode = node); + } + void 0 !== promise && + ((node = promise._debugInfo), + null == node || + visited.has(node) || + (visited.add(node), forwardDebugInfo(request, task, node))); + return previousIONode; + case 4: + return previousIONode; + case 2: + awaited = node.awaited; + if (null !== awaited) { + promise = visitAsyncNode(request, task, awaited, visited, cutOff); + if (void 0 === promise) break; + if (null !== promise) { + var startTime = node.start, + endTime = node.end; + startTime < cutOff + ? ((previousIONode = promise), + null !== node.stack && + isAwaitInUserspace(request, node.stack) && + void 0 !== + (null === awaited.promise + ? void 0 + : awaited.promise.deref()) && + serializeIONode(request, promise, awaited.promise)) + : null !== node.stack && isAwaitInUserspace(request, node.stack) + ? (request.status === ABORTING && + startTime > request.abortTime) || + (serializeIONode(request, promise, awaited.promise), + null != node.owner && + outlineComponentInfo(request, node.owner), + (cutOff = (0, request.environmentName)()), + advanceTaskTime(request, task, startTime), + request.pendingChunks++, + emitDebugChunk(request, task.id, { + awaited: promise, + env: cutOff, + owner: node.owner, + stack: + null === node.stack + ? null + : filterStackTrace(request, node.stack) + }), + markOperationEndTime(request, task, endTime), + request.status === ABORTING && (previousIONode = void 0)) + : (previousIONode = promise); + } + } + node = node.promise.deref(); + void 0 !== node && + ((node = node._debugInfo), + null == node || + visited.has(node) || + (visited.add(node), forwardDebugInfo(request, task, node))); + return previousIONode; + default: + throw Error("Unknown AsyncSequence tag. This is a bug in React."); + } + } + function emitAsyncSequence( + request, + task, + node, + alreadyForwardedDebugInfo, + owner, + stack + ) { + var visited = new Set(); + alreadyForwardedDebugInfo && visited.add(alreadyForwardedDebugInfo); + node = visitAsyncNode(request, task, node, visited, task.time); + void 0 !== node && + null !== node && + (serializeIONode(request, node, node.promise), + request.pendingChunks++, + (alreadyForwardedDebugInfo = (0, request.environmentName)()), + (alreadyForwardedDebugInfo = { + awaited: node, + env: alreadyForwardedDebugInfo + }), + null === owner && null === stack + ? (null !== task.debugOwner && + (alreadyForwardedDebugInfo.owner = task.debugOwner), + null !== task.debugStack && + (alreadyForwardedDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ))) + : (null != owner && (alreadyForwardedDebugInfo.owner = owner), + null != stack && + (alreadyForwardedDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(stack, 1) + ))), + advanceTaskTime(request, task, task.time), + emitDebugChunk(request, task.id, alreadyForwardedDebugInfo), + markOperationEndTime(request, task, node.end)); + } + function pingTask(request, task) { + task.timed = !0; + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : setImmediate(function () { + return performWork(request); + })); + } + function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet, + lastTimestamp, + debugOwner, + debugStack, + debugTask + ) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + var parent = this, + originalValue = parent[parentPropertyName]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + callWithDebugContextInDEV(request, task, function () { + "Object" !== objectName(originalValue) + ? "string" === typeof jsxChildrenParents.get(parent) + ? console.error( + "%s objects cannot be rendered as text children. Try formatting it using toString().%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + return renderModel(request, task, parent, parentPropertyName, value); + }, + thenableState: null, + timed: !1 + }; + task.time = lastTimestamp; + task.environmentName = request.environmentName(); + task.debugOwner = debugOwner; + task.debugStack = debugStack; + task.debugTask = debugTask; + abortSet.add(task); + return task; + } + function serializeByValueID(id) { + return "$" + id.toString(16); + } + function serializeLazyID(id) { + return "$L" + id.toString(16); + } + function serializeDeferredObject(request, value) { + var deferredDebugObjects = request.deferredDebugObjects; + return null !== deferredDebugObjects + ? (request.pendingDebugChunks++, + (request = request.nextChunkId++), + deferredDebugObjects.existing.set(value, request), + deferredDebugObjects.retained.set(request, value), + "$Y" + request.toString(16)) + : "$Y"; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + return id.toString(16) + ":" + request + "\n"; + } + function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !1); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !1, null), + serializeByValueID(parent) + ); + } + } + function serializeDebugClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var existingId = request.writtenClientReferences.get( + clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id + ); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingDebugChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !0); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingDebugChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !0, null), + serializeByValueID(parent) + ); + } + } + function outlineModel(request, value) { + return outlineModelWithFormatContext(request, value, 0); + } + function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks, + performance.now(), + null, + null, + null + ); + retryTask(request, value); + return value.id; + } + function serializeServerReference(request, serverReference) { + var writtenServerReferences = request.writtenServerReferences, + existingId = writtenServerReferences.get(serverReference); + if (void 0 !== existingId) return "$F" + existingId.toString(16); + existingId = serverReference.$$bound; + existingId = null === existingId ? null : Promise.resolve(existingId); + var id = serverReference.$$id, + location = null, + error = serverReference.$$location; + error && + ((error = parseStackTrace(error, 1)), + 0 < error.length && + ((location = error[0]), + (location = [location[0], location[1], location[2], location[3]]))); + existingId = + null !== location + ? { + id: id, + bound: existingId, + name: + "function" === typeof serverReference + ? serverReference.name + : "", + env: (0, request.environmentName)(), + location: location + } + : { id: id, bound: existingId }; + request = outlineModel(request, existingId); + writtenServerReferences.set(serverReference, request); + return "$F" + request.toString(16); + } + function serializeLargeTextString(request, text) { + request.pendingChunks++; + var textId = request.nextChunkId++; + emitTextChunk(request, textId, text, !1); + return serializeByValueID(textId); + } + function serializeMap(request, map) { + map = Array.from(map); + return "$Q" + outlineModel(request, map).toString(16); + } + function serializeFormData(request, formData) { + formData = Array.from(formData.entries()); + return "$K" + outlineModel(request, formData).toString(16); + } + function serializeSet(request, set) { + set = Array.from(set); + return "$W" + outlineModel(request, set).toString(16); + } + function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); + } + function serializeDebugTypedArray(request, tag, typedArray) { + if (1e3 < typedArray.byteLength && !doNotLimit.has(typedArray)) + return serializeDeferredObject(request, typedArray); + request.pendingDebugChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !0); + return serializeByValueID(bufferId); + } + function serializeDebugBlob(request, blob) { + function progress(entry) { + if (entry.done) + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: model.length + 2 }, + model + ), + enqueueFlush(request); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + reader.cancel(reason).then(noop, noop); + } + var model = [blob.type], + reader = blob.stream().getReader(); + request.pendingDebugChunks++; + var id = request.nextChunkId++; + reader.read().then(progress).catch(error); + return "$B" + id.toString(16); + } + function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask( + request, + model, + null, + !1, + 0, + request.abortableTasks, + performance.now(), + null, + null, + null + ), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); + } + function renderModel(request, task, parent, key, value) { + serializedSize += key.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + return renderModelDestructive(request, task, parent, key, value); + } catch (thrownValue) { + parent = task.model; + parent = + "object" === typeof parent && + null !== parent && + (parent.$$typeof === REACT_ELEMENT_TYPE || + parent.$$typeof === REACT_LAZY_TYPE); + if (request.status === ABORTING) { + task.status = 3; + if (21 === request.type) + return ( + (task = request.nextChunkId++), + (task = parent + ? serializeLazyID(task) + : serializeByValueID(task)), + task + ); + task = request.fatalError; + return parent ? serializeLazyID(task) : serializeByValueID(task); + } + key = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof key && + null !== key && + "function" === typeof key.then + ) + return ( + (request = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + )), + (value = request.ping), + key.then(value, value), + (request.thenableState = getThenableStateAfterSuspending()), + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + parent + ? serializeLazyID(request.id) + : serializeByValueID(request.id) + ); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + request.pendingChunks++; + prevKeyPath = request.nextChunkId++; + prevImplicitSlot = logRecoverableError(request, key, task); + emitErrorChunk( + request, + prevKeyPath, + prevImplicitSlot, + key, + !1, + task.debugOwner + ); + return parent + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath); + } + } + function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value + ) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + _writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var _existingReference = _writtenObjects.get(value); + if (void 0 !== _existingReference) + if (modelRoot === value) modelRoot = null; + else return _existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((_existingReference = _writtenObjects.get(parent)), + void 0 !== _existingReference && + ((elementReference = + _existingReference + ":" + parentPropertyName), + _writtenObjects.set(value, elementReference))); + } + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + if ((_existingReference = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _existingReference); + else return outlineTask(request, task); + _existingReference = value.props; + var refProp = _existingReference.ref; + refProp = void 0 !== refProp ? refProp : null; + task.debugOwner = value._owner; + task.debugStack = value._debugStack; + task.debugTask = value._debugTask; + if ( + void 0 === value._owner || + void 0 === value._debugStack || + void 0 === value._debugTask + ) { + var key = ""; + null !== value.key && (key = ' key="' + value.key + '"'); + console.error( + "Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\n- The element is created with a production version of React but rendered in development.\n- The element was cloned with a custom function instead of `React.cloneElement`.\nThe props of this element may help locate this element: %o", + value.type, + key, + value.props + ); + } + request = renderElement( + request, + task, + value.type, + value.key, + refProp, + _existingReference, + value._store.validated + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (_writtenObjects.has(request) || + _writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + task.thenableState = null; + elementReference = callLazyInitInDEV(value); + if (request.status === ABORTING) throw null; + if ((_writtenObjects = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _writtenObjects); + else return outlineTask(request, task); + return renderModelDestructive( + request, + task, + emptyRoot, + "", + elementReference + ); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = request.writtenObjects; + _writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== _writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return ( + "$@" + serializeThenable(request, task, value).toString(16) + ); + if (modelRoot === value) modelRoot = null; + else return _writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== _writtenObjects) + if (modelRoot === value) { + if (_writtenObjects !== serializeByValueID(task.id)) + return _writtenObjects; + modelRoot = null; + } else return _writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((_writtenObjects = elementReference.get(parent)), + void 0 !== _writtenObjects) + ) { + _existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + _existingReference = "type"; + break; + case "2": + _existingReference = "key"; + break; + case "3": + _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; + } + elementReference.set( + value, + _writtenObjects + ":" + _existingReference + ); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) return serializeMap(request, value); + if (value instanceof Set) return serializeSet(request, value); + if ("function" === typeof FormData && value instanceof FormData) + return serializeFormData(request, value); + if (value instanceof Error) return serializeErrorValue(request, value); + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (elementReference = elementReference.call(value)), + elementReference === value + ? "$i" + + outlineModel(request, Array.from(elementReference)).toString(16) + : renderFragment(request, task, Array.from(elementReference)) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return renderAsyncFragment(request, task, value, elementReference); + if (value instanceof Date) return "$D" + value.toJSON(); + elementReference = getPrototypeOf(value); + if ( + elementReference !== ObjectPrototype && + (null === elementReference || + null !== getPrototypeOf(elementReference)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + if ("Object" !== objectName(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (!isSimpleObject(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(value); + 0 < symbols.length && + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like %s are not supported.%s", + symbols[0].description, + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + } + return value; + } + if ("string" === typeof value) + return ( + (serializedSize += value.length), + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ? "$D" + value + : 1024 <= value.length && null !== byteLengthOfChunk + ? serializeLargeTextString(request, value) + : "$" === value[0] + ? "$" + value + : value + ); + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return serializeServerReference(request, value); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), + void 0 !== request) + ) + return "$T" + request; + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + if ( + jsxChildrenParents.has(parent) || + (jsxPropsParents.has(parent) && "children" === parentPropertyName) + ) + throw ( + ((request = value.displayName || value.name || "Component"), + Error( + "Functions are not valid as a child of Client Components. This may happen if you return " + + request + + " instead of <" + + request + + " /> from render. Or maybe you meant to call this function rather than return it." + + describeObjectForErrorMessage(parent, parentPropertyName) + )) + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + _writtenObjects = request.nextChunkId++; + emitSymbolChunk(request, _writtenObjects, elementReference); + task.set(value, _writtenObjects); + return serializeByValueID(_writtenObjects); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + function logRecoverableError(request, error, task) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onError = request.onError; + var errorDigest = + null !== task + ? requestStorage.run( + void 0, + callWithDebugContextInDEV, + request, + task, + onError, + error + ) + : requestStorage.run(void 0, onError, error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; + } + function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + null !== request.destination + ? ((request.status = CLOSED), request.destination.destroy(error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); + } + function serializeErrorValue(request, error) { + var name = "Error", + env = (0, request.environmentName)(); + try { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + return ( + "$Z" + + outlineModel(request, { + name: name, + message: message, + stack: stack, + env: env + }).toString(16) + ); + } + function emitErrorChunk(request, id, digest, error, debug, owner) { + var name = "Error", + env = (0, request.environmentName)(); + try { + if (error instanceof Error) { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } else + (message = + "object" === typeof error && null !== error + ? describeObjectForErrorMessage(error) + : String(error)), + (stack = []); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + error = null == owner ? null : outlineComponentInfo(request, owner); + digest = { + digest: digest, + name: name, + message: message, + stack: stack, + env: env, + owner: error + }; + id = id.toString(16) + ":E" + stringify(digest) + "\n"; + debug + ? request.completedDebugChunks.push(id) + : request.completedErrorChunks.push(id); + } + function emitImportChunk(request, id, clientReferenceMetadata, debug) { + clientReferenceMetadata = stringify(clientReferenceMetadata); + id = id.toString(16) + ":I" + clientReferenceMetadata + "\n"; + debug + ? request.completedDebugChunks.push(id) + : request.completedImportChunks.push(id); + } + function emitSymbolChunk(request, id, name) { + id = encodeReferenceChunk(request, id, "$S" + name); + request.completedImportChunks.push(id); + } + function emitDebugHaltChunk(request, id) { + id = id.toString(16) + ":\n"; + request.completedDebugChunks.push(id); + } + function emitDebugChunk(request, id, debugInfo) { + var json = serializeDebugModel(request, 500, debugInfo); + null !== request.debugDestination + ? '"' === json[0] && "$" === json[1] + ? ((id = id.toString(16) + ":D" + json + "\n"), + request.completedRegularChunks.push(id)) + : ((debugInfo = request.nextChunkId++), + (json = debugInfo.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(json), + (id = id.toString(16) + ':D"$' + debugInfo.toString(16) + '"\n'), + request.completedRegularChunks.push(id)) + : ((id = id.toString(16) + ":D" + json + "\n"), + request.completedRegularChunks.push(id)); + } + function outlineComponentInfo(request, componentInfo) { + var existingRef = request.writtenDebugObjects.get(componentInfo); + if (void 0 !== existingRef) return existingRef; + null != componentInfo.owner && + outlineComponentInfo(request, componentInfo.owner); + existingRef = 10; + null != componentInfo.stack && + (existingRef += componentInfo.stack.length); + existingRef = { objectLimit: existingRef }; + var componentDebugInfo = { + name: componentInfo.name, + key: componentInfo.key + }; + null != componentInfo.env && (componentDebugInfo.env = componentInfo.env); + null != componentInfo.owner && + (componentDebugInfo.owner = componentInfo.owner); + null == componentInfo.stack && null != componentInfo.debugStack + ? (componentDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(componentInfo.debugStack, 1) + )) + : null != componentInfo.stack && + (componentDebugInfo.stack = componentInfo.stack); + componentDebugInfo.props = componentInfo.props; + existingRef = outlineDebugModel(request, existingRef, componentDebugInfo); + existingRef = serializeByValueID(existingRef); + request.writtenDebugObjects.set(componentInfo, existingRef); + request.writtenObjects.set(componentInfo, existingRef); + return existingRef; + } + function emitIOInfoChunk( + request, + id, + name, + start, + end, + value, + env, + owner, + stack + ) { + var objectLimit = 10; + stack && (objectLimit += stack.length); + name = { + name: name, + start: start - request.timeOrigin, + end: end - request.timeOrigin + }; + null != env && (name.env = env); + null != stack && (name.stack = stack); + null != owner && (name.owner = owner); + void 0 !== value && (name.value = value); + value = serializeDebugModel(request, objectLimit, name); + id = id.toString(16) + ":J" + value + "\n"; + request.completedDebugChunks.push(id); + } + function serializeIONode(request, ioNode, promiseRef) { + var existingRef = request.writtenDebugObjects.get(ioNode); + if (void 0 !== existingRef) return existingRef; + existingRef = null; + var name = ""; + if (null !== ioNode.promise) { + var promise = ioNode.promise.deref(); + void 0 !== promise && + "string" === typeof promise.displayName && + (name = promise.displayName); + } + if (null !== ioNode.stack) { + a: { + existingRef = ioNode.stack; + for (promise = 0; promise < existingRef.length; promise++) { + var callsite = existingRef[promise]; + if (!isPromiseCreationInternal(callsite[1], callsite[0])) { + promise = 0 < promise ? existingRef.slice(promise) : existingRef; + break a; + } + } + promise = []; + } + existingRef = filterStackTrace(request, promise); + if ("" === name) { + a: { + name = promise; + promise = ""; + callsite = request.filterStackFrame; + for (var i = 0; i < name.length; i++) { + var callsite$jscomp$0 = name[i], + functionName = callsite$jscomp$0[0], + url = devirtualizeURL(callsite$jscomp$0[1]); + if ( + callsite( + url, + functionName, + callsite$jscomp$0[2], + callsite$jscomp$0[3] + ) && + "" !== url + ) { + if ("" === promise) { + name = functionName; + break a; + } + name = promise; + break a; + } else promise = functionName; + } + name = ""; + } + name.startsWith("Window.") + ? (name = name.slice(7)) + : name.startsWith(".") && (name = name.slice(7)); + } + } + promise = ioNode.owner; + null != promise && outlineComponentInfo(request, promise); + callsite = void 0; + null !== promiseRef && (callsite = promiseRef.deref()); + promiseRef = (0, request.environmentName)(); + i = 3 === ioNode.tag ? request.abortTime : ioNode.end; + request.pendingDebugChunks++; + callsite$jscomp$0 = request.nextChunkId++; + emitIOInfoChunk( + request, + callsite$jscomp$0, + name, + ioNode.start, + i, + callsite, + promiseRef, + promise, + existingRef + ); + promiseRef = serializeByValueID(callsite$jscomp$0); + request.writtenDebugObjects.set(ioNode, promiseRef); + return promiseRef; + } + function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + typedArray = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + var binaryLength = typedArray.byteLength; + id = id.toString(16) + ":" + tag + binaryLength.toString(16) + ","; + debug + ? request.completedDebugChunks.push(id, typedArray) + : request.completedRegularChunks.push(id, typedArray); + } + function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + var binaryLength = byteLengthOfChunk(text); + id = id.toString(16) + ":T" + binaryLength.toString(16) + ","; + debug + ? request.completedDebugChunks.push(id, text) + : request.completedRegularChunks.push(id, text); + } + function renderDebugModel( + request, + counter, + parent, + parentPropertyName, + value + ) { + if (null === value) return null; + if (value === REACT_ELEMENT_TYPE) return "$"; + if ("object" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === CONSTRUCTOR_MARKER) { + value = value.constructor; + var ref = request.writtenDebugObjects.get(value); + void 0 === ref && + ((request = outlineDebugModel(request, counter, value)), + (ref = serializeByValueID(request))); + return "$P" + ref.slice(1); + } + if (void 0 !== request.temporaryReferences) { + var tempRef = request.temporaryReferences.get(value); + if (void 0 !== tempRef) return "$T" + tempRef; + } + tempRef = request.writtenDebugObjects; + var existingDebugReference = tempRef.get(value); + if (void 0 !== existingDebugReference) + if (debugModelRoot === value) debugModelRoot = null; + else return existingDebugReference; + else if (-1 === parentPropertyName.indexOf(":")) + if ( + ((existingDebugReference = tempRef.get(parent)), + void 0 !== existingDebugReference) + ) { + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + var propertyName = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + propertyName = "type"; + break; + case "2": + propertyName = "key"; + break; + case "3": + propertyName = "props"; + break; + case "4": + propertyName = "_owner"; + } + tempRef.set(value, existingDebugReference + ":" + propertyName); + } else if (debugNoOutline !== value) { + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + request = outlineDebugModel(request, counter, value); + return serializeByValueID(request); + } + parent = request.writtenObjects.get(value); + if (void 0 !== parent) return parent; + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + counter.objectLimit--; + parent = request.deferredDebugObjects; + if ( + null !== parent && + ((parentPropertyName = parent.existing.get(value)), + void 0 !== parentPropertyName) + ) + return ( + parent.existing.delete(value), + parent.retained.delete(parentPropertyName), + emitOutlinedDebugModelChunk( + request, + parentPropertyName, + counter, + value + ), + serializeByValueID(parentPropertyName) + ); + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + null != value._owner && outlineComponentInfo(request, value._owner); + "object" === typeof value.type && + null !== value.type && + doNotLimit.add(value.type); + "object" === typeof value.key && + null !== value.key && + doNotLimit.add(value.key); + doNotLimit.add(value.props); + null !== value._owner && doNotLimit.add(value._owner); + counter = null; + if (null != value._debugStack) + for ( + counter = filterStackTrace( + request, + parseStackTrace(value._debugStack, 1) + ), + doNotLimit.add(counter), + request = 0; + request < counter.length; + request++ + ) + doNotLimit.add(counter[request]); + return [ + REACT_ELEMENT_TYPE, + value.type, + value.key, + value.props, + value._owner, + counter, + value._store.validated + ]; + case REACT_LAZY_TYPE: + value = value._payload; + if (null !== value && "object" === typeof value) { + switch (value._status) { + case 1: + return ( + (request = outlineDebugModel( + request, + counter, + value._result + )), + serializeLazyID(request) + ); + case 2: + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value._result, + !0, + null + ), + serializeLazyID(counter) + ); + } + switch (value.status) { + case "fulfilled": + return ( + (request = outlineDebugModel( + request, + counter, + value.value + )), + serializeLazyID(request) + ); + case "rejected": + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value.reason, + !0, + null + ), + serializeLazyID(counter) + ); + } + } + request.pendingDebugChunks++; + value = request.nextChunkId++; + emitDebugHaltChunk(request, value); + return serializeLazyID(value); + } + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + if (isArrayImpl(value)) + return 200 < value.length && !doNotLimit.has(value) + ? serializeDeferredObject(request, value) + : value; + if (value instanceof Date) return "$D" + value.toJSON(); + if (value instanceof Map) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) { + var entry = value[ref]; + doNotLimit.add(entry); + var key = entry[0]; + entry = entry[1]; + "object" === typeof key && null !== key && doNotLimit.add(key); + "object" === typeof entry && + null !== entry && + doNotLimit.add(entry); + } + return "$Q" + outlineDebugModel(request, counter, value).toString(16); + } + if (value instanceof Set) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) + (key = value[ref]), + "object" === typeof key && null !== key && doNotLimit.add(key); + return "$W" + outlineDebugModel(request, counter, value).toString(16); + } + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + + outlineDebugModel( + request, + { objectLimit: 2 * value.length + 1 }, + value + ).toString(16) + ); + if (value instanceof Error) { + counter = "Error"; + var env = (0, request.environmentName)(); + try { + (counter = value.name), + (ref = String(value.message)), + (key = filterStackTrace(request, parseStackTrace(value, 0))), + (entry = value.environmentName), + "string" === typeof entry && (env = entry); + } catch (x) { + (ref = + "An error occurred but serializing the error message failed."), + (key = []); + } + request = + "$Z" + + outlineDebugModel( + request, + { objectLimit: 2 * key.length + 1 }, + { name: counter, message: ref, stack: key, env: env } + ).toString(16); + return request; + } + if (value instanceof ArrayBuffer) + return serializeDebugTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeDebugTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeDebugTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeDebugTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeDebugTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeDebugTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeDebugTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeDebugTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeDebugTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeDebugTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeDebugTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeDebugTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeDebugTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeDebugBlob(request, value); + if (getIteratorFn(value)) return Array.from(value); + request = getPrototypeOf(value); + if (request !== ObjectPrototype && null !== request) { + counter = Object.create(null); + for (env in value) + if (hasOwnProperty.call(value, env) || isGetter(request, env)) + counter[env] = value[env]; + ref = request.constructor; + "function" !== typeof ref || + ref.prototype !== request || + hasOwnProperty.call(value, "") || + isGetter(request, "") || + (counter[""] = { $$typeof: CONSTRUCTOR_MARKER, constructor: ref }); + return counter; + } + return value; + } + if ("string" === typeof value) { + if (1024 <= value.length) { + if (0 >= counter.objectLimit) + return serializeDeferredObject(request, value); + counter.objectLimit--; + request.pendingDebugChunks++; + counter = request.nextChunkId++; + emitTextChunk(request, counter, value, !0); + return serializeByValueID(counter); + } + return "$" === value[0] ? "$" + value : value; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((counter = request.temporaryReferences.get(value)), + void 0 !== counter) + ) + return "$T" + counter; + counter = request.writtenDebugObjects; + ref = counter.get(value); + if (void 0 !== ref) return ref; + ref = Function.prototype.toString.call(value); + key = value.name; + key = + "$E" + + ("string" === typeof key + ? "Object.defineProperty(" + + ref + + ',"name",{value:' + + JSON.stringify(key) + + "})" + : "(" + ref + ")"); + request.pendingDebugChunks++; + ref = request.nextChunkId++; + key = encodeReferenceChunk(request, ref, key); + request.completedDebugChunks.push(key); + request = serializeByValueID(ref); + counter.set(value, request); + return request; + } + if ("symbol" === typeof value) { + counter = request.writtenSymbols.get(value); + if (void 0 !== counter) return serializeByValueID(counter); + value = value.description; + request.pendingChunks++; + counter = request.nextChunkId++; + emitSymbolChunk(request, counter, value); + return serializeByValueID(counter); + } + return "bigint" === typeof value + ? "$n" + value.toString(10) + : "unknown type " + typeof value; + } + function serializeDebugModel(request, objectLimit, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + var counter = { objectLimit: objectLimit }; + objectLimit = debugNoOutline; + debugNoOutline = model; + try { + return stringify(model, replacer); + } catch (x) { + return stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugNoOutline = objectLimit; + } + } + function emitOutlinedDebugModelChunk(request, id, counter, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + "object" === typeof model && null !== model && doNotLimit.add(model); + var prevModelRoot = debugModelRoot; + debugModelRoot = model; + "object" === typeof model && + null !== model && + request.writtenDebugObjects.set(model, serializeByValueID(id)); + try { + var json = stringify(model, replacer); + } catch (x) { + json = stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugModelRoot = prevModelRoot; + } + id = id.toString(16) + ":" + json + "\n"; + request.completedDebugChunks.push(id); + } + function outlineDebugModel(request, counter, model) { + var id = request.nextChunkId++; + request.pendingDebugChunks++; + emitOutlinedDebugModelChunk(request, id, counter, model); + return id; + } + function emitTimeOriginChunk(request, timeOrigin) { + request.pendingDebugChunks++; + request.completedDebugChunks.push(":N" + timeOrigin + "\n"); + } + function forwardDebugInfo(request$jscomp$0, task, debugInfo) { + for (var id = task.id, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + if ("number" === typeof info.time) + markOperationEndTime(request$jscomp$0, task, info.time); + else if ("string" === typeof info.name) + outlineComponentInfo(request$jscomp$0, info), + request$jscomp$0.pendingChunks++, + emitDebugChunk(request$jscomp$0, id, info); + else if (info.awaited) { + var ioInfo = info.awaited; + if (!(ioInfo.end <= request$jscomp$0.timeOrigin)) { + var request = request$jscomp$0, + ioInfo$jscomp$0 = ioInfo; + if (!request.writtenObjects.has(ioInfo$jscomp$0)) { + request.pendingDebugChunks++; + var id$jscomp$0 = request.nextChunkId++, + owner = ioInfo$jscomp$0.owner; + null != owner && outlineComponentInfo(request, owner); + var debugStack = + null == ioInfo$jscomp$0.stack && + null != ioInfo$jscomp$0.debugStack + ? filterStackTrace( + request, + parseStackTrace(ioInfo$jscomp$0.debugStack, 1) + ) + : ioInfo$jscomp$0.stack; + var env = ioInfo$jscomp$0.env; + null == env && (env = (0, request.environmentName)()); + emitIOInfoChunk( + request, + id$jscomp$0, + ioInfo$jscomp$0.name, + ioInfo$jscomp$0.start, + ioInfo$jscomp$0.end, + ioInfo$jscomp$0.value, + env, + owner, + debugStack + ); + request.writtenDebugObjects.set( + ioInfo$jscomp$0, + serializeByValueID(id$jscomp$0) + ); + } + null != info.owner && + outlineComponentInfo(request$jscomp$0, info.owner); + debugStack = + null == info.stack && null != info.debugStack + ? filterStackTrace( + request$jscomp$0, + parseStackTrace(info.debugStack, 1) + ) + : info.stack; + ioInfo = { awaited: ioInfo }; + ioInfo.env = + null != info.env + ? info.env + : (0, request$jscomp$0.environmentName)(); + null != info.owner && (ioInfo.owner = info.owner); + null != debugStack && (ioInfo.stack = debugStack); + request$jscomp$0.pendingChunks++; + emitDebugChunk(request$jscomp$0, id, ioInfo); + } + } else + request$jscomp$0.pendingChunks++, + emitDebugChunk(request$jscomp$0, id, info); + } + } + function forwardDebugInfoFromThenable( + request, + task, + thenable, + owner, + stack + ) { + var debugInfo; + (debugInfo = thenable._debugInfo) && + forwardDebugInfo(request, task, debugInfo); + thenable = getAsyncSequenceFromPromise(thenable); + null !== thenable && + emitAsyncSequence(request, task, thenable, debugInfo, owner, stack); + } + function forwardDebugInfoFromCurrentContext(request, task, thenable) { + (thenable = thenable._debugInfo) && + forwardDebugInfo(request, task, thenable); + var sequence = pendingOperations.get(async_hooks.executionAsyncId()); + sequence = void 0 === sequence ? null : sequence; + null !== sequence && + emitAsyncSequence(request, task, sequence, thenable, null, null); + } + function forwardDebugInfoFromAbortedTask(request, task) { + var model = task.model; + if ("object" === typeof model && null !== model) { + var debugInfo; + (debugInfo = model._debugInfo) && + forwardDebugInfo(request, task, debugInfo); + var thenable = null; + "function" === typeof model.then + ? (thenable = model) + : model.$$typeof === REACT_LAZY_TYPE && + ((model = model._payload), + "function" === typeof model.then && (thenable = model)); + if ( + null !== thenable && + ((model = getAsyncSequenceFromPromise(thenable)), null !== model) + ) { + for ( + thenable = model; + 4 === thenable.tag && null !== thenable.awaited; + + ) + thenable = thenable.awaited; + 3 === thenable.tag + ? (serializeIONode(request, thenable, null), + request.pendingChunks++, + (debugInfo = (0, request.environmentName)()), + (debugInfo = { awaited: thenable, env: debugInfo }), + advanceTaskTime(request, task, task.time), + emitDebugChunk(request, task.id, debugInfo)) + : emitAsyncSequence(request, task, model, debugInfo, null, null); + } + } + } + function emitTimingChunk(request, id, timestamp) { + request.pendingChunks++; + var json = '{"time":' + (timestamp - request.timeOrigin) + "}"; + null !== request.debugDestination + ? ((timestamp = request.nextChunkId++), + (json = timestamp.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(json), + (id = id.toString(16) + ':D"$' + timestamp.toString(16) + '"\n'), + request.completedRegularChunks.push(id)) + : ((id = id.toString(16) + ":D" + json + "\n"), + request.completedRegularChunks.push(id)); + } + function advanceTaskTime(request, task, timestamp) { + timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : task.timed || emitTimingChunk(request, task.id, task.time); + task.timed = !0; + } + function markOperationEndTime(request, task, timestamp) { + (request.status === ABORTING && timestamp > request.abortTime) || + (timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : emitTimingChunk(request, task.id, task.time)); + } + function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? emitTextChunk(request, id, value, !1) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk( + request, + id, + "m", + value, + !1 + ) + : value instanceof DataView + ? emitTypedArrayChunk( + request, + id, + "V", + value, + !1 + ) + : ((value = stringify(value, task.toJSON)), + (task = + task.id.toString(16) + + ":" + + value + + "\n"), + request.completedRegularChunks.push(task)); + } + function erroredTask(request, task, error) { + task.timed && markOperationEndTime(request, task, performance.now()); + task.status = 4; + var digest = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner); + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } + function retryTask(request, task) { + if (0 === task.status) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + canEmitDebugInfo = !0; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + canEmitDebugInfo = !1; + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + var currentEnv = (0, request.environmentName)(); + currentEnv !== task.environmentName && + (request.pendingChunks++, + emitDebugChunk(request, task.id, { env: currentEnv })); + task.timed && markOperationEndTime(request, task, performance.now()); + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set( + resolvedModel, + serializeByValueID(task.id) + ), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel), + processedChunk = task.id.toString(16) + ":" + json + "\n"; + request.completedRegularChunks.push(processedChunk); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (request.status === ABORTING) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + (canEmitDebugInfo = prevCanEmitDebugInfo), + (serializedSize = parentSerializedSize); + } + } + } + function tryStreamTask(request, task) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + canEmitDebugInfo = !1; + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + (serializedSize = parentSerializedSize), + (canEmitDebugInfo = prevCanEmitDebugInfo); + } + } + function performWork(request) { + pendingOperations.delete(async_hooks.executionAsyncId()); + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } + } + function abortTask(task) { + 0 === task.status && (task.status = 3); + } + function finishAbortedTask(task, request, errorId) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + task.timed && markOperationEndTime(request, task, request.abortTime), + (errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); + } + function haltTask(task) { + 0 === task.status && (task.status = 3); + } + function finishHaltedTask(task, request) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + request.pendingChunks--); + } + function flushCompletedChunks(request) { + if (null !== request.debugDestination) { + var debugDestination = request.debugDestination; + currentView = new Uint8Array(4096); + writtenBytes = 0; + destinationHasCapacity = !0; + try { + for ( + var debugChunks = request.completedDebugChunks, i = 0; + i < debugChunks.length; + i++ + ) + request.pendingDebugChunks--, + writeChunkAndReturn(debugDestination, debugChunks[i]); + debugChunks.splice(0, i); + } finally { + completeWriting(debugDestination); + } + flushBuffered(debugDestination); + } + debugDestination = request.destination; + if (null !== debugDestination) { + currentView = new Uint8Array(4096); + writtenBytes = 0; + destinationHasCapacity = !0; + try { + var importsChunks = request.completedImportChunks; + for ( + debugChunks = 0; + debugChunks < importsChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + importsChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + importsChunks.splice(0, debugChunks); + var hintChunks = request.completedHintChunks; + for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++) + if ( + !writeChunkAndReturn(debugDestination, hintChunks[debugChunks]) + ) { + request.destination = null; + debugChunks++; + break; + } + hintChunks.splice(0, debugChunks); + if (null === request.debugDestination) { + var _debugChunks = request.completedDebugChunks; + for ( + debugChunks = 0; + debugChunks < _debugChunks.length; + debugChunks++ + ) + if ( + (request.pendingDebugChunks--, + !writeChunkAndReturn( + debugDestination, + _debugChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + _debugChunks.splice(0, debugChunks); + } + var regularChunks = request.completedRegularChunks; + for ( + debugChunks = 0; + debugChunks < regularChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + regularChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + regularChunks.splice(0, debugChunks); + var errorChunks = request.completedErrorChunks; + for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(debugDestination, errorChunks[debugChunks])) + ) { + request.destination = null; + debugChunks++; + break; + } + errorChunks.splice(0, debugChunks); + } finally { + (request.flushScheduled = !1), completeWriting(debugDestination); + } + flushBuffered(debugDestination); + } + 0 === request.pendingChunks && + ((importsChunks = request.debugDestination), + 0 === request.pendingDebugChunks + ? (null !== importsChunks && + (importsChunks.end(), (request.debugDestination = null)), + request.status < ABORTING && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = CLOSED), + request.destination.end(), + (request.destination = null)), + null !== request.debugDestination && + (request.debugDestination.end(), + (request.debugDestination = null))) + : null !== importsChunks && + null !== request.destination && + ((request.status = CLOSED), + request.destination.end(), + (request.destination = null))); + } + function startWork(request) { + request.flushScheduled = null !== request.destination; + scheduleMicrotask(function () { + requestStorage.run(request, performWork, request); + }); + setImmediate(function () { + 10 === request.status && (request.status = 11); + }); + } + function enqueueFlush(request) { + !1 !== request.flushScheduled || + 0 !== request.pingedTasks.length || + (null === request.destination && null === request.debugDestination) || + ((request.flushScheduled = !0), + setImmediate(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + })); + } + function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); + } + function startFlowing(request, destination) { + if (13 === request.status) + (request.status = CLOSED), destination.destroy(request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } + function startFlowingDebug(request, debugDestination) { + if (13 === request.status) + (request.status = CLOSED), debugDestination.destroy(request.fatalError); + else if (request.status !== CLOSED && null === request.debugDestination) { + request.debugDestination = debugDestination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } + function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = ABORTING; + request.abortTime = performance.now(); + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + setImmediate(function () { + return finishHalt(request, abortableTasks); + }); + else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + _errorId2 = request.nextChunkId++; + request.fatalError = _errorId2; + request.pendingChunks++; + emitErrorChunk(request, _errorId2, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, _errorId2); + }); + setImmediate(function () { + return finishAbort(request, abortableTasks, _errorId2); + }); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$2) { + logRecoverableError(request, error$2, null), + fatalError(request, error$2); + } + } + function fromHex(str) { + return parseInt(str, 16); + } + function resolveDebugMessage(request, message) { + var deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + if ("" === message) closeDebugChannel(request); + else { + var command = message.charCodeAt(0); + message = message.slice(2).split(",").map(fromHex); + switch (command) { + case 82: + for (command = 0; command < message.length; command++) { + var id = message[command], + retainedValue = deferredDebugObjects.retained.get(id); + void 0 !== retainedValue && + (request.pendingDebugChunks--, + deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + enqueueFlush(request)); + } + break; + case 81: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: 10 }, + retainedValue + ), + enqueueFlush(request)); + break; + case 80: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + emitRequestedDebugThenable( + request, + id, + { objectLimit: 10 }, + retainedValue + )); + break; + default: + throw Error( + "Unknown command. The debugChannel was not wired up properly." + ); + } + } + } + function closeDebugChannel(request) { + var deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + deferredDebugObjects.retained.forEach(function (value, id) { + request.pendingDebugChunks--; + deferredDebugObjects.retained.delete(id); + deferredDebugObjects.existing.delete(value); + }); + enqueueFlush(request); + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + i++ + ) { + var thenable = globalThis.__next_chunk_load__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; + } + function createPendingChunk(response) { + return new Chunk("pending", null, null, response); + } + function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); + } + function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } + } + function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } + } + function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1, + response + ); + } + function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1 + ); + } + function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key + ) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; + } + function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString( + response, + parentObj, + parentKey, + value, + reference + ); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel( + response, + value, + i, + value[i], + parentObj + )), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; + } + function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = + -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), + (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } + } + function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path + ) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && + null === blocked.value && + (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; + } + function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; + } + function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey + ) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; + } + function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close( + "C" === chunks ? '"$undefined"' : chunks.slice(1) + ) + : controller.enqueueModel(chunks); + } + function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk = createPendingChunk(response); + _chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk; + chunk.then(function () { + previousBlockedChunk === _chunk && (previousBlockedChunk = null); + resolveModelChunk(_chunk, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = _defineProperty({}, ASYNC_ITERATOR, function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }); + iterator = iterator ? iterable[ASYNC_ITERATOR]() : iterable; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; + } + function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return ( + (obj = parseInt(value.slice(2), 16)), getChunk(response, obj) + ); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel( + response, + value, + obj, + key, + createModel + )), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if ( + void 0 === reference || + void 0 === response._temporaryReferences + ) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray( + response, + value, + Uint8ClampedArray, + 1, + obj, + key + ); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray( + response, + value, + BigUint64Array, + 8, + obj, + key + ); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; + } + function createResponse( + bundlerConfig, + formFieldPrefix, + temporaryReferences + ) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; + } + function resolveField(response, key, value) { + response._formData.append(key, value); + var prefix = response._prefix; + key.startsWith(prefix) && + ((response = response._chunks), + (key = +key.slice(prefix.length)), + (prefix = response.get(key)) && resolveModelChunk(prefix, value, key)); + } + function close(response) { + reportGlobalError(response, Error("Connection closed.")); + } + function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); + } + function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; + } + function createDrainHandler(destination, request) { + return function () { + return startFlowing(request, destination); + }; + } + function createCancelHandler(request, reason) { + return function () { + request.destination = null; + abort(request, Error(reason)); + }; + } + function startReadingFromDebugChannelReadable(request, stream) { + function onData(chunk) { + if ("string" === typeof chunk) { + if (lastWasPartial) { + var JSCompiler_temp_const = stringBuffer; + var JSCompiler_inline_result = new Uint8Array(0); + JSCompiler_inline_result = stringDecoder.decode( + JSCompiler_inline_result + ); + stringBuffer = JSCompiler_temp_const + JSCompiler_inline_result; + lastWasPartial = !1; + } + stringBuffer += chunk; + } else + (stringBuffer += stringDecoder.decode(chunk, decoderOptions)), + (lastWasPartial = !0); + chunk = stringBuffer.split("\n"); + for ( + JSCompiler_temp_const = 0; + JSCompiler_temp_const < chunk.length - 1; + JSCompiler_temp_const++ + ) + resolveDebugMessage(request, chunk[JSCompiler_temp_const]); + stringBuffer = chunk[chunk.length - 1]; + } + function onError(error) { + abort( + request, + Error("Lost connection to the Debug Channel.", { cause: error }) + ); + } + function onClose() { + closeDebugChannel(request); + } + var stringDecoder = new util.TextDecoder(), + lastWasPartial = !1, + stringBuffer = ""; + "function" === typeof stream.addEventListener && + "string" === typeof stream.binaryType + ? ((stream.binaryType = "arraybuffer"), + stream.addEventListener("message", function (event) { + onData(event.data); + }), + stream.addEventListener("error", function (event) { + onError(event.error); + }), + stream.addEventListener("close", onClose)) + : (stream.on("data", onData), + stream.on("error", onError), + stream.on("end", onClose)); + } + function createFakeWritableFromWebSocket(webSocket) { + return { + write: function (chunk) { + webSocket.send(chunk); + return !0; + }, + end: function () { + webSocket.close(); + }, + destroy: function (reason) { + "object" === typeof reason && + null !== reason && + (reason = reason.message); + "string" === typeof reason + ? webSocket.close(1011, reason) + : webSocket.close(1011); + } + }; + } + function createFakeWritableFromReadableStreamController(controller) { + return { + write: function (chunk) { + "string" === typeof chunk && (chunk = textEncoder.encode(chunk)); + controller.enqueue(chunk); + return !0; + }, + end: function () { + controller.close(); + }, + destroy: function (error) { + "function" === typeof controller.error + ? controller.error(error) + : controller.close(); + } + }; + } + function startReadingFromDebugChannelReadableStream(request, stream) { + function progress(_ref) { + var done = _ref.done, + buffer = _ref.value; + _ref = stringBuffer; + done + ? ((buffer = new Uint8Array(0)), + (buffer = stringDecoder.decode(buffer))) + : (buffer = stringDecoder.decode(buffer, decoderOptions)); + stringBuffer = _ref + buffer; + _ref = stringBuffer.split("\n"); + for (buffer = 0; buffer < _ref.length - 1; buffer++) + resolveDebugMessage(request, _ref[buffer]); + stringBuffer = _ref[_ref.length - 1]; + if (done) closeDebugChannel(request); + else return reader.read().then(progress).catch(error); + } + function error(e) { + abort( + request, + Error("Lost connection to the Debug Channel.", { cause: e }) + ); + } + var reader = stream.getReader(), + stringDecoder = new util.TextDecoder(), + stringBuffer = ""; + reader.read().then(progress).catch(error); + } + function createFakeWritableFromNodeReadable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; + } + var stream = require("stream"), + util = require("util"); + require("crypto"); + var async_hooks = require("async_hooks"), + ReactDOM = require("react-dom"), + React = require("react"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); + Symbol.for("react.postpone"); + var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + scheduleMicrotask = queueMicrotask, + currentView = null, + writtenBytes = 0, + destinationHasCapacity = !0, + textEncoder = new util.TextEncoder(), + CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"), + FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice, + PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; + ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: function (href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } + }, + C: function (href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = + "C|" + + (null == crossOrigin ? "null" : crossOrigin) + + "|" + + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } + }, + L: preload, + m: preloadModule$1, + X: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } + }, + S: function (href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } + }, + M: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } + } + }; + var currentOwner = null, + getAsyncId = async_hooks.AsyncResource.prototype.asyncId, + pendingOperations = new Map(), + lastRanAwait = null, + emptyStack = [], + framesToSkip = 0, + collectedStackTrace = null, + identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, + frameRegExp = + /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|)\)|(?:async )?(.+):(\d+):(\d+)|)$/, + stackTraceCache = new WeakMap(), + requestStorage = new async_hooks.AsyncLocalStorage(), + componentStorage = new async_hooks.AsyncLocalStorage(), + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }, + SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." + ), + suspendedThenable = null, + currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null, + currentComponentDebugInfo = null, + HooksDispatcher = { + readContext: unsupportedContext, + use: function (usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (isClientReference(usable)) { + if ( + null != usable.value && + usable.value.$$typeof === REACT_CONTEXT_TYPE + ) + throw Error( + "Cannot read a Client Context from a Server Component." + ); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error( + "An unsupported type was passed to use(): " + String(usable) + ); + }, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: function () { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return ( + "_" + + currentRequest$1.identifierPrefix + + "S_" + + id.toString(32) + + "_" + ); + }, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } + }; + HooksDispatcher.useEffectEvent = unsupportedHook; + var DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var cache = (cache = resolveRequest()) ? cache.cache : new Map(); + var entry = cache.get(resourceType); + void 0 === entry && + ((entry = resourceType()), cache.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); + var prefix, suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var lastResetTime = 0; + if ( + "object" === typeof performance && + "function" === typeof performance.now + ) { + var localPerformance = performance; + var getCurrentTime = function () { + return localPerformance.now(); + }; + } else { + var localDate = Date; + getCurrentTime = function () { + return localDate.now(); + }; + } + var callComponent = { + react_stack_bottom_frame: function ( + Component, + props, + componentDebugInfo + ) { + currentOwner = componentDebugInfo; + try { + return Component(props, void 0); + } finally { + currentOwner = null; + } + } + }, + callComponentInDEV = + callComponent.react_stack_bottom_frame.bind(callComponent), + callLazyInit = { + react_stack_bottom_frame: function (lazy) { + var init = lazy._init; + return init(lazy._payload); + } + }, + callLazyInitInDEV = + callLazyInit.react_stack_bottom_frame.bind(callLazyInit), + callIterator = { + react_stack_bottom_frame: function (iterator, progress, error) { + iterator.next().then(progress, error); + } + }, + callIteratorInDEV = + callIterator.react_stack_bottom_frame.bind(callIterator), + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + hasOwnProperty = Object.prototype.hasOwnProperty, + doNotLimit = new WeakSet(); + (function () { + async_hooks + .createHook({ + init: function (asyncId, type, triggerAsyncId, resource) { + var trigger = pendingOperations.get(triggerAsyncId); + if ("PROMISE" === type) + if ( + ((type = async_hooks.executionAsyncId()), + type !== triggerAsyncId) + ) { + if (void 0 === trigger) return; + triggerAsyncId = null; + if ( + null === trigger.stack || + (2 !== trigger.tag && 4 !== trigger.tag) + ) { + resource = new WeakRef(resource); + var request = resolveRequest(); + null !== request && + ((triggerAsyncId = parseStackTracePrivate(Error(), 5)), + null === triggerAsyncId || + isAwaitInUserspace(request, triggerAsyncId) || + (triggerAsyncId = null)); + } else + (triggerAsyncId = emptyStack), + (resource = + void 0 !== resource._debugInfo + ? new WeakRef(resource) + : trigger.promise); + type = pendingOperations.get(type); + trigger = { + tag: 4, + owner: resolveOwner(), + stack: triggerAsyncId, + start: performance.now(), + end: -1.1, + promise: resource, + awaited: trigger, + previous: void 0 === type ? null : type + }; + } else + (type = resolveOwner()), + (trigger = { + tag: 3, + owner: type, + stack: + null === type ? null : parseStackTracePrivate(Error(), 5), + start: performance.now(), + end: -1.1, + promise: new WeakRef(resource), + awaited: void 0 === trigger ? null : trigger, + previous: null + }); + else if ( + "bound-anonymous-fn" === type || + "Microtask" === type || + "TickObject" === type || + "Immediate" === type + ) { + if (void 0 === trigger) return; + } else if (void 0 === trigger) + (trigger = resolveOwner()), + (trigger = { + tag: 0, + owner: trigger, + stack: + null === trigger + ? parseStackTracePrivate(Error(), 3) + : null, + start: performance.now(), + end: -1.1, + promise: null, + awaited: null, + previous: null + }); + else if (2 === trigger.tag || 4 === trigger.tag) + (resource = resolveOwner()), + (trigger = { + tag: 0, + owner: resource, + stack: + null === resource + ? parseStackTracePrivate(Error(), 3) + : null, + start: performance.now(), + end: -1.1, + promise: null, + awaited: null, + previous: trigger + }); + pendingOperations.set(asyncId, trigger); + }, + before: function (asyncId) { + asyncId = pendingOperations.get(asyncId); + if (void 0 !== asyncId) + switch (asyncId.tag) { + case 0: + lastRanAwait = null; + asyncId.end = performance.now(); + break; + case 4: + lastRanAwait = resolvePromiseOrAwaitNode( + asyncId, + performance.now() + ); + break; + case 2: + lastRanAwait = asyncId; + break; + case 3: + resolvePromiseOrAwaitNode( + asyncId, + performance.now() + ).previous = lastRanAwait; + lastRanAwait = null; + break; + default: + lastRanAwait = null; + } + }, + promiseResolve: function (asyncId) { + var node = pendingOperations.get(asyncId); + if (void 0 !== node) { + switch (node.tag) { + case 4: + case 3: + node = resolvePromiseOrAwaitNode(node, performance.now()); + break; + case 2: + case 1: + break; + default: + throw Error( + "A Promise should never be an IO_NODE. This is a bug in React." + ); + } + var currentAsyncId = async_hooks.executionAsyncId(); + asyncId !== currentAsyncId && + ((asyncId = pendingOperations.get(currentAsyncId)), + 1 === node.tag + ? (node.awaited = void 0 === asyncId ? null : asyncId) + : void 0 !== asyncId && + ((currentAsyncId = { + tag: 2, + owner: node.owner, + stack: node.stack, + start: node.start, + end: node.end, + promise: node.promise, + awaited: node.awaited, + previous: node.previous + }), + (node.start = node.end), + (node.end = performance.now()), + (node.previous = currentAsyncId), + (node.awaited = asyncId))); + } + }, + destroy: function (asyncId) { + pendingOperations.delete(asyncId); + } + }) + .enable(); + })(); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, + stringify = JSON.stringify, + ABORTING = 12, + CLOSED = 14, + defaultPostponeHandler = noop, + currentRequest = null, + canEmitDebugInfo = !1, + serializedSize = 0, + MAX_ROW_SIZE = 3200, + modelRoot = !1, + CONSTRUCTOR_MARKER = Symbol(), + debugModelRoot = null, + debugNoOutline = null, + emptyRoot = {}, + decoderOptions = { stream: !0 }, + instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(); + Chunk.prototype = Object.create(Promise.prototype); + Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + default: + reject(this.reason); + } + }; + var initializingChunk = null, + initializingChunkBlockedModel = null; + exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); + }; + exports.createTemporaryReferenceSet = function () { + return new WeakMap(); + }; + exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference( + serverManifest, + value.id, + value.bound + ))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); + }; + exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); + }; + exports.decodeReply = function (body, turbopackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + turbopackMap = getChunk(body, 0); + close(body); + return turbopackMap; + }; + exports.decodeReplyFromAsyncIterable = function ( + iterable, + turbopackMap, + options + ) { + function progress(entry) { + if (entry.done) close(response); + else { + var _entry$value = entry.value; + entry = _entry$value[0]; + _entry$value = _entry$value[1]; + "string" === typeof _entry$value + ? resolveField(response, entry, _entry$value) + : response._formData.append(entry, _entry$value); + iterator.next().then(progress, error); + } + } + function error(reason) { + reportGlobalError(response, reason); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + var iterator = iterable[ASYNC_ITERATOR](), + response = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0 + ); + iterator.next().then(progress, error); + return getChunk(response, 0); + }; + exports.decodeReplyFromBusboy = function ( + busboyStream, + turbopackMap, + options + ) { + var response = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0 + ), + pendingFiles = 0, + queuedFields = []; + busboyStream.on("field", function (name, value) { + 0 < pendingFiles + ? queuedFields.push(name, value) + : resolveField(response, name, value); + }); + busboyStream.on("file", function (name, value, _ref2) { + var filename = _ref2.filename, + mimeType = _ref2.mimeType; + if ("base64" === _ref2.encoding.toLowerCase()) + throw Error( + "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it." + ); + pendingFiles++; + var JSCompiler_object_inline_chunks_251 = []; + value.on("data", function (chunk) { + JSCompiler_object_inline_chunks_251.push(chunk); + }); + value.on("end", function () { + var blob = new Blob(JSCompiler_object_inline_chunks_251, { + type: mimeType + }); + response._formData.append(name, blob, filename); + pendingFiles--; + if (0 === pendingFiles) { + for (blob = 0; blob < queuedFields.length; blob += 2) + resolveField( + response, + queuedFields[blob], + queuedFields[blob + 1] + ); + queuedFields.length = 0; + } + }); + }); + busboyStream.on("finish", function () { + close(response); + }); + busboyStream.on("error", function (err) { + reportGlobalError(response, err); + }); + return getChunk(response, 0); + }; + exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = createPrerenderRequest( + model, + turbopackMap, + function () { + var writable, + stream = new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = + createFakeWritableFromReadableStreamController( + controller + ); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + !1 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; + exports.prerenderToNodeStream = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = createPrerenderRequest( + model, + turbopackMap, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritableFromNodeReadable(readable); + resolve({ prelude: readable }); + }, + reject, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + !1 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; + exports.registerClientReference = function ( + proxyImplementation, + id, + exportName + ) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); + }; + exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + $$location: { value: Error("react-stack-top-frame"), configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + }; + exports.renderToPipeableStream = function (model, turbopackMap, options) { + var debugChannel = options ? options.debugChannel : void 0, + debugChannelReadable = + void 0 === debugChannel || + ("function" !== typeof debugChannel.read && + "number" !== typeof debugChannel.readyState) + ? void 0 + : debugChannel, + debugChannelWritable = + void 0 !== debugChannel + ? "function" === typeof debugChannel.write + ? debugChannel + : "function" === typeof debugChannel.send + ? createFakeWritableFromWebSocket(debugChannel) + : void 0 + : void 0, + request = createRequest( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + void 0 !== debugChannel + ), + hasStartedFlowing = !1; + startWork(request); + void 0 !== debugChannelWritable && + startFlowingDebug(request, debugChannelWritable); + void 0 !== debugChannelReadable && + startReadingFromDebugChannelReadable(request, debugChannelReadable); + return { + pipe: function (destination) { + if (hasStartedFlowing) + throw Error( + "React currently only supports piping to one writable stream." + ); + hasStartedFlowing = !0; + startFlowing(request, destination); + destination.on("drain", createDrainHandler(destination, request)); + destination.on( + "error", + createCancelHandler( + request, + "The destination stream errored while writing data." + ) + ); + if (void 0 === debugChannelReadable) + destination.on( + "close", + createCancelHandler( + request, + "The destination stream closed early." + ) + ); + return destination; + }, + abort: function (reason) { + abort(request, reason); + } + }; + }; + exports.renderToReadableStream = function (model, turbopackMap, options) { + var debugChannelReadable = + options && options.debugChannel + ? options.debugChannel.readable + : void 0, + debugChannelWritable = + options && options.debugChannel + ? options.debugChannel.writable + : void 0, + request = createRequest( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + void 0 !== debugChannelReadable + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + if (void 0 !== debugChannelWritable) { + var debugWritable; + new ReadableStream( + { + type: "bytes", + start: function (controller) { + debugWritable = + createFakeWritableFromReadableStreamController(controller); + }, + pull: function () { + startFlowingDebug(request, debugWritable); + } + }, + { highWaterMark: 0 } + ).pipeTo(debugChannelWritable); + } + void 0 !== debugChannelReadable && + startReadingFromDebugChannelReadableStream( + request, + debugChannelReadable + ); + var writable; + return new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = + createFakeWritableFromReadableStreamController(controller); + startWork(request); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + }; + })(); diff --git a/.socket/blob/14538b474a6c9b23365d5af0e8ba611a9867e2a25e0e71ff754b0ef833c7718a b/.socket/blob/14538b474a6c9b23365d5af0e8ba611a9867e2a25e0e71ff754b0ef833c7718a new file mode 100644 index 0000000..3ae67a1 --- /dev/null +++ b/.socket/blob/14538b474a6c9b23365d5af0e8ba611a9867e2a25e0e71ff754b0ef833c7718a @@ -0,0 +1,3064 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-webpack-server.browser.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 strict"; +var ReactDOM = require("react-dom"), + React = require("react"), + channel = new MessageChannel(), + taskQueue = []; +channel.port1.onmessage = function () { + var task = taskQueue.shift(); + task && task(); +}; +function scheduleWork(callback) { + taskQueue.push(callback); + channel.port2.postMessage(null); +} +function handleErrorInNextTick(error) { + setTimeout(function () { + throw error; + }); +} +var LocalPromise = Promise, + scheduleMicrotask = + "function" === typeof queueMicrotask + ? queueMicrotask + : function (callback) { + LocalPromise.resolve(null) + .then(callback) + .catch(handleErrorInNextTick); + }, + currentView = null, + writtenBytes = 0; +function writeChunkAndReturn(destination, chunk) { + if (0 !== chunk.byteLength) + if (2048 < chunk.byteLength) + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = new Uint8Array(2048)), + (writtenBytes = 0)), + destination.enqueue(chunk); + else { + var allowableBytes = currentView.length - writtenBytes; + allowableBytes < chunk.byteLength && + (0 === allowableBytes + ? destination.enqueue(currentView) + : (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes), + destination.enqueue(currentView), + (chunk = chunk.subarray(allowableBytes))), + (currentView = new Uint8Array(2048)), + (writtenBytes = 0)); + currentView.set(chunk, writtenBytes); + writtenBytes += chunk.byteLength; + } + return !0; +} +var textEncoder = new TextEncoder(); +function stringToChunk(content) { + return textEncoder.encode(content); +} +function byteLengthOfChunk(chunk) { + return chunk.byteLength; +} +function closeWithError(destination, error) { + "function" === typeof destination.error + ? destination.error(error) + : destination.close(); +} +var CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"); +function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); +} +var FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice; +function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; +} +var PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }; +function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl({}, target.$$id, !0), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; +} +var proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; +ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: prefetchDNS, + C: preconnect, + L: preload, + m: preloadModule$1, + X: preinitScript, + S: preinitStyle, + M: preinitModuleScript +}; +function prefetchDNS(href) { + if ("string" === typeof href && href) { + var request = currentRequest ? currentRequest : null; + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } +} +function preconnect(href, crossOrigin) { + if ("string" === typeof href) { + var request = currentRequest ? currentRequest : null; + if (request) { + var hints = request.hints, + key = "C|" + (null == crossOrigin ? "null" : crossOrigin) + "|" + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } +} +function preload(href, as, options) { + if ("string" === typeof href) { + var request = currentRequest ? currentRequest : null; + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } +} +function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = currentRequest ? currentRequest : null; + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } +} +function preinitStyle(href, precedence, options) { + if ("string" === typeof href) { + var request = currentRequest ? currentRequest : null; + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } +} +function preinitScript(src, options) { + if ("string" === typeof src) { + var request = currentRequest ? currentRequest : null; + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } +} +function preinitModuleScript(src, options) { + if ("string" === typeof src) { + var request = currentRequest ? currentRequest : null; + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } +} +function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } +} +var TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }; +function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; +} +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); +Symbol.for("react.postpone"); +var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; +} +var ASYNC_ITERATOR = Symbol.asyncIterator; +function noop() {} +var SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." +); +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; +} +var currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null; +function getThenableStateAfterSuspending() { + var state = thenableState || []; + thenableState = null; + return state; +} +var HooksDispatcher = { + readContext: unsupportedContext, + use: use, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: useId, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } +}; +HooksDispatcher.useEffectEvent = unsupportedHook; +function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); +} +function unsupportedRefresh() { + throw Error("Refreshing the cache is not supported in Server Components."); +} +function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); +} +function useId() { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return "_" + currentRequest$1.identifierPrefix + "S_" + id.toString(32) + "_"; +} +function use(usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (usable.$$typeof === CLIENT_REFERENCE_TAG$1) { + if (null != usable.value && usable.value.$$typeof === REACT_CONTEXT_TYPE) + throw Error("Cannot read a Client Context from a Server Component."); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error("An unsupported type was passed to use(): " + String(usable)); +} +var DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var JSCompiler_inline_result = (JSCompiler_inline_result = currentRequest + ? currentRequest + : null) + ? JSCompiler_inline_result.cache + : new Map(); + var entry = JSCompiler_inline_result.get(resourceType); + void 0 === entry && + ((entry = resourceType()), + JSCompiler_inline_result.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = currentRequest ? currentRequest : null; + return request ? request.cacheController.signal : null; + } + }, + ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); +var isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf; +function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); +} +function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } +} +function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; +} +var CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); +function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + objKind = -1; + var length = 0; + if (isArrayImpl(objectOrArray)) { + var str = "["; + for (var i = 0; i < objectOrArray.length; i++) { + 0 < i && (str += ", "); + var value = objectOrArray[i]; + value = + "object" === typeof value && null !== value + ? describeObjectForErrorMessage(value) + : describeValueForErrorMessage(value); + "" + i === expandedName + ? ((objKind = str.length), (length = value.length), (str += value)) + : (str = + 10 > value.length && 40 > str.length + value.length + ? str + value + : str + "..."); + } + str += "]"; + } else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + str = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + str = "{"; + i = Object.keys(objectOrArray); + for (value = 0; value < i.length; value++) { + 0 < value && (str += ", "); + var name = i[value], + encodedKey = JSON.stringify(name); + str += ('"' + name + '"' === encodedKey ? name : encodedKey) + ": "; + encodedKey = objectOrArray[name]; + encodedKey = + "object" === typeof encodedKey && null !== encodedKey + ? describeObjectForErrorMessage(encodedKey) + : describeValueForErrorMessage(encodedKey); + name === expandedName + ? ((objKind = str.length), + (length = encodedKey.length), + (str += encodedKey)) + : (str = + 10 > encodedKey.length && 40 > str.length + encodedKey.length + ? str + encodedKey + : str + "..."); + } + str += "}"; + } + return void 0 === expandedName + ? str + : -1 < objKind && 0 < length + ? ((objectOrArray = " ".repeat(objKind) + "^".repeat(length)), + "\n " + str + "\n " + objectOrArray) + : "\n " + str; +} +var hasOwnProperty = Object.prototype.hasOwnProperty, + ObjectPrototype = Object.prototype, + stringify = JSON.stringify; +function defaultErrorHandler(error) { + console.error(error); +} +function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences +) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error("Currently React only supports one RSC renderer at a time."); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + var abortSet = new Set(), + pingedTasks = [], + hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = []; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = void 0 === onPostpone ? noop : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + type = createTask(this, model, null, !1, 0, abortSet); + pingedTasks.push(type); +} +var currentRequest = null; +function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + switch (thenable.status) { + case "fulfilled": + return ( + (newTask.model = thenable.value), pingTask(request, newTask), newTask.id + ); + case "rejected": + return erroredTask(request, newTask, thenable.reason), newTask.id; + default: + if (12 === request.status) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + (erroredTask(request, newTask, reason), enqueueFlush(request)); + } + ); + return newTask.id; +} +function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(stringToChunk(entry)), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$8) { + error(x$8); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener("abort", abortStream), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); +} +function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModelWithFormatContext( + request, + entry.value, + 0 + ); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(stringToChunk(endStreamRow)); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + iterator.next().then(progress, error); + } catch (x$9) { + error(x$9); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + iterable = iterable === iterator; + var streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (iterable ? "x" : "X") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortIterable); + iterator.next().then(progress, error); + return serializeByValueID(streamTask.id); +} +function emitHint(request, code, model) { + model = stringify(model); + code = stringToChunk(":H" + code + model + "\n"); + request.completedHintChunks.push(code); + enqueueFlush(request); +} +function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; +} +function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return wakeable.value; + case "rejected": + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { $$typeof: REACT_LAZY_TYPE, _payload: wakeable, _init: readThenable }; +} +function voidHandler() {} +function processServerComponentReturnValue(request, task, Component, result) { + if ( + "object" !== typeof result || + null === result || + result.$$typeof === CLIENT_REFERENCE_TAG$1 + ) + return result; + if ("function" === typeof result.then) + return createLazyWrapperAroundWakeable(request, task, result); + var iteratorFn = getIteratorFn(result); + return iteratorFn + ? ((request = {}), + (request[Symbol.iterator] = function () { + return iteratorFn.call(result); + }), + request) + : "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((request = {}), + (request[ASYNC_ITERATOR] = function () { + return result[ASYNC_ITERATOR](); + }), + request); +} +function renderFunctionComponent(request, task, key, Component, props) { + var prevThenableState = task.thenableState; + task.thenableState = null; + thenableIndexCounter = 0; + thenableState = prevThenableState; + props = Component(props, void 0); + if (12 === request.status) + throw ( + ("object" === typeof props && + null !== props && + "function" === typeof props.then && + props.$$typeof !== CLIENT_REFERENCE_TAG$1 && + props.then(voidHandler, voidHandler), + null) + ); + props = processServerComponentReturnValue(request, task, Component, props); + Component = task.keyPath; + prevThenableState = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = prevThenableState; + return request; +} +function renderFragment(request, task, children) { + return null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children } + ]), + task.implicitSlot ? [request] : request) + : children; +} +var serializedSize = 0; +function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + pingTask(request, task); + return serializeLazyID(task.id); +} +function renderElement(request, task, type, key, ref, props) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + if ( + "function" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 && + type.$$typeof !== TEMPORARY_REFERENCE_TAG + ) + return renderFunctionComponent(request, task, key, type, props); + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + (type = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (props = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = type), + props + ); + if ( + null != type && + "object" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + var init = type._init; + type = init(type._payload); + if (12 === request.status) throw null; + return renderElement(request, task, type, key, ref, props); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent(request, task, key, type.render, props); + case REACT_MEMO_TYPE: + return renderElement(request, task, type.type, key, ref, props); + } + else + "string" === typeof type && + ((ref = task.formatContext), + (init = getChildFormatContext(ref, type, props)), + ref !== init && + null != props.children && + outlineModelWithFormatContext(request, props.children, init)); + request = key; + key = task.keyPath; + null === request + ? (request = key) + : null !== key && (request = key + "," + request); + props = [REACT_ELEMENT_TYPE, type, request, props]; + task = task.implicitSlot && null !== request ? [props] : props; + return task; +} +function pingTask(request, task) { + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : scheduleWork(function () { + return performWork(request); + })); +} +function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet +) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + serializedSize += parentPropertyName.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + var JSCompiler_inline_result = renderModelDestructive( + request, + task, + this, + parentPropertyName, + value + ); + } catch (thrownValue) { + if ( + ((parentPropertyName = task.model), + (parentPropertyName = + "object" === typeof parentPropertyName && + null !== parentPropertyName && + (parentPropertyName.$$typeof === REACT_ELEMENT_TYPE || + parentPropertyName.$$typeof === REACT_LAZY_TYPE)), + 12 === request.status) + ) + (task.status = 3), + 21 === request.type + ? ((prevKeyPath = request.nextChunkId++), + (prevKeyPath = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)), + (JSCompiler_inline_result = prevKeyPath)) + : ((prevKeyPath = request.fatalError), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath))); + else if ( + ((value = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue), + "object" === typeof value && + null !== value && + "function" === typeof value.then) + ) { + JSCompiler_inline_result = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + var ping = JSCompiler_inline_result.ping; + value.then(ping, ping); + JSCompiler_inline_result.thenableState = + getThenableStateAfterSuspending(); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(JSCompiler_inline_result.id) + : serializeByValueID(JSCompiler_inline_result.id); + } else + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + request.pendingChunks++, + (prevKeyPath = request.nextChunkId++), + (prevImplicitSlot = logRecoverableError(request, value, task)), + emitErrorChunk(request, prevKeyPath, prevImplicitSlot), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)); + } + return JSCompiler_inline_result; + }, + thenableState: null + }; + abortSet.add(task); + return task; +} +function serializeByValueID(id) { + return "$" + id.toString(16); +} +function serializeLazyID(id) { + return "$L" + id.toString(16); +} +function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + id = id.toString(16) + ":" + request + "\n"; + return stringToChunk(id); +} +function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference +) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var config = request.bundlerConfig, + modulePath = clientReference.$$id; + existingId = ""; + var resolvedModuleData = config[modulePath]; + if (resolvedModuleData) existingId = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((existingId = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + var JSCompiler_inline_result = + !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, existingId, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, existingId]; + request.pendingChunks++; + var importId = request.nextChunkId++, + json = stringify(JSCompiler_inline_result), + row = importId.toString(16) + ":I" + json + "\n", + processedChunk = stringToChunk(row); + request.completedImportChunks.push(processedChunk); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName), + serializeByValueID(parent) + ); + } +} +function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks + ); + retryTask(request, value); + return value.id; +} +function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); +} +function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener("abort", abortBlob), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener("abort", abortBlob), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask(request, model, null, !1, 0, request.abortableTasks), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); +} +var modelRoot = !1; +function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value +) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var existingReference = writtenObjects.get(value); + if (void 0 !== existingReference) + if (modelRoot === value) modelRoot = null; + else return existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((parent = writtenObjects.get(parent)), + void 0 !== parent && + ((elementReference = parent + ":" + parentPropertyName), + writtenObjects.set(value, elementReference))); + } + if (3200 < serializedSize) return deferTask(request, task); + parentPropertyName = value.props; + parent = parentPropertyName.ref; + request = renderElement( + request, + task, + value.type, + value.key, + void 0 !== parent ? parent : null, + parentPropertyName + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (writtenObjects.has(request) || + writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (3200 < serializedSize) return deferTask(request, task); + task.thenableState = null; + parentPropertyName = value._init; + value = parentPropertyName(value._payload); + if (12 === request.status) throw null; + return renderModelDestructive(request, task, emptyRoot, "", value); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = request.writtenObjects; + writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return "$@" + serializeThenable(request, task, value).toString(16); + if (modelRoot === value) modelRoot = null; + else return writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== writtenObjects) + if (modelRoot === value) { + if (writtenObjects !== serializeByValueID(task.id)) + return writtenObjects; + modelRoot = null; + } else return writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((writtenObjects = elementReference.get(parent)), + void 0 !== writtenObjects) + ) { + existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + existingReference = "type"; + break; + case "2": + existingReference = "key"; + break; + case "3": + existingReference = "props"; + break; + case "4": + existingReference = "_owner"; + } + elementReference.set(value, writtenObjects + ":" + existingReference); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) + return ( + (value = Array.from(value)), + "$Q" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Set) + return ( + (value = Array.from(value)), + "$W" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Error) return "$Z"; + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (parentPropertyName = elementReference.call(value)), + parentPropertyName === value + ? ((value = Array.from(parentPropertyName)), + "$i" + + outlineModelWithFormatContext(request, value, 0).toString(16)) + : renderFragment(request, task, Array.from(parentPropertyName)) + ); + if ("function" === typeof ReadableStream && value instanceof ReadableStream) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return ( + null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: value } + ]), + (request = task.implicitSlot ? [request] : request)) + : ((parentPropertyName = elementReference.call(value)), + (request = serializeAsyncIterable( + request, + task, + value, + parentPropertyName + ))), + request + ); + if (value instanceof Date) return "$D" + value.toJSON(); + request = getPrototypeOf(value); + if ( + request !== ObjectPrototype && + (null === request || null !== getPrototypeOf(request)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + return value; + } + if ("string" === typeof value) { + serializedSize += value.length; + if ( + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ) + return "$D" + value; + if (1024 <= value.length && null !== byteLengthOfChunk) + return ( + request.pendingChunks++, + (task = request.nextChunkId++), + emitTextChunk(request, task, value, !1), + serializeByValueID(task) + ); + request = "$" === value[0] ? "$" + value : value; + return request; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) + return Number.isFinite(value) + ? 0 === value && -Infinity === 1 / value + ? "$-0" + : value + : Infinity === value + ? "$Infinity" + : -Infinity === value + ? "$-Infinity" + : "$NaN"; + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return ( + (task = request.writtenServerReferences), + (parentPropertyName = task.get(value)), + void 0 !== parentPropertyName + ? (request = "$F" + parentPropertyName.toString(16)) + : ((parentPropertyName = value.$$bound), + (parentPropertyName = + null === parentPropertyName + ? null + : Promise.resolve(parentPropertyName)), + (request = outlineModelWithFormatContext( + request, + { id: value.$$id, bound: parentPropertyName }, + 0 + )), + task.set(value, request), + (request = "$F" + request.toString(16))), + request + ); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), void 0 !== request) + ) + return "$T" + request; + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + parentPropertyName = request.nextChunkId++; + parent = encodeReferenceChunk( + request, + parentPropertyName, + "$S" + elementReference + ); + request.completedImportChunks.push(parent); + task.set(value, parentPropertyName); + return serializeByValueID(parentPropertyName); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); +} +function logRecoverableError(request, error) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onError = request.onError; + var errorDigest = onError(error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; +} +function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + null !== request.destination + ? ((request.status = 14), closeWithError(request.destination, error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); +} +function emitErrorChunk(request, id, digest) { + digest = { digest: digest }; + id = id.toString(16) + ":E" + stringify(digest) + "\n"; + id = stringToChunk(id); + request.completedErrorChunks.push(id); +} +function emitModelChunk(request, id, json) { + id = id.toString(16) + ":" + json + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); +} +function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + debug = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + typedArray = 2048 < typedArray.byteLength ? debug.slice() : debug; + debug = typedArray.byteLength; + id = id.toString(16) + ":" + tag + debug.toString(16) + ","; + id = stringToChunk(id); + request.completedRegularChunks.push(id, typedArray); +} +function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + text = stringToChunk(text); + debug = text.byteLength; + id = id.toString(16) + ":T" + debug.toString(16) + ","; + id = stringToChunk(id); + request.completedRegularChunks.push(id, text); +} +function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? emitTextChunk(request, id, value, !1) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk(request, id, "m", value, !1) + : value instanceof DataView + ? emitTypedArrayChunk(request, id, "V", value, !1) + : ((value = stringify(value, task.toJSON)), + emitModelChunk(request, task.id, value)); +} +function erroredTask(request, task, error) { + task.status = 4; + error = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, error); + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); +} +var emptyRoot = {}; +function retryTask(request, task) { + if (0 === task.status) { + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set(resolvedModel, serializeByValueID(task.id)), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel); + emitModelChunk(request, task.id, json); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (12 === request.status) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + serializedSize = parentSerializedSize; + } + } +} +function tryStreamTask(request, task) { + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + serializedSize = parentSerializedSize; + } +} +function performWork(request) { + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } +} +function abortTask(task) { + 0 === task.status && (task.status = 3); +} +function finishAbortedTask(task, request, errorId) { + 3 === task.status && + ((errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); +} +function haltTask(task) { + 0 === task.status && (task.status = 3); +} +function finishHaltedTask(task, request) { + 3 === task.status && request.pendingChunks--; +} +function flushCompletedChunks(request) { + var destination = request.destination; + if (null !== destination) { + currentView = new Uint8Array(2048); + writtenBytes = 0; + try { + for ( + var importsChunks = request.completedImportChunks, i = 0; + i < importsChunks.length; + i++ + ) + request.pendingChunks--, + writeChunkAndReturn(destination, importsChunks[i]); + importsChunks.splice(0, i); + var hintChunks = request.completedHintChunks; + for (i = 0; i < hintChunks.length; i++) + writeChunkAndReturn(destination, hintChunks[i]); + hintChunks.splice(0, i); + var regularChunks = request.completedRegularChunks; + for (i = 0; i < regularChunks.length; i++) + request.pendingChunks--, + writeChunkAndReturn(destination, regularChunks[i]); + regularChunks.splice(0, i); + var errorChunks = request.completedErrorChunks; + for (i = 0; i < errorChunks.length; i++) + request.pendingChunks--, + writeChunkAndReturn(destination, errorChunks[i]); + errorChunks.splice(0, i); + } finally { + (request.flushScheduled = !1), + currentView && + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = null), + (writtenBytes = 0)); + } + } + 0 === request.pendingChunks && + (12 > request.status && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = 14), + request.destination.close(), + (request.destination = null))); +} +function startWork(request) { + request.flushScheduled = null !== request.destination; + scheduleMicrotask(function () { + return performWork(request); + }); + scheduleWork(function () { + 10 === request.status && (request.status = 11); + }); +} +function enqueueFlush(request) { + !1 === request.flushScheduled && + 0 === request.pingedTasks.length && + null !== request.destination && + ((request.flushScheduled = !0), + scheduleWork(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + })); +} +function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); +} +function startFlowing(request, destination) { + if (13 === request.status) + (request.status = 14), closeWithError(destination, request.fatalError); + else if (14 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} +function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = 12; + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + scheduleWork(function () { + return finishHalt(request, abortableTasks); + }); + else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + errorId = request.nextChunkId++; + request.fatalError = errorId; + request.pendingChunks++; + emitErrorChunk(request, errorId, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId); + }); + scheduleWork(function () { + return finishAbort(request, abortableTasks, errorId); + }); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$23) { + logRecoverableError(request, error$23, null), + fatalError(request, error$23); + } +} +function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; +} +var chunkCache = new Map(); +function requireAsyncModule(id) { + var promise = __webpack_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; +} +function ignoreReject() {} +function preloadModule(metadata) { + for (var chunks = metadata[1], promises = [], i = 0; i < chunks.length; ) { + var chunkId = chunks[i++], + chunkFilename = chunks[i++], + entry = chunkCache.get(chunkId); + void 0 === entry + ? (chunkMap.set(chunkId, chunkFilename), + (chunkFilename = __webpack_chunk_load__(chunkId)), + promises.push(chunkFilename), + (entry = chunkCache.set.bind(chunkCache, chunkId, null)), + chunkFilename.then(entry, ignoreReject), + chunkCache.set(chunkId, chunkFilename)) + : null !== entry && promises.push(entry); + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; +} +function requireModule(metadata) { + var moduleExports = __webpack_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); +} +var chunkMap = new Map(), + webpackGetChunkFilename = __webpack_require__.u; +__webpack_require__.u = function (chunkId) { + var flightChunk = chunkMap.get(chunkId); + return void 0 !== flightChunk + ? flightChunk + : webpackGetChunkFilename(chunkId); +}; +function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; +} +Chunk.prototype = Object.create(Promise.prototype); +Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), this.reason.push(reject)); + break; + default: + reject(this.reason); + } +}; +function createPendingChunk(response) { + return new Chunk("pending", null, null, response); +} +function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); +} +function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } +} +function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } +} +function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1, + response + ); +} +function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1 + ); +} +function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key +) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; +} +function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString(response, parentObj, parentKey, value, reference); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel(response, value, i, value[i], parentObj)), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; +} +var initializingChunk = null, + initializingChunkBlockedModel = null; +function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } +} +function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); +} +function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; +} +function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path +) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && null === blocked.value && (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; +} +function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; +} +function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } +} +function createMap(response, model) { + return new Map(model); +} +function createSet(response, model) { + return new Set(model); +} +function extractIterator(response, model) { + return model[Symbol.iterator](); +} +function createModel(response, model) { + return model; +} +function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey +) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; +} +function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close("C" === chunks ? '"$undefined"' : chunks.slice(1)) + : controller.enqueueModel(chunks); +} +function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var chunk$26 = createPendingChunk(response); + chunk$26.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = chunk$26; + chunk.then(function () { + previousBlockedChunk === chunk$26 && (previousBlockedChunk = null); + resolveModelChunk(chunk$26, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; +} +function asyncIterator() { + return this; +} +function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; +} +function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + $jscomp$compprop2 = {}; + $jscomp$compprop2 = + (($jscomp$compprop2[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }), + $jscomp$compprop2); + iterator = iterator ? $jscomp$compprop2[ASYNC_ITERATOR]() : $jscomp$compprop2; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; +} +function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return (obj = parseInt(value.slice(2), 16)), getChunk(response, obj); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel(response, value, obj, key, createModel)), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if (void 0 === reference || void 0 === response._temporaryReferences) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray(response, value, Uint8ClampedArray, 1, obj, key); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray(response, value, BigUint64Array, 8, obj, key); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; +} +function createResponse(bundlerConfig, formFieldPrefix, temporaryReferences) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; +} +function close(response) { + reportGlobalError(response, Error("Connection closed.")); +} +function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); +} +function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; +} +exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); +}; +exports.createTemporaryReferenceSet = function () { + return new WeakMap(); +}; +exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference(serverManifest, value.id, value.bound))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); +}; +exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); +}; +exports.decodeReply = function (body, webpackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + webpackMap = getChunk(body, 0); + close(body); + return webpackMap; +}; +exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + 21, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; +exports.registerClientReference = function ( + proxyImplementation, + id, + exportName +) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); +}; +exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); +}; +exports.renderToReadableStream = function (model, webpackMap, options) { + var request = new RequestInstance( + 20, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + noop, + noop, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + return new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); +}; diff --git a/.socket/blob/1471bd5f27afa97c864014bc200f2d6c05c1c8a103eb9446706e555aeb7a7e07 b/.socket/blob/1471bd5f27afa97c864014bc200f2d6c05c1c8a103eb9446706e555aeb7a7e07 new file mode 100644 index 0000000..87fecee --- /dev/null +++ b/.socket/blob/1471bd5f27afa97c864014bc200f2d6c05c1c8a103eb9446706e555aeb7a7e07 @@ -0,0 +1,1923 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-webpack-client.browser.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 strict"; +var ReactDOM = require("react-dom"), + decoderOptions = { stream: !0 }; +function resolveClientReference(bundlerConfig, metadata) { + if (bundlerConfig) { + var moduleExports = bundlerConfig[metadata[0]]; + if ((bundlerConfig = moduleExports && (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0))) + moduleExports = bundlerConfig.name; + else { + bundlerConfig = moduleExports && moduleExports["*"]; + if (!bundlerConfig) + throw Error( + 'Could not find the module "' + + metadata[0] + + '" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.' + ); + moduleExports = metadata[2]; + } + return 4 === metadata.length + ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1] + : [bundlerConfig.id, bundlerConfig.chunks, moduleExports]; + } + return metadata; +} +function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; +} +var chunkCache = new Map(); +function requireAsyncModule(id) { + var promise = __webpack_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; +} +function ignoreReject() {} +function preloadModule(metadata) { + for (var chunks = metadata[1], promises = [], i = 0; i < chunks.length; ) { + var chunkId = chunks[i++], + chunkFilename = chunks[i++], + entry = chunkCache.get(chunkId); + void 0 === entry + ? (chunkMap.set(chunkId, chunkFilename), + (chunkFilename = __webpack_chunk_load__(chunkId)), + promises.push(chunkFilename), + (entry = chunkCache.set.bind(chunkCache, chunkId, null)), + chunkFilename.then(entry, ignoreReject), + chunkCache.set(chunkId, chunkFilename)) + : null !== entry && promises.push(entry); + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; +} +function requireModule(metadata) { + var moduleExports = __webpack_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); +} +var chunkMap = new Map(), + webpackGetChunkFilename = __webpack_require__.u; +__webpack_require__.u = function (chunkId) { + var flightChunk = chunkMap.get(chunkId); + return void 0 !== flightChunk + ? flightChunk + : webpackGetChunkFilename(chunkId); +}; +var ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; +} +var ASYNC_ITERATOR = Symbol.asyncIterator, + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + ObjectPrototype = Object.prototype, + knownServerReferences = new WeakMap(); +function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; +} +function processReply( + root, + formFieldPrefix, + temporaryReferences, + resolve, + reject +) { + function serializeTypedArray(tag, typedArray) { + typedArray = new Blob([ + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ]); + var blobId = nextPartId++; + null === formData && (formData = new FormData()); + formData.append(formFieldPrefix + blobId, typedArray); + return "$" + tag + blobId.toString(16); + } + function serializeBinaryReader(reader) { + function progress(entry) { + entry.done + ? ((entry = nextPartId++), + data.append(formFieldPrefix + entry, new Blob(buffer)), + data.append( + formFieldPrefix + streamId, + '"$o' + entry.toString(16) + '"' + ), + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data)) + : (buffer.push(entry.value), + reader.read(new Uint8Array(1024)).then(progress, reject)); + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++, + buffer = []; + reader.read(new Uint8Array(1024)).then(progress, reject); + return "$r" + streamId.toString(16); + } + function serializeReader(reader) { + function progress(entry) { + if (entry.done) + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON); + reader.read().then(progress, reject); + } catch (x) { + reject(x); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + reader.read().then(progress, reject); + return "$R" + streamId.toString(16); + } + function serializeReadableStream(stream) { + try { + var binaryReader = stream.getReader({ mode: "byob" }); + } catch (x) { + return serializeReader(stream.getReader()); + } + return serializeBinaryReader(binaryReader); + } + function serializeAsyncIterable(iterable, iterator) { + function progress(entry) { + if (entry.done) { + if (void 0 === entry.value) + data.append(formFieldPrefix + streamId, "C"); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, "C" + partJSON); + } catch (x) { + reject(x); + return; + } + pendingParts--; + 0 === pendingParts && resolve(data); + } else + try { + var partJSON$21 = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON$21); + iterator.next().then(progress, reject); + } catch (x$22) { + reject(x$22); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + iterable = iterable === iterator; + iterator.next().then(progress, reject); + return "$" + (iterable ? "x" : "X") + streamId.toString(16); + } + function resolveToJSON(key, value) { + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) { + var parentReference = writtenObjects.get(this); + if (void 0 !== parentReference) + return ( + temporaryReferences.set(parentReference + ":" + key, value), + "$T" + ); + } + throw Error( + "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." + ); + case REACT_LAZY_TYPE: + parentReference = value._payload; + var init = value._init; + null === formData && (formData = new FormData()); + pendingParts++; + try { + var resolvedModel = init(parentReference), + lazyId = nextPartId++, + partJSON = serializeModel(resolvedModel, lazyId); + formData.append(formFieldPrefix + lazyId, partJSON); + return "$" + lazyId.toString(16); + } catch (x) { + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + pendingParts++; + var lazyId$23 = nextPartId++; + parentReference = function () { + try { + var partJSON$24 = serializeModel(value, lazyId$23), + data$25 = formData; + data$25.append(formFieldPrefix + lazyId$23, partJSON$24); + pendingParts--; + 0 === pendingParts && resolve(data$25); + } catch (reason) { + reject(reason); + } + }; + x.then(parentReference, parentReference); + return "$" + lazyId$23.toString(16); + } + reject(x); + return null; + } finally { + pendingParts--; + } + } + if ("function" === typeof value.then) { + null === formData && (formData = new FormData()); + pendingParts++; + var promiseId = nextPartId++; + value.then(function (partValue) { + try { + var partJSON$27 = serializeModel(partValue, promiseId); + partValue = formData; + partValue.append(formFieldPrefix + promiseId, partJSON$27); + pendingParts--; + 0 === pendingParts && resolve(partValue); + } catch (reason) { + reject(reason); + } + }, reject); + return "$@" + promiseId.toString(16); + } + parentReference = writtenObjects.get(value); + if (void 0 !== parentReference) + if (modelRoot === value) modelRoot = null; + else return parentReference; + else + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference && + ((key = parentReference + ":" + key), + writtenObjects.set(value, key), + void 0 !== temporaryReferences && + temporaryReferences.set(key, value))); + if (isArrayImpl(value)) return value; + if (value instanceof FormData) { + null === formData && (formData = new FormData()); + var data$31 = formData; + key = nextPartId++; + var prefix = formFieldPrefix + key + "_"; + value.forEach(function (originalValue, originalKey) { + data$31.append(prefix + originalKey, originalValue); + }); + return "$K" + key.toString(16); + } + if (value instanceof Map) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$Q" + key.toString(16) + ); + if (value instanceof Set) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$W" + key.toString(16) + ); + if (value instanceof ArrayBuffer) + return ( + (key = new Blob([value])), + (parentReference = nextPartId++), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + parentReference, key), + "$A" + parentReference.toString(16) + ); + if (value instanceof Int8Array) return serializeTypedArray("O", value); + if (value instanceof Uint8Array) return serializeTypedArray("o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray("U", value); + if (value instanceof Int16Array) return serializeTypedArray("S", value); + if (value instanceof Uint16Array) return serializeTypedArray("s", value); + if (value instanceof Int32Array) return serializeTypedArray("L", value); + if (value instanceof Uint32Array) return serializeTypedArray("l", value); + if (value instanceof Float32Array) return serializeTypedArray("G", value); + if (value instanceof Float64Array) return serializeTypedArray("g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray("M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray("m", value); + if (value instanceof DataView) return serializeTypedArray("V", value); + if ("function" === typeof Blob && value instanceof Blob) + return ( + null === formData && (formData = new FormData()), + (key = nextPartId++), + formData.append(formFieldPrefix + key, value), + "$B" + key.toString(16) + ); + if ((key = getIteratorFn(value))) + return ( + (parentReference = key.call(value)), + parentReference === value + ? ((key = nextPartId++), + (parentReference = serializeModel( + Array.from(parentReference), + key + )), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$i" + key.toString(16)) + : Array.from(parentReference) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(value); + key = value[ASYNC_ITERATOR]; + if ("function" === typeof key) + return serializeAsyncIterable(value, key.call(value)); + key = getPrototypeOf(value); + if ( + key !== ObjectPrototype && + (null === key || null !== getPrototypeOf(key)) + ) { + if (void 0 === temporaryReferences) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." + ); + return "$T"; + } + return value; + } + if ("string" === typeof value) { + if ("Z" === value[value.length - 1] && this[key] instanceof Date) + return "$D" + value; + key = "$" === value[0] ? "$" + value : value; + return key; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + parentReference = knownServerReferences.get(value); + if (void 0 !== parentReference) + return ( + (key = JSON.stringify( + { id: parentReference.id, bound: parentReference.bound }, + resolveToJSON + )), + null === formData && (formData = new FormData()), + (parentReference = nextPartId++), + formData.set(formFieldPrefix + parentReference, key), + "$F" + parentReference.toString(16) + ); + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again." + ); + } + if ("symbol" === typeof value) { + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." + ); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported as an argument to a Server Function." + ); + } + function serializeModel(model, id) { + "object" === typeof model && + null !== model && + ((id = "$" + id.toString(16)), + writtenObjects.set(model, id), + void 0 !== temporaryReferences && temporaryReferences.set(id, model)); + modelRoot = model; + return JSON.stringify(model, resolveToJSON); + } + var nextPartId = 1, + pendingParts = 0, + formData = null, + writtenObjects = new WeakMap(), + modelRoot = root, + json = serializeModel(root, 0); + null === formData + ? resolve(json) + : (formData.set(formFieldPrefix + "0", json), + 0 === pendingParts && resolve(formData)); + return function () { + 0 < pendingParts && + ((pendingParts = 0), + null === formData ? resolve(json) : resolve(formData)); + }; +} +function registerBoundServerReference(reference, id, bound) { + knownServerReferences.has(reference) || + knownServerReferences.set(reference, { + id: id, + originalBind: reference.bind, + bound: bound + }); +} +function createBoundServerReference(metaData, callServer) { + function action() { + var args = Array.prototype.slice.call(arguments); + return bound + ? "fulfilled" === bound.status + ? callServer(id, bound.value.concat(args)) + : Promise.resolve(bound).then(function (boundArgs) { + return callServer(id, boundArgs.concat(args)); + }) + : callServer(id, args); + } + var id = metaData.id, + bound = metaData.bound; + registerBoundServerReference(action, id, bound); + return action; +} +function ReactPromise(status, value, reason) { + this.status = status; + this.value = value; + this.reason = reason; +} +ReactPromise.prototype = Object.create(Promise.prototype); +ReactPromise.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + break; + case "resolved_module": + initializeModuleChunk(this); + } + switch (this.status) { + case "fulfilled": + "function" === typeof resolve && resolve(this.value); + break; + case "pending": + case "blocked": + "function" === typeof resolve && + (null === this.value && (this.value = []), this.value.push(resolve)); + "function" === typeof reject && + (null === this.reason && (this.reason = []), this.reason.push(reject)); + break; + case "halted": + break; + default: + "function" === typeof reject && reject(this.reason); + } +}; +function readChunk(chunk) { + switch (chunk.status) { + case "resolved_model": + initializeModelChunk(chunk); + break; + case "resolved_module": + initializeModuleChunk(chunk); + } + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "pending": + case "blocked": + case "halted": + throw chunk; + default: + throw chunk.reason; + } +} +function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value); + } +} +function rejectChunk(listeners, error) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(error) + : rejectReference(listener, error); + } +} +function resolveBlockedCycle(resolvedChunk, reference) { + var referencedChunk = reference.handler.chunk; + if (null === referencedChunk) return null; + if (referencedChunk === resolvedChunk) return reference.handler; + reference = referencedChunk.value; + if (null !== reference) + for ( + referencedChunk = 0; + referencedChunk < reference.length; + referencedChunk++ + ) { + var listener = reference[referencedChunk]; + if ( + "function" !== typeof listener && + ((listener = resolveBlockedCycle(resolvedChunk, listener)), + null !== listener) + ) + return listener; + } + return null; +} +function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) { + switch (chunk.status) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "blocked": + for (var i = 0; i < resolveListeners.length; i++) { + var listener = resolveListeners[i]; + if ("function" !== typeof listener) { + var cyclicHandler = resolveBlockedCycle(chunk, listener); + if (null !== cyclicHandler) + switch ( + (fulfillReference(listener, cyclicHandler.value), + resolveListeners.splice(i, 1), + i--, + null !== rejectListeners && + ((listener = rejectListeners.indexOf(listener)), + -1 !== listener && rejectListeners.splice(listener, 1)), + chunk.status) + ) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + return; + case "rejected": + null !== rejectListeners && + rejectChunk(rejectListeners, chunk.reason); + return; + } + } + } + case "pending": + if (chunk.value) + for (i = 0; i < resolveListeners.length; i++) + chunk.value.push(resolveListeners[i]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for ( + resolveListeners = 0; + resolveListeners < rejectListeners.length; + resolveListeners++ + ) + chunk.reason.push(rejectListeners[resolveListeners]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && rejectChunk(rejectListeners, chunk.reason); + } +} +function triggerErrorOnChunk(response, chunk, error) { + "pending" !== chunk.status && "blocked" !== chunk.status + ? chunk.reason.error(error) + : ((response = chunk.reason), + (chunk.status = "rejected"), + (chunk.reason = error), + null !== response && rejectChunk(response, error)); +} +function createResolvedIteratorResultChunk(response, value, done) { + return new ReactPromise( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + response + ); +} +function resolveIteratorResultChunk(response, chunk, value, done) { + resolveModelChunk( + response, + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}" + ); +} +function resolveModelChunk(response, chunk, value) { + if ("pending" !== chunk.status) chunk.reason.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = response; + null !== resolveListeners && + (initializeModelChunk(chunk), + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners)); + } +} +function resolveModuleChunk(response, chunk, value) { + if ("pending" === chunk.status || "blocked" === chunk.status) { + response = chunk.value; + var rejectListeners = chunk.reason; + chunk.status = "resolved_module"; + chunk.value = value; + null !== response && + (initializeModuleChunk(chunk), + wakeChunkIfInitialized(chunk, response, rejectListeners)); + } +} +var initializingHandler = null; +function initializeModelChunk(chunk) { + var prevHandler = initializingHandler; + initializingHandler = null; + var resolvedModel = chunk.value, + response = chunk.reason; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + try { + var value = JSON.parse(resolvedModel, response._fromJSON), + resolveListeners = chunk.value; + if (null !== resolveListeners) + for ( + chunk.value = null, chunk.reason = null, resolvedModel = 0; + resolvedModel < resolveListeners.length; + resolvedModel++ + ) { + var listener = resolveListeners[resolvedModel]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + if (null !== initializingHandler) { + if (initializingHandler.errored) throw initializingHandler.reason; + if (0 < initializingHandler.deps) { + initializingHandler.value = value; + initializingHandler.chunk = chunk; + return; + } + } + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + initializingHandler = prevHandler; + } +} +function initializeModuleChunk(chunk) { + try { + var value = requireModule(chunk.value); + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } +} +function reportGlobalError(weakResponse, error) { + weakResponse._closed = !0; + weakResponse._closedReason = error; + weakResponse._chunks.forEach(function (chunk) { + "pending" === chunk.status && + triggerErrorOnChunk(weakResponse, chunk, error); + }); +} +function createLazyChunkWrapper(chunk) { + return { $$typeof: REACT_LAZY_TYPE, _payload: chunk, _init: readChunk }; +} +function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._closed + ? new ReactPromise("rejected", null, response._closedReason) + : new ReactPromise("pending", null, null)), + chunks.set(id, chunk)); + return chunk; +} +function fulfillReference(reference, value) { + for ( + var response = reference.response, + handler = reference.handler, + parentObject = reference.parentObject, + key = reference.key, + map = reference.map, + path = reference.path, + i = 1; + i < path.length; + i++ + ) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((value = value._payload), value === handler.chunk)) + value = handler.value; + else { + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + continue; + case "blocked": + var cyclicHandler = resolveBlockedCycle(value, reference); + if (null !== cyclicHandler) { + value = cyclicHandler.value; + continue; + } + case "pending": + path.splice(0, i - 1); + null === value.value + ? (value.value = [reference]) + : value.value.push(reference); + null === value.reason + ? (value.reason = [reference]) + : value.reason.push(reference); + return; + case "halted": + return; + default: + rejectReference(reference, value.reason); + return; + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((reference = value._payload), reference === handler.chunk)) + value = handler.value; + else { + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + value = reference.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + parentObject[key] = response; + "" === key && null === handler.value && (handler.value = response); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((parentObject = handler.value), key)) { + case "3": + parentObject.props = response; + } + handler.deps--; + 0 === handler.deps && + ((key = handler.chunk), + null !== key && + "blocked" === key.status && + ((parentObject = key.value), + (key.status = "fulfilled"), + (key.value = handler.value), + (key.reason = handler.reason), + null !== parentObject && wakeChunk(parentObject, handler.value))); +} +function rejectReference(reference, error) { + var handler = reference.handler; + reference = reference.response; + handler.errored || + ((handler.errored = !0), + (handler.value = null), + (handler.reason = error), + (handler = handler.chunk), + null !== handler && + "blocked" === handler.status && + triggerErrorOnChunk(reference, handler, error)); +} +function waitForReference( + referencedChunk, + parentObject, + key, + response, + map, + path +) { + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + parentObject = { + response: response, + handler: handler, + parentObject: parentObject, + key: key, + map: map, + path: path + }; + null === referencedChunk.value + ? (referencedChunk.value = [parentObject]) + : referencedChunk.value.push(parentObject); + null === referencedChunk.reason + ? (referencedChunk.reason = [parentObject]) + : referencedChunk.reason.push(parentObject); + return null; +} +function loadServerReference(response, metaData, parentObject, key) { + if (!response._serverReferenceConfig) + return createBoundServerReference(metaData, response._callServer); + var serverReference = resolveServerReference( + response._serverReferenceConfig, + metaData.id + ), + promise = preloadModule(serverReference); + if (promise) + metaData.bound && (promise = Promise.all([promise, metaData.bound])); + else if (metaData.bound) promise = Promise.resolve(metaData.bound); + else + return ( + (promise = requireModule(serverReference)), + registerBoundServerReference(promise, metaData.id, metaData.bound), + promise + ); + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + promise.then( + function () { + var resolvedValue = requireModule(serverReference); + if (metaData.bound) { + var boundArgs = metaData.bound.value.slice(0); + boundArgs.unshift(null); + resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs); + } + registerBoundServerReference(resolvedValue, metaData.id, metaData.bound); + parentObject[key] = resolvedValue; + "" === key && null === handler.value && (handler.value = resolvedValue); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((boundArgs = handler.value), key)) { + case "3": + boundArgs.props = resolvedValue; + } + handler.deps--; + 0 === handler.deps && + ((resolvedValue = handler.chunk), + null !== resolvedValue && + "blocked" === resolvedValue.status && + ((boundArgs = resolvedValue.value), + (resolvedValue.status = "fulfilled"), + (resolvedValue.value = handler.value), + null !== boundArgs && wakeChunk(boundArgs, handler.value))); + }, + function (error) { + if (!handler.errored) { + handler.errored = !0; + handler.value = null; + handler.reason = error; + var chunk = handler.chunk; + null !== chunk && + "blocked" === chunk.status && + triggerErrorOnChunk(response, chunk, error); + } + } + ); + return null; +} +function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + break; + case "resolved_module": + initializeModuleChunk(id); + } + switch (id.status) { + case "fulfilled": + id = id.value; + for (var i = 1; i < reference.length; i++) { + for ( + ; + "object" === typeof id && + null !== id && + id.$$typeof === REACT_LAZY_TYPE; + + ) { + id = id._payload; + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + break; + case "resolved_module": + initializeModuleChunk(id); + } + switch (id.status) { + case "fulfilled": + id = id.value; + break; + case "blocked": + case "pending": + return waitForReference( + id, + parentObject, + key, + response, + map, + reference.slice(i - 1) + ); + case "halted": + return ( + initializingHandler + ? ((response = initializingHandler), response.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = id.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: id.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + (typeof id === "object" && id !== null && Object.prototype.hasOwnProperty.call(id, reference[i]) ? id = id[reference[i]] : (id = undefined)); + } + for ( + ; + "object" === typeof id && + null !== id && + id.$$typeof === REACT_LAZY_TYPE; + + ) { + reference = id._payload; + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + id = reference.value; + continue; + } + break; + } + return map(response, id, parentObject, key); + case "pending": + case "blocked": + return waitForReference(id, parentObject, key, response, map, reference); + case "halted": + return ( + initializingHandler + ? ((response = initializingHandler), response.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = id.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: id.reason, + deps: 0, + errored: !0 + }), + null + ); + } +} +function createMap(response, model) { + return new Map(model); +} +function createSet(response, model) { + return new Set(model); +} +function createBlob(response, model) { + return new Blob(model.slice(1), { type: model[0] }); +} +function createFormData(response, model) { + response = new FormData(); + for (var i = 0; i < model.length; i++) + response.append(model[i][0], model[i][1]); + return response; +} +function extractIterator(response, model) { + return model[Symbol.iterator](); +} +function createModel(response, model) { + return model; +} +function parseModelString(response, parentObject, key, value) { + if ("$" === value[0]) { + if ("$" === value) + return ( + null !== initializingHandler && + "0" === key && + (initializingHandler = { + parent: initializingHandler, + chunk: null, + value: null, + reason: null, + deps: 0, + errored: !1 + }), + REACT_ELEMENT_TYPE + ); + switch (value[1]) { + case "$": + return value.slice(1); + case "L": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + createLazyChunkWrapper(response) + ); + case "@": + return ( + (parentObject = parseInt(value.slice(2), 16)), + getChunk(response, parentObject) + ); + case "S": + return Symbol.for(value.slice(2)); + case "F": + return ( + (value = value.slice(2)), + getOutlinedModel( + response, + value, + parentObject, + key, + loadServerReference + ) + ); + case "T": + parentObject = "$" + value.slice(2); + response = response._tempRefs; + if (null == response) + throw Error( + "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply." + ); + return response.get(parentObject); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createSet) + ); + case "B": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createBlob) + ); + case "K": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, createFormData) + ); + case "Z": + return resolveErrorProd(); + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, parentObject, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + default: + return ( + (value = value.slice(1)), + getOutlinedModel(response, value, parentObject, key, createModel) + ); + } + } + return value; +} +function missingCall() { + throw Error( + 'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.' + ); +} +function ResponseInstance( + bundlerConfig, + serverReferenceConfig, + moduleLoading, + callServer, + encodeFormAction, + nonce, + temporaryReferences +) { + var chunks = new Map(); + this._bundlerConfig = bundlerConfig; + this._serverReferenceConfig = serverReferenceConfig; + this._moduleLoading = moduleLoading; + this._callServer = void 0 !== callServer ? callServer : missingCall; + this._encodeFormAction = encodeFormAction; + this._nonce = nonce; + this._chunks = chunks; + this._stringDecoder = new TextDecoder(); + this._fromJSON = null; + this._closed = !1; + this._closedReason = null; + this._tempRefs = temporaryReferences; + this._fromJSON = createFromJSONCallback(this); +} +function resolveBuffer(response, id, buffer) { + response = response._chunks; + var chunk = response.get(id); + chunk && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : ((buffer = new ReactPromise("fulfilled", buffer, null)), + response.set(id, buffer)); +} +function resolveModule(response, id, model) { + var chunks = response._chunks, + chunk = chunks.get(id); + model = JSON.parse(model, response._fromJSON); + var clientReference = resolveClientReference(response._bundlerConfig, model); + if ((model = preloadModule(clientReference))) { + if (chunk) { + var blockedChunk = chunk; + blockedChunk.status = "blocked"; + } else + (blockedChunk = new ReactPromise("blocked", null, null)), + chunks.set(id, blockedChunk); + model.then( + function () { + return resolveModuleChunk(response, blockedChunk, clientReference); + }, + function (error) { + return triggerErrorOnChunk(response, blockedChunk, error); + } + ); + } else + chunk + ? resolveModuleChunk(response, chunk, clientReference) + : ((chunk = new ReactPromise("resolved_module", clientReference, null)), + chunks.set(id, chunk)); +} +function resolveStream(response, id, stream, controller) { + response = response._chunks; + var chunk = response.get(id); + chunk + ? "pending" === chunk.status && + ((id = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = stream), + (chunk.reason = controller), + null !== id && wakeChunk(id, chunk.value)) + : ((stream = new ReactPromise("fulfilled", stream, controller)), + response.set(id, stream)); +} +function startReadableStream(response, id, type) { + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, id, type, { + enqueueValue: function (value) { + null === previousBlockedChunk + ? controller.enqueue(value) + : previousBlockedChunk.then(function () { + controller.enqueue(value); + }); + }, + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new ReactPromise("resolved_model", json, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var chunk$54 = new ReactPromise("pending", null, null); + chunk$54.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = chunk$54; + chunk.then(function () { + previousBlockedChunk === chunk$54 && (previousBlockedChunk = null); + resolveModelChunk(response, chunk$54, json); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); +} +function asyncIterator() { + return this; +} +function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; +} +function startAsyncIterable(response, id, iterator) { + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = {}; + iterable[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new ReactPromise( + "fulfilled", + { done: !0, value: void 0 }, + null + ); + buffer[nextReadIndex] = new ReactPromise("pending", null, null); + } + return buffer[nextReadIndex++]; + }); + }; + resolveStream( + response, + id, + iterator ? iterable[ASYNC_ITERATOR]() : iterable, + { + enqueueValue: function (value) { + if (nextWriteIndex === buffer.length) + buffer[nextWriteIndex] = new ReactPromise( + "fulfilled", + { done: !1, value: value }, + null + ); + else { + var chunk = buffer[nextWriteIndex], + resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "fulfilled"; + chunk.value = { done: !1, value: value }; + null !== resolveListeners && + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners); + } + nextWriteIndex++; + }, + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !1 + ); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !0 + ); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + response, + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = new ReactPromise("pending", null, null)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(response, buffer[nextWriteIndex++], error); + } + } + ); +} +function resolveErrorProd() { + var error = Error( + "An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error." + ); + error.stack = "Error: " + error.message; + return error; +} +function mergeBuffer(buffer, lastChunk) { + for (var l = buffer.length, byteLength = lastChunk.length, i = 0; i < l; i++) + byteLength += buffer[i].byteLength; + byteLength = new Uint8Array(byteLength); + for (var i$55 = (i = 0); i$55 < l; i$55++) { + var chunk = buffer[i$55]; + byteLength.set(chunk, i); + i += chunk.byteLength; + } + byteLength.set(lastChunk, i); + return byteLength; +} +function resolveTypedArray( + response, + id, + buffer, + lastChunk, + constructor, + bytesPerElement +) { + buffer = + 0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement + ? lastChunk + : mergeBuffer(buffer, lastChunk); + constructor = new constructor( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength / bytesPerElement + ); + resolveBuffer(response, id, constructor); +} +function processFullBinaryRow(response, streamState, id, tag, buffer, chunk) { + switch (tag) { + case 65: + resolveBuffer(response, id, mergeBuffer(buffer, chunk).buffer); + return; + case 79: + resolveTypedArray(response, id, buffer, chunk, Int8Array, 1); + return; + case 111: + resolveBuffer( + response, + id, + 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk) + ); + return; + case 85: + resolveTypedArray(response, id, buffer, chunk, Uint8ClampedArray, 1); + return; + case 83: + resolveTypedArray(response, id, buffer, chunk, Int16Array, 2); + return; + case 115: + resolveTypedArray(response, id, buffer, chunk, Uint16Array, 2); + return; + case 76: + resolveTypedArray(response, id, buffer, chunk, Int32Array, 4); + return; + case 108: + resolveTypedArray(response, id, buffer, chunk, Uint32Array, 4); + return; + case 71: + resolveTypedArray(response, id, buffer, chunk, Float32Array, 4); + return; + case 103: + resolveTypedArray(response, id, buffer, chunk, Float64Array, 8); + return; + case 77: + resolveTypedArray(response, id, buffer, chunk, BigInt64Array, 8); + return; + case 109: + resolveTypedArray(response, id, buffer, chunk, BigUint64Array, 8); + return; + case 86: + resolveTypedArray(response, id, buffer, chunk, DataView, 1); + return; + } + streamState = response._stringDecoder; + for (var row = "", i = 0; i < buffer.length; i++) + row += streamState.decode(buffer[i], decoderOptions); + buffer = row += streamState.decode(chunk); + switch (tag) { + case 73: + resolveModule(response, id, buffer); + break; + case 72: + id = buffer[0]; + buffer = buffer.slice(1); + response = JSON.parse(buffer, response._fromJSON); + buffer = ReactDOMSharedInternals.d; + switch (id) { + case "D": + buffer.D(response); + break; + case "C": + "string" === typeof response + ? buffer.C(response) + : buffer.C(response[0], response[1]); + break; + case "L": + id = response[0]; + tag = response[1]; + 3 === response.length + ? buffer.L(id, tag, response[2]) + : buffer.L(id, tag); + break; + case "m": + "string" === typeof response + ? buffer.m(response) + : buffer.m(response[0], response[1]); + break; + case "X": + "string" === typeof response + ? buffer.X(response) + : buffer.X(response[0], response[1]); + break; + case "S": + "string" === typeof response + ? buffer.S(response) + : buffer.S( + response[0], + 0 === response[1] ? void 0 : response[1], + 3 === response.length ? response[2] : void 0 + ); + break; + case "M": + "string" === typeof response + ? buffer.M(response) + : buffer.M(response[0], response[1]); + } + break; + case 69: + tag = response._chunks; + chunk = tag.get(id); + buffer = JSON.parse(buffer); + streamState = resolveErrorProd(); + streamState.digest = buffer.digest; + chunk + ? triggerErrorOnChunk(response, chunk, streamState) + : ((response = new ReactPromise("rejected", null, streamState)), + tag.set(id, response)); + break; + case 84: + response = response._chunks; + (tag = response.get(id)) && "pending" !== tag.status + ? tag.reason.enqueueValue(buffer) + : ((buffer = new ReactPromise("fulfilled", buffer, null)), + response.set(id, buffer)); + break; + case 78: + case 68: + case 74: + case 87: + throw Error( + "Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client." + ); + case 82: + startReadableStream(response, id, void 0); + break; + case 114: + startReadableStream(response, id, "bytes"); + break; + case 88: + startAsyncIterable(response, id, !1); + break; + case 120: + startAsyncIterable(response, id, !0); + break; + case 67: + (id = response._chunks.get(id)) && + "fulfilled" === id.status && + id.reason.close("" === buffer ? '"$undefined"' : buffer); + break; + default: + (tag = response._chunks), + (chunk = tag.get(id)) + ? resolveModelChunk(response, chunk, buffer) + : ((response = new ReactPromise("resolved_model", buffer, response)), + tag.set(id, response)); + } +} +function createFromJSONCallback(response) { + return function (key, value) { + if ("string" === typeof value) + return parseModelString(response, this, key, value); + if ("object" === typeof value && null !== value) { + if (value[0] === REACT_ELEMENT_TYPE) { + if ( + ((key = { + $$typeof: REACT_ELEMENT_TYPE, + type: value[1], + key: value[2], + ref: null, + props: value[3] + }), + null !== initializingHandler) + ) + if ( + ((value = initializingHandler), + (initializingHandler = value.parent), + value.errored) + ) + (key = new ReactPromise("rejected", null, value.reason)), + (key = createLazyChunkWrapper(key)); + else if (0 < value.deps) { + var blockedChunk = new ReactPromise("blocked", null, null); + value.value = key; + value.chunk = blockedChunk; + key = createLazyChunkWrapper(blockedChunk); + } + } else key = value; + return key; + } + return value; + }; +} +function close(weakResponse) { + reportGlobalError(weakResponse, Error("Connection closed.")); +} +function createResponseFromOptions(options) { + return new ResponseInstance( + null, + null, + null, + options && options.callServer ? options.callServer : void 0, + void 0, + void 0, + options && options.temporaryReferences + ? options.temporaryReferences + : void 0 + ); +} +function startReadingFromStream(response, stream, onDone) { + function progress(_ref2) { + var value = _ref2.value; + if (_ref2.done) return onDone(); + var i = 0, + rowState = streamState._rowState; + _ref2 = streamState._rowID; + for ( + var rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = value.length; + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = value[i++]; + 58 === lastIdx + ? (rowState = 1) + : (_ref2 = + (_ref2 << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = value[i]; + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 35 === rowState || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = value[i++]; + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = value.indexOf(10, i); + break; + case 4: + (lastIdx = i + rowLength), lastIdx > value.length && (lastIdx = -1); + } + var offset = value.byteOffset + i; + if (-1 < lastIdx) + (rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)), + processFullBinaryRow( + response, + streamState, + _ref2, + rowTag, + buffer, + rowLength + ), + (i = lastIdx), + 3 === rowState && i++, + (rowLength = _ref2 = rowTag = rowState = 0), + (buffer.length = 0); + else { + value = new Uint8Array(value.buffer, offset, value.byteLength - i); + buffer.push(value); + rowLength -= value.byteLength; + break; + } + } + streamState._rowState = rowState; + streamState._rowID = _ref2; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response, e); + } + var streamState = { + _rowState: 0, + _rowID: 0, + _rowTag: 0, + _rowLength: 0, + _buffer: [] + }, + reader = stream.getReader(); + reader.read().then(progress).catch(error); +} +exports.createFromFetch = function (promiseForResponse, options) { + var response = createResponseFromOptions(options); + promiseForResponse.then( + function (r) { + startReadingFromStream(response, r.body, close.bind(null, response)); + }, + function (e) { + reportGlobalError(response, e); + } + ); + return getChunk(response, 0); +}; +exports.createFromReadableStream = function (stream, options) { + options = createResponseFromOptions(options); + startReadingFromStream(options, stream, close.bind(null, options)); + return getChunk(options, 0); +}; +exports.createServerReference = function (id, callServer) { + function action() { + var args = Array.prototype.slice.call(arguments); + return callServer(id, args); + } + registerBoundServerReference(action, id, null); + return action; +}; +exports.createTemporaryReferenceSet = function () { + return new Map(); +}; +exports.encodeReply = function (value, options) { + return new Promise(function (resolve, reject) { + var abort = processReply( + value, + "", + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + resolve, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(signal.reason); + else { + var listener = function () { + abort(signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + }); +}; +exports.registerServerReference = function (reference, id) { + registerBoundServerReference(reference, id, null); + return reference; +}; diff --git a/.socket/blob/14bd3d5c5fe8ac43de0d4123be346f4188bab22c183678040290f972aad60489 b/.socket/blob/14bd3d5c5fe8ac43de0d4123be346f4188bab22c183678040290f972aad60489 new file mode 100644 index 0000000..2310814 --- /dev/null +++ b/.socket/blob/14bd3d5c5fe8ac43de0d4123be346f4188bab22c183678040290f972aad60489 @@ -0,0 +1,3094 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-server.edge.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 strict"; +var ReactDOM = require("react-dom"), + React = require("react"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); +Symbol.for("react.postpone"); +var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; +} +var ASYNC_ITERATOR = Symbol.asyncIterator; +function handleErrorInNextTick(error) { + setTimeout(function () { + throw error; + }); +} +var LocalPromise = Promise, + scheduleMicrotask = + "function" === typeof queueMicrotask + ? queueMicrotask + : function (callback) { + LocalPromise.resolve(null) + .then(callback) + .catch(handleErrorInNextTick); + }, + currentView = null, + writtenBytes = 0; +function writeChunkAndReturn(destination, chunk) { + if (0 !== chunk.byteLength) + if (4096 < chunk.byteLength) + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + destination.enqueue(chunk); + else { + var allowableBytes = currentView.length - writtenBytes; + allowableBytes < chunk.byteLength && + (0 === allowableBytes + ? destination.enqueue(currentView) + : (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes), + destination.enqueue(currentView), + (chunk = chunk.subarray(allowableBytes))), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)); + currentView.set(chunk, writtenBytes); + writtenBytes += chunk.byteLength; + } + return !0; +} +var textEncoder = new TextEncoder(); +function stringToChunk(content) { + return textEncoder.encode(content); +} +function byteLengthOfChunk(chunk) { + return chunk.byteLength; +} +function closeWithError(destination, error) { + "function" === typeof destination.error + ? destination.error(error) + : destination.close(); +} +var CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"); +function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); +} +var FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice; +function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; +} +var PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }; +function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl({}, target.$$id, !0), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; +} +var proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; +ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: prefetchDNS, + C: preconnect, + L: preload, + m: preloadModule$1, + X: preinitScript, + S: preinitStyle, + M: preinitModuleScript +}; +function prefetchDNS(href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } +} +function preconnect(href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "C|" + (null == crossOrigin ? "null" : crossOrigin) + "|" + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } +} +function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } +} +function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } +} +function preinitStyle(href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } +} +function preinitScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } +} +function preinitModuleScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } +} +function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } +} +var supportsRequestStorage = "function" === typeof AsyncLocalStorage, + requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null, + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }; +function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; +} +function noop() {} +var SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." +); +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; +} +var currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null; +function getThenableStateAfterSuspending() { + var state = thenableState || []; + thenableState = null; + return state; +} +var HooksDispatcher = { + readContext: unsupportedContext, + use: use, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: useId, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } +}; +HooksDispatcher.useEffectEvent = unsupportedHook; +function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); +} +function unsupportedRefresh() { + throw Error("Refreshing the cache is not supported in Server Components."); +} +function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); +} +function useId() { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return "_" + currentRequest$1.identifierPrefix + "S_" + id.toString(32) + "_"; +} +function use(usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (usable.$$typeof === CLIENT_REFERENCE_TAG$1) { + if (null != usable.value && usable.value.$$typeof === REACT_CONTEXT_TYPE) + throw Error("Cannot read a Client Context from a Server Component."); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error("An unsupported type was passed to use(): " + String(usable)); +} +var DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var JSCompiler_inline_result = (JSCompiler_inline_result = + resolveRequest()) + ? JSCompiler_inline_result.cache + : new Map(); + var entry = JSCompiler_inline_result.get(resourceType); + void 0 === entry && + ((entry = resourceType()), + JSCompiler_inline_result.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }, + ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); +var isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf; +function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); +} +function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } +} +function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; +} +var CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); +function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + objKind = -1; + var length = 0; + if (isArrayImpl(objectOrArray)) { + var str = "["; + for (var i = 0; i < objectOrArray.length; i++) { + 0 < i && (str += ", "); + var value = objectOrArray[i]; + value = + "object" === typeof value && null !== value + ? describeObjectForErrorMessage(value) + : describeValueForErrorMessage(value); + "" + i === expandedName + ? ((objKind = str.length), (length = value.length), (str += value)) + : (str = + 10 > value.length && 40 > str.length + value.length + ? str + value + : str + "..."); + } + str += "]"; + } else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + str = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + str = "{"; + i = Object.keys(objectOrArray); + for (value = 0; value < i.length; value++) { + 0 < value && (str += ", "); + var name = i[value], + encodedKey = JSON.stringify(name); + str += ('"' + name + '"' === encodedKey ? name : encodedKey) + ": "; + encodedKey = objectOrArray[name]; + encodedKey = + "object" === typeof encodedKey && null !== encodedKey + ? describeObjectForErrorMessage(encodedKey) + : describeValueForErrorMessage(encodedKey); + name === expandedName + ? ((objKind = str.length), + (length = encodedKey.length), + (str += encodedKey)) + : (str = + 10 > encodedKey.length && 40 > str.length + encodedKey.length + ? str + encodedKey + : str + "..."); + } + str += "}"; + } + return void 0 === expandedName + ? str + : -1 < objKind && 0 < length + ? ((objectOrArray = " ".repeat(objKind) + "^".repeat(length)), + "\n " + str + "\n " + objectOrArray) + : "\n " + str; +} +var hasOwnProperty = Object.prototype.hasOwnProperty, + ObjectPrototype = Object.prototype, + stringify = JSON.stringify; +function defaultErrorHandler(error) { + console.error(error); +} +function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences +) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error("Currently React only supports one RSC renderer at a time."); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + var abortSet = new Set(), + pingedTasks = [], + hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = []; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = void 0 === onPostpone ? noop : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + type = createTask(this, model, null, !1, 0, abortSet); + pingedTasks.push(type); +} +var currentRequest = null; +function resolveRequest() { + if (currentRequest) return currentRequest; + if (supportsRequestStorage) { + var store = requestStorage.getStore(); + if (store) return store; + } + return null; +} +function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + switch (thenable.status) { + case "fulfilled": + return ( + (newTask.model = thenable.value), pingTask(request, newTask), newTask.id + ); + case "rejected": + return erroredTask(request, newTask, thenable.reason), newTask.id; + default: + if (12 === request.status) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + (erroredTask(request, newTask, reason), enqueueFlush(request)); + } + ); + return newTask.id; +} +function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(stringToChunk(entry)), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$8) { + error(x$8); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener("abort", abortStream), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); +} +function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModelWithFormatContext( + request, + entry.value, + 0 + ); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(stringToChunk(endStreamRow)); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + iterator.next().then(progress, error); + } catch (x$9) { + error(x$9); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + iterable = iterable === iterator; + var streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (iterable ? "x" : "X") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortIterable); + iterator.next().then(progress, error); + return serializeByValueID(streamTask.id); +} +function emitHint(request, code, model) { + model = stringify(model); + code = stringToChunk(":H" + code + model + "\n"); + request.completedHintChunks.push(code); + enqueueFlush(request); +} +function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; +} +function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return wakeable.value; + case "rejected": + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { $$typeof: REACT_LAZY_TYPE, _payload: wakeable, _init: readThenable }; +} +function voidHandler() {} +function processServerComponentReturnValue(request, task, Component, result) { + if ( + "object" !== typeof result || + null === result || + result.$$typeof === CLIENT_REFERENCE_TAG$1 + ) + return result; + if ("function" === typeof result.then) + return createLazyWrapperAroundWakeable(request, task, result); + var iteratorFn = getIteratorFn(result); + return iteratorFn + ? ((request = {}), + (request[Symbol.iterator] = function () { + return iteratorFn.call(result); + }), + request) + : "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((request = {}), + (request[ASYNC_ITERATOR] = function () { + return result[ASYNC_ITERATOR](); + }), + request); +} +function renderFunctionComponent(request, task, key, Component, props) { + var prevThenableState = task.thenableState; + task.thenableState = null; + thenableIndexCounter = 0; + thenableState = prevThenableState; + props = Component(props, void 0); + if (12 === request.status) + throw ( + ("object" === typeof props && + null !== props && + "function" === typeof props.then && + props.$$typeof !== CLIENT_REFERENCE_TAG$1 && + props.then(voidHandler, voidHandler), + null) + ); + props = processServerComponentReturnValue(request, task, Component, props); + Component = task.keyPath; + prevThenableState = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = prevThenableState; + return request; +} +function renderFragment(request, task, children) { + return null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children } + ]), + task.implicitSlot ? [request] : request) + : children; +} +var serializedSize = 0; +function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + pingTask(request, task); + return serializeLazyID(task.id); +} +function renderElement(request, task, type, key, ref, props) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + if ( + "function" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 && + type.$$typeof !== TEMPORARY_REFERENCE_TAG + ) + return renderFunctionComponent(request, task, key, type, props); + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + (type = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (props = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = type), + props + ); + if ( + null != type && + "object" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + var init = type._init; + type = init(type._payload); + if (12 === request.status) throw null; + return renderElement(request, task, type, key, ref, props); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent(request, task, key, type.render, props); + case REACT_MEMO_TYPE: + return renderElement(request, task, type.type, key, ref, props); + } + else + "string" === typeof type && + ((ref = task.formatContext), + (init = getChildFormatContext(ref, type, props)), + ref !== init && + null != props.children && + outlineModelWithFormatContext(request, props.children, init)); + request = key; + key = task.keyPath; + null === request + ? (request = key) + : null !== key && (request = key + "," + request); + props = [REACT_ELEMENT_TYPE, type, request, props]; + task = task.implicitSlot && null !== request ? [props] : props; + return task; +} +function pingTask(request, task) { + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : setTimeout(function () { + return performWork(request); + }, 0)); +} +function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet +) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + serializedSize += parentPropertyName.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + var JSCompiler_inline_result = renderModelDestructive( + request, + task, + this, + parentPropertyName, + value + ); + } catch (thrownValue) { + if ( + ((parentPropertyName = task.model), + (parentPropertyName = + "object" === typeof parentPropertyName && + null !== parentPropertyName && + (parentPropertyName.$$typeof === REACT_ELEMENT_TYPE || + parentPropertyName.$$typeof === REACT_LAZY_TYPE)), + 12 === request.status) + ) + (task.status = 3), + 21 === request.type + ? ((prevKeyPath = request.nextChunkId++), + (prevKeyPath = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)), + (JSCompiler_inline_result = prevKeyPath)) + : ((prevKeyPath = request.fatalError), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath))); + else if ( + ((value = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue), + "object" === typeof value && + null !== value && + "function" === typeof value.then) + ) { + JSCompiler_inline_result = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + var ping = JSCompiler_inline_result.ping; + value.then(ping, ping); + JSCompiler_inline_result.thenableState = + getThenableStateAfterSuspending(); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(JSCompiler_inline_result.id) + : serializeByValueID(JSCompiler_inline_result.id); + } else + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + request.pendingChunks++, + (prevKeyPath = request.nextChunkId++), + (prevImplicitSlot = logRecoverableError(request, value, task)), + emitErrorChunk(request, prevKeyPath, prevImplicitSlot), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)); + } + return JSCompiler_inline_result; + }, + thenableState: null + }; + abortSet.add(task); + return task; +} +function serializeByValueID(id) { + return "$" + id.toString(16); +} +function serializeLazyID(id) { + return "$L" + id.toString(16); +} +function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + id = id.toString(16) + ":" + request + "\n"; + return stringToChunk(id); +} +function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference +) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var config = request.bundlerConfig, + modulePath = clientReference.$$id; + existingId = ""; + var resolvedModuleData = config[modulePath]; + if (resolvedModuleData) existingId = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((existingId = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + var JSCompiler_inline_result = + !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, existingId, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, existingId]; + request.pendingChunks++; + var importId = request.nextChunkId++, + json = stringify(JSCompiler_inline_result), + row = importId.toString(16) + ":I" + json + "\n", + processedChunk = stringToChunk(row); + request.completedImportChunks.push(processedChunk); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName), + serializeByValueID(parent) + ); + } +} +function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks + ); + retryTask(request, value); + return value.id; +} +function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); +} +function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener("abort", abortBlob), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener("abort", abortBlob), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask(request, model, null, !1, 0, request.abortableTasks), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); +} +var modelRoot = !1; +function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value +) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var existingReference = writtenObjects.get(value); + if (void 0 !== existingReference) + if (modelRoot === value) modelRoot = null; + else return existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((parent = writtenObjects.get(parent)), + void 0 !== parent && + ((elementReference = parent + ":" + parentPropertyName), + writtenObjects.set(value, elementReference))); + } + if (3200 < serializedSize) return deferTask(request, task); + parentPropertyName = value.props; + parent = parentPropertyName.ref; + request = renderElement( + request, + task, + value.type, + value.key, + void 0 !== parent ? parent : null, + parentPropertyName + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (writtenObjects.has(request) || + writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (3200 < serializedSize) return deferTask(request, task); + task.thenableState = null; + parentPropertyName = value._init; + value = parentPropertyName(value._payload); + if (12 === request.status) throw null; + return renderModelDestructive(request, task, emptyRoot, "", value); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = request.writtenObjects; + writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return "$@" + serializeThenable(request, task, value).toString(16); + if (modelRoot === value) modelRoot = null; + else return writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== writtenObjects) + if (modelRoot === value) { + if (writtenObjects !== serializeByValueID(task.id)) + return writtenObjects; + modelRoot = null; + } else return writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((writtenObjects = elementReference.get(parent)), + void 0 !== writtenObjects) + ) { + existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + existingReference = "type"; + break; + case "2": + existingReference = "key"; + break; + case "3": + existingReference = "props"; + break; + case "4": + existingReference = "_owner"; + } + elementReference.set(value, writtenObjects + ":" + existingReference); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) + return ( + (value = Array.from(value)), + "$Q" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Set) + return ( + (value = Array.from(value)), + "$W" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Error) return "$Z"; + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (parentPropertyName = elementReference.call(value)), + parentPropertyName === value + ? ((value = Array.from(parentPropertyName)), + "$i" + + outlineModelWithFormatContext(request, value, 0).toString(16)) + : renderFragment(request, task, Array.from(parentPropertyName)) + ); + if ("function" === typeof ReadableStream && value instanceof ReadableStream) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return ( + null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: value } + ]), + (request = task.implicitSlot ? [request] : request)) + : ((parentPropertyName = elementReference.call(value)), + (request = serializeAsyncIterable( + request, + task, + value, + parentPropertyName + ))), + request + ); + if (value instanceof Date) return "$D" + value.toJSON(); + request = getPrototypeOf(value); + if ( + request !== ObjectPrototype && + (null === request || null !== getPrototypeOf(request)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + return value; + } + if ("string" === typeof value) { + serializedSize += value.length; + if ( + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ) + return "$D" + value; + if (1024 <= value.length && null !== byteLengthOfChunk) + return ( + request.pendingChunks++, + (task = request.nextChunkId++), + emitTextChunk(request, task, value, !1), + serializeByValueID(task) + ); + request = "$" === value[0] ? "$" + value : value; + return request; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) + return Number.isFinite(value) + ? 0 === value && -Infinity === 1 / value + ? "$-0" + : value + : Infinity === value + ? "$Infinity" + : -Infinity === value + ? "$-Infinity" + : "$NaN"; + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return ( + (task = request.writtenServerReferences), + (parentPropertyName = task.get(value)), + void 0 !== parentPropertyName + ? (request = "$F" + parentPropertyName.toString(16)) + : ((parentPropertyName = value.$$bound), + (parentPropertyName = + null === parentPropertyName + ? null + : Promise.resolve(parentPropertyName)), + (request = outlineModelWithFormatContext( + request, + { id: value.$$id, bound: parentPropertyName }, + 0 + )), + task.set(value, request), + (request = "$F" + request.toString(16))), + request + ); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), void 0 !== request) + ) + return "$T" + request; + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + parentPropertyName = request.nextChunkId++; + parent = encodeReferenceChunk( + request, + parentPropertyName, + "$S" + elementReference + ); + request.completedImportChunks.push(parent); + task.set(value, parentPropertyName); + return serializeByValueID(parentPropertyName); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); +} +function logRecoverableError(request, error) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onError = request.onError; + var errorDigest = supportsRequestStorage + ? requestStorage.run(void 0, onError, error) + : onError(error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; +} +function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + null !== request.destination + ? ((request.status = 14), closeWithError(request.destination, error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); +} +function emitErrorChunk(request, id, digest) { + digest = { digest: digest }; + id = id.toString(16) + ":E" + stringify(digest) + "\n"; + id = stringToChunk(id); + request.completedErrorChunks.push(id); +} +function emitModelChunk(request, id, json) { + id = id.toString(16) + ":" + json + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); +} +function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + typedArray = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + debug = typedArray.byteLength; + id = id.toString(16) + ":" + tag + debug.toString(16) + ","; + id = stringToChunk(id); + request.completedRegularChunks.push(id, typedArray); +} +function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + text = stringToChunk(text); + debug = text.byteLength; + id = id.toString(16) + ":T" + debug.toString(16) + ","; + id = stringToChunk(id); + request.completedRegularChunks.push(id, text); +} +function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? emitTextChunk(request, id, value, !1) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk(request, id, "m", value, !1) + : value instanceof DataView + ? emitTypedArrayChunk(request, id, "V", value, !1) + : ((value = stringify(value, task.toJSON)), + emitModelChunk(request, task.id, value)); +} +function erroredTask(request, task, error) { + task.status = 4; + error = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, error); + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); +} +var emptyRoot = {}; +function retryTask(request, task) { + if (0 === task.status) { + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set(resolvedModel, serializeByValueID(task.id)), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel); + emitModelChunk(request, task.id, json); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (12 === request.status) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + serializedSize = parentSerializedSize; + } + } +} +function tryStreamTask(request, task) { + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + serializedSize = parentSerializedSize; + } +} +function performWork(request) { + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } +} +function abortTask(task) { + 0 === task.status && (task.status = 3); +} +function finishAbortedTask(task, request, errorId) { + 3 === task.status && + ((errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); +} +function haltTask(task) { + 0 === task.status && (task.status = 3); +} +function finishHaltedTask(task, request) { + 3 === task.status && request.pendingChunks--; +} +function flushCompletedChunks(request) { + var destination = request.destination; + if (null !== destination) { + currentView = new Uint8Array(4096); + writtenBytes = 0; + try { + for ( + var importsChunks = request.completedImportChunks, i = 0; + i < importsChunks.length; + i++ + ) + request.pendingChunks--, + writeChunkAndReturn(destination, importsChunks[i]); + importsChunks.splice(0, i); + var hintChunks = request.completedHintChunks; + for (i = 0; i < hintChunks.length; i++) + writeChunkAndReturn(destination, hintChunks[i]); + hintChunks.splice(0, i); + var regularChunks = request.completedRegularChunks; + for (i = 0; i < regularChunks.length; i++) + request.pendingChunks--, + writeChunkAndReturn(destination, regularChunks[i]); + regularChunks.splice(0, i); + var errorChunks = request.completedErrorChunks; + for (i = 0; i < errorChunks.length; i++) + request.pendingChunks--, + writeChunkAndReturn(destination, errorChunks[i]); + errorChunks.splice(0, i); + } finally { + (request.flushScheduled = !1), + currentView && + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = null), + (writtenBytes = 0)); + } + } + 0 === request.pendingChunks && + (12 > request.status && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = 14), + request.destination.close(), + (request.destination = null))); +} +function startWork(request) { + request.flushScheduled = null !== request.destination; + supportsRequestStorage + ? scheduleMicrotask(function () { + requestStorage.run(request, performWork, request); + }) + : scheduleMicrotask(function () { + return performWork(request); + }); + setTimeout(function () { + 10 === request.status && (request.status = 11); + }, 0); +} +function enqueueFlush(request) { + !1 === request.flushScheduled && + 0 === request.pingedTasks.length && + null !== request.destination && + ((request.flushScheduled = !0), + setTimeout(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + }, 0)); +} +function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); +} +function startFlowing(request, destination) { + if (13 === request.status) + (request.status = 14), closeWithError(destination, request.fatalError); + else if (14 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} +function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = 12; + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + setTimeout(function () { + return finishHalt(request, abortableTasks); + }, 0); + else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + errorId = request.nextChunkId++; + request.fatalError = errorId; + request.pendingChunks++; + emitErrorChunk(request, errorId, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId); + }); + setTimeout(function () { + return finishAbort(request, abortableTasks, errorId); + }, 0); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$23) { + logRecoverableError(request, error$23, null), + fatalError(request, error$23); + } +} +function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; +} +function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; +} +var instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(); +function ignoreReject() {} +function preloadModule(metadata) { + for (var chunks = metadata[1], promises = [], i = 0; i < chunks.length; i++) { + var thenable = globalThis.__next_chunk_load__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; +} +function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); +} +function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; +} +Chunk.prototype = Object.create(Promise.prototype); +Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), this.reason.push(reject)); + break; + default: + reject(this.reason); + } +}; +function createPendingChunk(response) { + return new Chunk("pending", null, null, response); +} +function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); +} +function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } +} +function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } +} +function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1, + response + ); +} +function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1 + ); +} +function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key +) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; +} +function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString(response, parentObj, parentKey, value, reference); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel(response, value, i, value[i], parentObj)), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; +} +var initializingChunk = null, + initializingChunkBlockedModel = null; +function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } +} +function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); +} +function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; +} +function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path +) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && null === blocked.value && (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; +} +function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; +} +function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } +} +function createMap(response, model) { + return new Map(model); +} +function createSet(response, model) { + return new Set(model); +} +function extractIterator(response, model) { + return model[Symbol.iterator](); +} +function createModel(response, model) { + return model; +} +function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey +) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; +} +function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close("C" === chunks ? '"$undefined"' : chunks.slice(1)) + : controller.enqueueModel(chunks); +} +function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var chunk$26 = createPendingChunk(response); + chunk$26.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = chunk$26; + chunk.then(function () { + previousBlockedChunk === chunk$26 && (previousBlockedChunk = null); + resolveModelChunk(chunk$26, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; +} +function asyncIterator() { + return this; +} +function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; +} +function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + $jscomp$compprop2 = {}; + $jscomp$compprop2 = + (($jscomp$compprop2[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }), + $jscomp$compprop2); + iterator = iterator ? $jscomp$compprop2[ASYNC_ITERATOR]() : $jscomp$compprop2; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; +} +function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return (obj = parseInt(value.slice(2), 16)), getChunk(response, obj); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel(response, value, obj, key, createModel)), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if (void 0 === reference || void 0 === response._temporaryReferences) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray(response, value, Uint8ClampedArray, 1, obj, key); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray(response, value, BigUint64Array, 8, obj, key); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; +} +function createResponse(bundlerConfig, formFieldPrefix, temporaryReferences) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; +} +function close(response) { + reportGlobalError(response, Error("Connection closed.")); +} +function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); +} +function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; +} +exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); +}; +exports.createTemporaryReferenceSet = function () { + return new WeakMap(); +}; +exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference(serverManifest, value.id, value.bound))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); +}; +exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); +}; +exports.decodeReply = function (body, turbopackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + turbopackMap = getChunk(body, 0); + close(body); + return turbopackMap; +}; +exports.decodeReplyFromAsyncIterable = function ( + iterable, + turbopackMap, + options +) { + function progress(entry) { + if (entry.done) close(response); + else { + entry = entry.value; + var name = entry[0]; + entry = entry[1]; + if ("string" === typeof entry) { + response._formData.append(name, entry); + var prefix = response._prefix; + if (name.startsWith(prefix)) { + var chunks = response._chunks; + name = +name.slice(prefix.length); + (chunks = chunks.get(name)) && resolveModelChunk(chunks, entry, name); + } + } else response._formData.append(name, entry); + iterator.next().then(progress, error); + } + } + function error(reason) { + reportGlobalError(response, reason); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + var iterator = iterable[ASYNC_ITERATOR](), + response = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0 + ); + iterator.next().then(progress, error); + return getChunk(response, 0); +}; +exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + 21, + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; +exports.registerClientReference = function ( + proxyImplementation, + id, + exportName +) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); +}; +exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); +}; +exports.renderToReadableStream = function (model, turbopackMap, options) { + var request = new RequestInstance( + 20, + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + noop, + noop, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + return new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); +}; diff --git a/.socket/blob/22e851440b893a14abddd97141447e15209671122fd43f0cdc29b09125d74021 b/.socket/blob/22e851440b893a14abddd97141447e15209671122fd43f0cdc29b09125d74021 new file mode 100644 index 0000000..88289c2 --- /dev/null +++ b/.socket/blob/22e851440b893a14abddd97141447e15209671122fd43f0cdc29b09125d74021 @@ -0,0 +1,5561 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-server.edge.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function voidHandler() {} + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function _defineProperty(obj, key, value) { + a: if ("object" == typeof key && key) { + var e = key[Symbol.toPrimitive]; + if (void 0 !== e) { + key = e.call(key, "string"); + if ("object" != typeof key) break a; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + key = String(key); + } + key = "symbol" == typeof key ? key : key + ""; + key in obj + ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) + : (obj[key] = value); + return obj; + } + function handleErrorInNextTick(error) { + setTimeout(function () { + throw error; + }); + } + function writeChunkAndReturn(destination, chunk) { + if (0 !== chunk.byteLength) + if (4096 < chunk.byteLength) + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + destination.enqueue(chunk); + else { + var allowableBytes = currentView.length - writtenBytes; + allowableBytes < chunk.byteLength && + (0 === allowableBytes + ? destination.enqueue(currentView) + : (currentView.set( + chunk.subarray(0, allowableBytes), + writtenBytes + ), + destination.enqueue(currentView), + (chunk = chunk.subarray(allowableBytes))), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)); + currentView.set(chunk, writtenBytes); + writtenBytes += chunk.byteLength; + } + return !0; + } + function completeWriting(destination) { + currentView && + 0 < writtenBytes && + (destination.enqueue( + new Uint8Array(currentView.buffer, 0, writtenBytes) + ), + (currentView = null), + (writtenBytes = 0)); + } + function stringToChunk(content) { + return textEncoder.encode(content); + } + function byteLengthOfChunk(chunk) { + return chunk.byteLength; + } + function closeWithError(destination, error) { + "function" === typeof destination.error + ? destination.error(error) + : destination.close(); + } + function isClientReference(reference) { + return reference.$$typeof === CLIENT_REFERENCE_TAG$1; + } + function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); + } + function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + null != arguments[0] && + console.error( + 'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().' + ); + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + $$location: { value: this.$$location, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; + } + function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl( + {}, + target.$$id, + !0 + ), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; + } + function resolveClientReferenceMetadata(config, clientReference) { + var modulePath = clientReference.$$id, + name = "", + resolvedModuleData = config[modulePath]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((name = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + return !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } + } + function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } + } + function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; + } + function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } + } + function collectStackTracePrivate(error, structuredStackTrace) { + error = []; + for (var i = framesToSkip; i < structuredStackTrace.length; i++) { + var callSite = structuredStackTrace[i], + name = callSite.getFunctionName() || ""; + if (name.includes("react_stack_bottom_frame")) break; + else if (callSite.isNative()) + (callSite = callSite.isAsync()), + error.push([name, "", 0, 0, 0, 0, callSite]); + else { + if (callSite.isConstructor()) name = "new " + name; + else if (!callSite.isToplevel()) { + var callSite$jscomp$0 = callSite; + name = callSite$jscomp$0.getTypeName(); + var methodName = callSite$jscomp$0.getMethodName(); + callSite$jscomp$0 = callSite$jscomp$0.getFunctionName(); + var result = ""; + callSite$jscomp$0 + ? (name && + identifierRegExp.test(callSite$jscomp$0) && + callSite$jscomp$0 !== name && + (result += name + "."), + (result += callSite$jscomp$0), + !methodName || + callSite$jscomp$0 === methodName || + callSite$jscomp$0.endsWith("." + methodName) || + callSite$jscomp$0.endsWith(" " + methodName) || + (result += " [as " + methodName + "]")) + : (name && (result += name + "."), + (result = methodName + ? result + methodName + : result + "")); + name = result; + } + "" === name && (name = ""); + methodName = callSite.getScriptNameOrSourceURL() || ""; + "" === methodName && + ((methodName = ""), + callSite.isEval() && + (callSite$jscomp$0 = callSite.getEvalOrigin()) && + (methodName = callSite$jscomp$0.toString() + ", ")); + callSite$jscomp$0 = callSite.getLineNumber() || 0; + result = callSite.getColumnNumber() || 0; + var enclosingLine = + "function" === typeof callSite.getEnclosingLineNumber + ? callSite.getEnclosingLineNumber() || 0 + : 0, + enclosingCol = + "function" === typeof callSite.getEnclosingColumnNumber + ? callSite.getEnclosingColumnNumber() || 0 + : 0; + callSite = callSite.isAsync(); + error.push([ + name, + methodName, + callSite$jscomp$0, + result, + enclosingLine, + enclosingCol, + callSite + ]); + } + } + collectedStackTrace = error; + return ""; + } + function collectStackTrace(error, structuredStackTrace) { + collectStackTracePrivate(error, structuredStackTrace); + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function parseStackTrace(error, skipFrames) { + var existing = stackTraceCache.get(error); + if (void 0 !== existing) return existing; + collectedStackTrace = null; + framesToSkip = skipFrames; + existing = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTrace; + try { + var stack = String(error.stack); + } finally { + Error.prepareStackTrace = existing; + } + if (null !== collectedStackTrace) + return ( + (stack = collectedStackTrace), + (collectedStackTrace = null), + stackTraceCache.set(error, stack), + stack + ); + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + existing = stack.indexOf("react_stack_bottom_frame"); + -1 !== existing && (existing = stack.lastIndexOf("\n", existing)); + -1 !== existing && (stack = stack.slice(0, existing)); + stack = stack.split("\n"); + for (existing = []; skipFrames < stack.length; skipFrames++) { + var parsed = frameRegExp.exec(stack[skipFrames]); + if (parsed) { + var name = parsed[1] || "", + isAsync = "async " === parsed[8]; + "" === name + ? (name = "") + : name.startsWith("async ") && + ((name = name.slice(5)), (isAsync = !0)); + var filename = parsed[2] || parsed[5] || ""; + "" === filename && (filename = ""); + existing.push([ + name, + filename, + +(parsed[3] || parsed[6]), + +(parsed[4] || parsed[7]), + 0, + 0, + isAsync + ]); + } + } + stackTraceCache.set(error, existing); + return existing; + } + function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? (thenableState.push(thenable), + (thenableState._stacks || (thenableState._stacks = [])).push(Error())) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; + } + function getThenableStateAfterSuspending() { + var state = thenableState || []; + state._componentDebugInfo = currentComponentDebugInfo; + thenableState = currentComponentDebugInfo = null; + return state; + } + function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); + } + function unsupportedRefresh() { + throw Error( + "Refreshing the cache is not supported in Server Components." + ); + } + function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); + } + function resolveOwner() { + if (currentOwner) return currentOwner; + if (supportsComponentStorage) { + var owner = componentStorage.getStore(); + if (owner) return owner; + } + return null; + } + function prepareStackTrace(error, structuredStackTrace) { + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function resetOwnerStackLimit() { + var now = getCurrentTime(); + 1e3 < now - lastResetTime && + ((ReactSharedInternalsServer.recentlyCreatedOwnerStacks = 0), + (lastResetTime = now)); + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isGetter(object, name) { + if (object === Object.prototype || null === object) return !1; + var descriptor = Object.getOwnPropertyDescriptor(object, name); + return void 0 === descriptor + ? isGetter(getPrototypeOf(object), name) + : "function" === typeof descriptor.get; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function defaultFilterStackFrame(filename) { + return ( + "" !== filename && + !filename.startsWith("node:") && + !filename.includes("node_modules") + ); + } + function filterStackTrace(request, stack) { + request = request.filterStackFrame; + for (var filteredStack = [], i = 0; i < stack.length; i++) { + var callsite = stack[i], + functionName = callsite[0]; + var url = callsite[1]; + if (url.startsWith("about://React/")) { + var envIdx = url.indexOf("/", 14), + suffixIdx = url.lastIndexOf("?"); + -1 < envIdx && + -1 < suffixIdx && + (url = decodeURI(url.slice(envIdx + 1, suffixIdx))); + } + request(url, functionName, callsite[2], callsite[3]) && + ((callsite = callsite.slice(0)), + (callsite[1] = url), + filteredStack.push(callsite)); + } + return filteredStack; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + a: { + var error = Error("react-stack-top-frame"); + collectedStackTrace = null; + framesToSkip = 1; + var previousPrepare = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTracePrivate; + try { + if ("" !== error.stack) { + var JSCompiler_inline_result = null; + break a; + } + } finally { + Error.prepareStackTrace = previousPrepare; + } + JSCompiler_inline_result = collectedStackTrace; + } + JSCompiler_inline_result = filterStackTrace( + request, + JSCompiler_inline_result || [] + ); + request.pendingDebugChunks++; + error = resolveOwner(); + previousPrepare = Array.from(arguments); + a: { + var env = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + env = null; + break a; + case "assert": + env = 1; + } + var format = previousPrepare[env], + style = previousPrepare[env + 1], + badge = previousPrepare[env + 2]; + "string" === typeof format && + format.startsWith("\u001b[0m\u001b[7m%c%s\u001b[0m%c") && + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px" === + style && + "string" === typeof badge + ? ((format = format.slice(18)), + " " === format[0] && (format = format.slice(1)), + previousPrepare.splice(env, 4, format), + (env = badge.slice(1, badge.length - 1))) + : (env = null); + } + null === env && (env = (0, request.environmentName)()); + null != error && outlineComponentInfo(request, error); + badge = [methodName, JSCompiler_inline_result, error, env]; + badge.push.apply(badge, previousPrepare); + previousPrepare = serializeDebugModel( + request, + (null === request.deferredDebugObjects ? 500 : 10) + + JSCompiler_inline_result.length, + badge + ); + "[" !== previousPrepare[0] && + (previousPrepare = serializeDebugModel( + request, + 10 + JSCompiler_inline_result.length, + [ + methodName, + JSCompiler_inline_result, + error, + env, + "Unknown Value: React could not send it from the server." + ] + )); + JSCompiler_inline_result = stringToChunk( + ":W" + previousPrepare + "\n" + ); + request.completedDebugChunks.push(JSCompiler_inline_result); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } + function getCurrentStackInDEV() { + var owner = resolveOwner(); + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = prepareStackTrace; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function throwTaintViolation(message) { + throw Error(message); + } + function cleanupTaintQueue(request) { + request = request.taintCleanupQueue; + TaintRegistryPendingRequests.delete(request); + for (var i = 0; i < request.length; i++) { + var entryValue = request[i], + entry = TaintRegistryValues.get(entryValue); + void 0 !== entry && + (1 === entry.count + ? TaintRegistryValues.delete(entryValue) + : entry.count--); + } + request.length = 0; + } + function defaultErrorHandler(error) { + console.error(error); + } + function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error( + "Currently React only supports one RSC renderer at a time." + ); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + ReactSharedInternalsServer.getCurrentStack = getCurrentStackInDEV; + var abortSet = new Set(), + pingedTasks = [], + cleanupQueue = []; + TaintRegistryPendingRequests.add(cleanupQueue); + var hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = cleanupQueue; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = + void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + this.pendingDebugChunks = 0; + this.completedDebugChunks = []; + this.debugDestination = null; + this.environmentName = + void 0 === environmentName + ? function () { + return "Server"; + } + : "function" !== typeof environmentName + ? function () { + return environmentName; + } + : environmentName; + this.filterStackFrame = + void 0 === filterStackFrame + ? defaultFilterStackFrame + : filterStackFrame; + this.didWarnForKey = null; + this.writtenDebugObjects = new WeakMap(); + this.deferredDebugObjects = keepDebugAlive + ? { retained: new Map(), existing: new Map() } + : null; + type = this.timeOrigin = performance.now(); + emitTimeOriginChunk(this, type + performance.timeOrigin); + this.abortTime = -0; + model = createTask( + this, + model, + null, + !1, + 0, + abortSet, + type, + null, + null, + null + ); + pingedTasks.push(model); + } + function createRequest( + model, + bundlerConfig, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 20, + model, + bundlerConfig, + onError, + onPostpone, + noop, + noop, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function createPrerenderRequest( + model, + bundlerConfig, + onAllReady, + onFatalError, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 21, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function resolveRequest() { + if (currentRequest) return currentRequest; + if (supportsRequestStorage) { + var store = requestStorage.getStore(); + if (store) return store; + } + return null; + } + function serializeDebugThenable(request, counter, thenable) { + request.pendingDebugChunks++; + var id = request.nextChunkId++, + ref = "$@" + id.toString(16); + request.writtenDebugObjects.set(thenable, ref); + switch (thenable.status) { + case "fulfilled": + return ( + emitOutlinedDebugModelChunk(request, id, counter, thenable.value), + ref + ); + case "rejected": + return ( + emitErrorChunk(request, id, "", thenable.reason, !0, null), ref + ); + } + if (request.status === ABORTING) + return emitDebugHaltChunk(request, id), ref; + var deferredDebugObjects = request.deferredDebugObjects; + if (null !== deferredDebugObjects) + return ( + deferredDebugObjects.retained.set(id, thenable), + (ref = "$Y@" + id.toString(16)), + request.writtenDebugObjects.set(thenable, ref), + ref + ); + var cancelled = !1; + thenable.then( + function (value) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : (isArrayImpl(value) && 200 < value.length) || + ((value instanceof ArrayBuffer || + value instanceof Int8Array || + value instanceof Uint8Array || + value instanceof Uint8ClampedArray || + value instanceof Int16Array || + value instanceof Uint16Array || + value instanceof Int32Array || + value instanceof Uint32Array || + value instanceof Float32Array || + value instanceof Float64Array || + value instanceof BigInt64Array || + value instanceof BigUint64Array || + value instanceof DataView) && + 1e3 < value.byteLength) + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value), + enqueueFlush(request)); + }, + function (reason) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null), + enqueueFlush(request)); + } + ); + Promise.resolve().then(function () { + cancelled || + ((cancelled = !0), + emitDebugHaltChunk(request, id), + enqueueFlush(request), + (counter = request = null)); + }); + return ref; + } + function emitRequestedDebugThenable(request, id, counter, thenable) { + thenable.then( + function (value) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value); + enqueueFlush(request); + }, + function (reason) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + } + ); + } + function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + switch (thenable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + (newTask.model = thenable.value), + pingTask(request, newTask), + newTask.id + ); + case "rejected": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + erroredTask(request, newTask, thenable.reason), + newTask.id + ); + default: + if (request.status === ABORTING) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + forwardDebugInfoFromCurrentContext(request, newTask, thenable); + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + ((newTask.timed = !0), + erroredTask(request, newTask, reason), + enqueueFlush(request)); + } + ); + return newTask.id; + } + function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(stringToChunk(entry)), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$0) { + error(x$0); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + request.pendingChunks++; + task = + streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(stringToChunk(task)); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); + } + function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModel(request, entry.value); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(stringToChunk(endStreamRow)); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + callIteratorInDEV(iterator, progress, error); + } catch (x$1) { + error(x$1); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + var isIterator = iterable === iterator, + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + (task = iterable._debugInfo) && + forwardDebugInfo(request, streamTask, task); + request.pendingChunks++; + isIterator = + streamTask.id.toString(16) + ":" + (isIterator ? "x" : "X") + "\n"; + request.completedRegularChunks.push(stringToChunk(isIterator)); + request.cacheController.signal.addEventListener("abort", abortIterable); + callIteratorInDEV(iterator, progress, error); + return serializeByValueID(streamTask.id); + } + function emitHint(request, code, model) { + model = stringify(model); + code = stringToChunk(":H" + code + model + "\n"); + request.completedHintChunks.push(code); + enqueueFlush(request); + } + function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; + } + function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable(request, task, wakeable, null, null), + wakeable.value + ); + case "rejected": + forwardDebugInfoFromThenable(request, task, wakeable, null, null); + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { + $$typeof: REACT_LAZY_TYPE, + _payload: wakeable, + _init: readThenable + }; + } + function callWithDebugContextInDEV(request, task, callback, arg) { + var componentDebugInfo = { + name: "", + env: task.environmentName, + key: null, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.debugStack = task.debugStack; + request = componentDebugInfo.debugTask = task.debugTask; + currentOwner = componentDebugInfo; + try { + return request ? request.run(callback.bind(null, arg)) : callback(arg); + } finally { + currentOwner = null; + } + } + function processServerComponentReturnValue( + request, + task, + Component, + result + ) { + if ( + "object" !== typeof result || + null === result || + isClientReference(result) + ) + return result; + if ("function" === typeof result.then) + return ( + result.then(function (resolvedValue) { + "object" === typeof resolvedValue && + null !== resolvedValue && + resolvedValue.$$typeof === REACT_ELEMENT_TYPE && + (resolvedValue._store.validated = 1); + }, voidHandler), + createLazyWrapperAroundWakeable(request, task, result) + ); + result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1); + var iteratorFn = getIteratorFn(result); + if (iteratorFn) { + var multiShot = _defineProperty({}, Symbol.iterator, function () { + var iterator = iteratorFn.call(result); + iterator !== result || + ("[object GeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object Generator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + }); + multiShot._debugInfo = result._debugInfo; + return multiShot; + } + return "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((multiShot = _defineProperty({}, ASYNC_ITERATOR, function () { + var iterator = result[ASYNC_ITERATOR](); + iterator !== result || + ("[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object AsyncGenerator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + })), + (multiShot._debugInfo = result._debugInfo), + multiShot); + } + function renderFunctionComponent( + request, + task, + key, + Component, + props, + validated + ) { + var prevThenableState = task.thenableState; + task.thenableState = null; + if (canEmitDebugInfo) + if (null !== prevThenableState) + var componentDebugInfo = prevThenableState._componentDebugInfo; + else { + var componentDebugID = task.id; + componentDebugInfo = Component.displayName || Component.name || ""; + var componentEnv = (0, request.environmentName)(); + request.pendingChunks++; + componentDebugInfo = { + name: componentDebugInfo, + env: componentEnv, + key: key, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.props = props; + componentDebugInfo.debugStack = task.debugStack; + componentDebugInfo.debugTask = task.debugTask; + outlineComponentInfo(request, componentDebugInfo); + var timestamp = performance.now(); + timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : task.timed || emitTimingChunk(request, task.id, task.time); + task.timed = !0; + emitDebugChunk(request, componentDebugID, componentDebugInfo); + task.environmentName = componentEnv; + 2 === validated && + warnForMissingKey(request, key, componentDebugInfo, task.debugTask); + } + else return outlineTask(request, task); + thenableIndexCounter = 0; + thenableState = prevThenableState; + currentComponentDebugInfo = componentDebugInfo; + props = supportsComponentStorage + ? task.debugTask + ? task.debugTask.run( + componentStorage.run.bind( + componentStorage, + componentDebugInfo, + callComponentInDEV, + Component, + props, + componentDebugInfo + ) + ) + : componentStorage.run( + componentDebugInfo, + callComponentInDEV, + Component, + props, + componentDebugInfo + ) + : task.debugTask + ? task.debugTask.run( + callComponentInDEV.bind( + null, + Component, + props, + componentDebugInfo + ) + ) + : callComponentInDEV(Component, props, componentDebugInfo); + if (request.status === ABORTING) + throw ( + ("object" !== typeof props || + null === props || + "function" !== typeof props.then || + isClientReference(props) || + props.then(voidHandler, voidHandler), + null) + ); + validated = thenableState; + if (null !== validated) + for ( + prevThenableState = validated._stacks || (validated._stacks = []), + componentDebugID = 0; + componentDebugID < validated.length; + componentDebugID++ + ) + forwardDebugInfoFromThenable( + request, + task, + validated[componentDebugID], + componentDebugInfo, + prevThenableState[componentDebugID] + ); + props = processServerComponentReturnValue( + request, + task, + Component, + props + ); + task.debugOwner = componentDebugInfo; + task.debugStack = null; + task.debugTask = null; + Component = task.keyPath; + componentDebugInfo = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = componentDebugInfo; + return request; + } + function warnForMissingKey(request, key, componentDebugInfo, debugTask) { + function logKeyError() { + console.error( + 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', + "", + "" + ); + } + key = request.didWarnForKey; + null == key && (key = request.didWarnForKey = new WeakSet()); + request = componentDebugInfo.owner; + if (null != request) { + if (key.has(request)) return; + key.add(request); + } + supportsComponentStorage + ? debugTask + ? debugTask.run( + componentStorage.run.bind( + componentStorage, + componentDebugInfo, + callComponentInDEV, + logKeyError, + null, + componentDebugInfo + ) + ) + : componentStorage.run( + componentDebugInfo, + callComponentInDEV, + logKeyError, + null, + componentDebugInfo + ) + : debugTask + ? debugTask.run( + callComponentInDEV.bind( + null, + logKeyError, + null, + componentDebugInfo + ) + ) + : callComponentInDEV(logKeyError, null, componentDebugInfo); + } + function renderFragment(request, task, children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + null === child || + "object" !== typeof child || + child.$$typeof !== REACT_ELEMENT_TYPE || + null !== child.key || + child._store.validated || + (child._store.validated = 2); + } + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + if ((i = children._debugInfo)) { + if (canEmitDebugInfo) forwardDebugInfo(request, task, i); + else return outlineTask(request, task); + children = Array.from(children); + } + return children; + } + function renderAsyncFragment(request, task, children, getAsyncIterator) { + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + getAsyncIterator = getAsyncIterator.call(children); + return serializeAsyncIterable(request, task, children, getAsyncIterator); + } + function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + pingTask(request, task); + return serializeLazyID(task.id); + } + function outlineTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + retryTask(request, task); + return 1 === task.status + ? serializeByValueID(task.id) + : serializeLazyID(task.id); + } + function renderElement(request, task, type, key, ref, props, validated) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + jsxPropsParents.set(props, type); + "object" === typeof props.children && + null !== props.children && + jsxChildrenParents.set(props.children, type); + if ( + "function" !== typeof type || + isClientReference(type) || + type.$$typeof === TEMPORARY_REFERENCE_TAG + ) { + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + 2 === validated && + ((validated = { + name: "Fragment", + env: (0, request.environmentName)(), + key: key, + owner: task.debugOwner, + stack: + null === task.debugStack + ? null + : filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ), + props: props, + debugStack: task.debugStack, + debugTask: task.debugTask + }), + warnForMissingKey(request, key, validated, task.debugTask)), + (validated = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (request = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = validated), + request + ); + if ( + null != type && + "object" === typeof type && + !isClientReference(type) + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + type = callLazyInitInDEV(type); + if (request.status === ABORTING) throw null; + return renderElement( + request, + task, + type, + key, + ref, + props, + validated + ); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent( + request, + task, + key, + type.render, + props, + validated + ); + case REACT_MEMO_TYPE: + return renderElement( + request, + task, + type.type, + key, + ref, + props, + validated + ); + case REACT_ELEMENT_TYPE: + type._store.validated = 1; + } + else if ("string" === typeof type) { + ref = task.formatContext; + var newFormatContext = getChildFormatContext(ref, type, props); + ref !== newFormatContext && + null != props.children && + outlineModelWithFormatContext( + request, + props.children, + newFormatContext + ); + } + } else + return renderFunctionComponent( + request, + task, + key, + type, + props, + validated + ); + ref = task.keyPath; + null === key ? (key = ref) : null !== ref && (key = ref + "," + key); + newFormatContext = null; + ref = task.debugOwner; + null !== ref && outlineComponentInfo(request, ref); + if (null !== task.debugStack) { + newFormatContext = filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ); + var id = outlineDebugModel( + request, + { objectLimit: 2 * newFormatContext.length + 1 }, + newFormatContext + ); + request.writtenObjects.set(newFormatContext, serializeByValueID(id)); + } + request = [ + REACT_ELEMENT_TYPE, + type, + key, + props, + ref, + newFormatContext, + validated + ]; + task = task.implicitSlot && null !== key ? [request] : request; + return task; + } + function pingTask(request, task) { + task.timed = !0; + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : setTimeout(function () { + return performWork(request); + }, 0)); + } + function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet, + lastTimestamp, + debugOwner, + debugStack, + debugTask + ) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + var parent = this, + originalValue = parent[parentPropertyName]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + callWithDebugContextInDEV(request, task, function () { + "Object" !== objectName(originalValue) + ? "string" === typeof jsxChildrenParents.get(parent) + ? console.error( + "%s objects cannot be rendered as text children. Try formatting it using toString().%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + return renderModel(request, task, parent, parentPropertyName, value); + }, + thenableState: null, + timed: !1 + }; + task.time = lastTimestamp; + task.environmentName = request.environmentName(); + task.debugOwner = debugOwner; + task.debugStack = debugStack; + task.debugTask = debugTask; + abortSet.add(task); + return task; + } + function serializeByValueID(id) { + return "$" + id.toString(16); + } + function serializeLazyID(id) { + return "$L" + id.toString(16); + } + function serializeDeferredObject(request, value) { + var deferredDebugObjects = request.deferredDebugObjects; + return null !== deferredDebugObjects + ? (request.pendingDebugChunks++, + (request = request.nextChunkId++), + deferredDebugObjects.existing.set(value, request), + deferredDebugObjects.retained.set(request, value), + "$Y" + request.toString(16)) + : "$Y"; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function serializeRowHeader(tag, id) { + return id.toString(16) + ":" + tag; + } + function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + id = id.toString(16) + ":" + request + "\n"; + return stringToChunk(id); + } + function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !1); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !1, null), + serializeByValueID(parent) + ); + } + } + function serializeDebugClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var existingId = request.writtenClientReferences.get( + clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id + ); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingDebugChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !0); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingDebugChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !0, null), + serializeByValueID(parent) + ); + } + } + function outlineModel(request, value) { + return outlineModelWithFormatContext(request, value, 0); + } + function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks, + performance.now(), + null, + null, + null + ); + retryTask(request, value); + return value.id; + } + function serializeServerReference(request, serverReference) { + var writtenServerReferences = request.writtenServerReferences, + existingId = writtenServerReferences.get(serverReference); + if (void 0 !== existingId) return "$F" + existingId.toString(16); + existingId = serverReference.$$bound; + existingId = null === existingId ? null : Promise.resolve(existingId); + var id = serverReference.$$id, + location = null, + error = serverReference.$$location; + error && + ((error = parseStackTrace(error, 1)), + 0 < error.length && + ((location = error[0]), + (location = [location[0], location[1], location[2], location[3]]))); + existingId = + null !== location + ? { + id: id, + bound: existingId, + name: + "function" === typeof serverReference + ? serverReference.name + : "", + env: (0, request.environmentName)(), + location: location + } + : { id: id, bound: existingId }; + request = outlineModel(request, existingId); + writtenServerReferences.set(serverReference, request); + return "$F" + request.toString(16); + } + function serializeLargeTextString(request, text) { + request.pendingChunks++; + var textId = request.nextChunkId++; + emitTextChunk(request, textId, text, !1); + return serializeByValueID(textId); + } + function serializeMap(request, map) { + map = Array.from(map); + return "$Q" + outlineModel(request, map).toString(16); + } + function serializeFormData(request, formData) { + formData = Array.from(formData.entries()); + return "$K" + outlineModel(request, formData).toString(16); + } + function serializeSet(request, set) { + set = Array.from(set); + return "$W" + outlineModel(request, set).toString(16); + } + function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); + } + function serializeDebugTypedArray(request, tag, typedArray) { + if (1e3 < typedArray.byteLength && !doNotLimit.has(typedArray)) + return serializeDeferredObject(request, typedArray); + request.pendingDebugChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !0); + return serializeByValueID(bufferId); + } + function serializeDebugBlob(request, blob) { + function progress(entry) { + if (entry.done) + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: model.length + 2 }, + model + ), + enqueueFlush(request); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + reader.cancel(reason).then(noop, noop); + } + var model = [blob.type], + reader = blob.stream().getReader(); + request.pendingDebugChunks++; + var id = request.nextChunkId++; + reader.read().then(progress).catch(error); + return "$B" + id.toString(16); + } + function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask( + request, + model, + null, + !1, + 0, + request.abortableTasks, + performance.now(), + null, + null, + null + ), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); + } + function renderModel(request, task, parent, key, value) { + serializedSize += key.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + return renderModelDestructive(request, task, parent, key, value); + } catch (thrownValue) { + parent = task.model; + parent = + "object" === typeof parent && + null !== parent && + (parent.$$typeof === REACT_ELEMENT_TYPE || + parent.$$typeof === REACT_LAZY_TYPE); + if (request.status === ABORTING) { + task.status = 3; + if (21 === request.type) + return ( + (task = request.nextChunkId++), + (task = parent + ? serializeLazyID(task) + : serializeByValueID(task)), + task + ); + task = request.fatalError; + return parent ? serializeLazyID(task) : serializeByValueID(task); + } + key = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof key && + null !== key && + "function" === typeof key.then + ) + return ( + (request = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + )), + (value = request.ping), + key.then(value, value), + (request.thenableState = getThenableStateAfterSuspending()), + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + parent + ? serializeLazyID(request.id) + : serializeByValueID(request.id) + ); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + request.pendingChunks++; + prevKeyPath = request.nextChunkId++; + "object" === typeof key && + null !== key && + key.$$typeof === REACT_POSTPONE_TYPE + ? (logPostpone(request, key.message, task), + emitPostponeChunk(request, prevKeyPath, key)) + : ((prevImplicitSlot = logRecoverableError(request, key, task)), + emitErrorChunk( + request, + prevKeyPath, + prevImplicitSlot, + key, + !1, + task.debugOwner + )); + return parent + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath); + } + } + function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value + ) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + _writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var _existingReference = _writtenObjects.get(value); + if (void 0 !== _existingReference) + if (modelRoot === value) modelRoot = null; + else return _existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((_existingReference = _writtenObjects.get(parent)), + void 0 !== _existingReference && + ((elementReference = + _existingReference + ":" + parentPropertyName), + _writtenObjects.set(value, elementReference))); + } + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + if ((_existingReference = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _existingReference); + else return outlineTask(request, task); + _existingReference = value.props; + var refProp = _existingReference.ref; + refProp = void 0 !== refProp ? refProp : null; + task.debugOwner = value._owner; + task.debugStack = value._debugStack; + task.debugTask = value._debugTask; + if ( + void 0 === value._owner || + void 0 === value._debugStack || + void 0 === value._debugTask + ) { + var key = ""; + null !== value.key && (key = ' key="' + value.key + '"'); + console.error( + "Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\n- The element is created with a production version of React but rendered in development.\n- The element was cloned with a custom function instead of `React.cloneElement`.\nThe props of this element may help locate this element: %o", + value.type, + key, + value.props + ); + } + request = renderElement( + request, + task, + value.type, + value.key, + refProp, + _existingReference, + value._store.validated + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (_writtenObjects.has(request) || + _writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + task.thenableState = null; + elementReference = callLazyInitInDEV(value); + if (request.status === ABORTING) throw null; + if ((_writtenObjects = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _writtenObjects); + else return outlineTask(request, task); + return renderModelDestructive( + request, + task, + emptyRoot, + "", + elementReference + ); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = TaintRegistryObjects.get(value); + void 0 !== elementReference && throwTaintViolation(elementReference); + elementReference = request.writtenObjects; + _writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== _writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return ( + "$@" + serializeThenable(request, task, value).toString(16) + ); + if (modelRoot === value) modelRoot = null; + else return _writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== _writtenObjects) + if (modelRoot === value) { + if (_writtenObjects !== serializeByValueID(task.id)) + return _writtenObjects; + modelRoot = null; + } else return _writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((_writtenObjects = elementReference.get(parent)), + void 0 !== _writtenObjects) + ) { + _existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + _existingReference = "type"; + break; + case "2": + _existingReference = "key"; + break; + case "3": + _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; + } + elementReference.set( + value, + _writtenObjects + ":" + _existingReference + ); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) return serializeMap(request, value); + if (value instanceof Set) return serializeSet(request, value); + if ("function" === typeof FormData && value instanceof FormData) + return serializeFormData(request, value); + if (value instanceof Error) return serializeErrorValue(request, value); + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (elementReference = elementReference.call(value)), + elementReference === value + ? "$i" + + outlineModel(request, Array.from(elementReference)).toString(16) + : renderFragment(request, task, Array.from(elementReference)) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return renderAsyncFragment(request, task, value, elementReference); + if (value instanceof Date) return "$D" + value.toJSON(); + elementReference = getPrototypeOf(value); + if ( + elementReference !== ObjectPrototype && + (null === elementReference || + null !== getPrototypeOf(elementReference)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + if ("Object" !== objectName(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (!isSimpleObject(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(value); + 0 < symbols.length && + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like %s are not supported.%s", + symbols[0].description, + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + } + return value; + } + if ("string" === typeof value) + return ( + (task = TaintRegistryValues.get(value)), + void 0 !== task && throwTaintViolation(task.message), + (serializedSize += value.length), + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ? "$D" + value + : 1024 <= value.length && null !== byteLengthOfChunk + ? serializeLargeTextString(request, value) + : "$" === value[0] + ? "$" + value + : value + ); + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return serializeServerReference(request, value); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), + void 0 !== request) + ) + return "$T" + request; + request = TaintRegistryObjects.get(value); + void 0 !== request && throwTaintViolation(request); + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + if ( + jsxChildrenParents.has(parent) || + (jsxPropsParents.has(parent) && "children" === parentPropertyName) + ) + throw ( + ((request = value.displayName || value.name || "Component"), + Error( + "Functions are not valid as a child of Client Components. This may happen if you return " + + request + + " instead of <" + + request + + " /> from render. Or maybe you meant to call this function rather than return it." + + describeObjectForErrorMessage(parent, parentPropertyName) + )) + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + _writtenObjects = request.nextChunkId++; + emitSymbolChunk(request, _writtenObjects, elementReference); + task.set(value, _writtenObjects); + return serializeByValueID(_writtenObjects); + } + if ("bigint" === typeof value) + return ( + (request = TaintRegistryValues.get(value)), + void 0 !== request && throwTaintViolation(request.message), + "$n" + value.toString(10) + ); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + function logPostpone(request, reason, task) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onPostpone = request.onPostpone; + null !== task + ? supportsRequestStorage + ? requestStorage.run( + void 0, + callWithDebugContextInDEV, + request, + task, + onPostpone, + reason + ) + : callWithDebugContextInDEV(request, task, onPostpone, reason) + : supportsRequestStorage + ? requestStorage.run(void 0, onPostpone, reason) + : onPostpone(reason); + } finally { + currentRequest = prevRequest; + } + } + function logRecoverableError(request, error, task) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onError = request.onError; + var errorDigest = + null !== task + ? supportsRequestStorage + ? requestStorage.run( + void 0, + callWithDebugContextInDEV, + request, + task, + onError, + error + ) + : callWithDebugContextInDEV(request, task, onError, error) + : supportsRequestStorage + ? requestStorage.run(void 0, onError, error) + : onError(error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; + } + function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + cleanupTaintQueue(request); + null !== request.destination + ? ((request.status = CLOSED), + closeWithError(request.destination, error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); + } + function emitPostponeChunk(request, id, postponeInstance) { + var reason = "", + env = request.environmentName(); + try { + reason = String(postponeInstance.message); + var stack = filterStackTrace( + request, + parseStackTrace(postponeInstance, 0) + ); + } catch (x) { + stack = []; + } + id = + serializeRowHeader("P", id) + + stringify({ reason: reason, stack: stack, env: env }) + + "\n"; + id = stringToChunk(id); + request.completedErrorChunks.push(id); + } + function serializeErrorValue(request, error) { + var name = "Error", + env = (0, request.environmentName)(); + try { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + return ( + "$Z" + + outlineModel(request, { + name: name, + message: message, + stack: stack, + env: env + }).toString(16) + ); + } + function emitErrorChunk(request, id, digest, error, debug, owner) { + var name = "Error", + env = (0, request.environmentName)(); + try { + if (error instanceof Error) { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } else + (message = + "object" === typeof error && null !== error + ? describeObjectForErrorMessage(error) + : String(error)), + (stack = []); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + error = null == owner ? null : outlineComponentInfo(request, owner); + digest = { + digest: digest, + name: name, + message: message, + stack: stack, + env: env, + owner: error + }; + id = serializeRowHeader("E", id) + stringify(digest) + "\n"; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id) + : request.completedErrorChunks.push(id); + } + function emitImportChunk(request, id, clientReferenceMetadata, debug) { + clientReferenceMetadata = stringify(clientReferenceMetadata); + id = serializeRowHeader("I", id) + clientReferenceMetadata + "\n"; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id) + : request.completedImportChunks.push(id); + } + function emitSymbolChunk(request, id, name) { + id = encodeReferenceChunk(request, id, "$S" + name); + request.completedImportChunks.push(id); + } + function emitModelChunk(request, id, json) { + id = id.toString(16) + ":" + json + "\n"; + id = stringToChunk(id); + request.completedRegularChunks.push(id); + } + function emitDebugHaltChunk(request, id) { + id = id.toString(16) + ":\n"; + id = stringToChunk(id); + request.completedDebugChunks.push(id); + } + function emitDebugChunk(request, id, debugInfo) { + var json = serializeDebugModel(request, 500, debugInfo); + null !== request.debugDestination + ? '"' === json[0] && "$" === json[1] + ? ((id = serializeRowHeader("D", id) + json + "\n"), + request.completedRegularChunks.push(stringToChunk(id))) + : ((debugInfo = request.nextChunkId++), + (json = debugInfo.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(stringToChunk(json)), + (id = + serializeRowHeader("D", id) + + '"$' + + debugInfo.toString(16) + + '"\n'), + request.completedRegularChunks.push(stringToChunk(id))) + : ((id = serializeRowHeader("D", id) + json + "\n"), + request.completedRegularChunks.push(stringToChunk(id))); + } + function outlineComponentInfo(request, componentInfo) { + var existingRef = request.writtenDebugObjects.get(componentInfo); + if (void 0 !== existingRef) return existingRef; + null != componentInfo.owner && + outlineComponentInfo(request, componentInfo.owner); + existingRef = 10; + null != componentInfo.stack && + (existingRef += componentInfo.stack.length); + existingRef = { objectLimit: existingRef }; + var componentDebugInfo = { + name: componentInfo.name, + key: componentInfo.key + }; + null != componentInfo.env && (componentDebugInfo.env = componentInfo.env); + null != componentInfo.owner && + (componentDebugInfo.owner = componentInfo.owner); + null == componentInfo.stack && null != componentInfo.debugStack + ? (componentDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(componentInfo.debugStack, 1) + )) + : null != componentInfo.stack && + (componentDebugInfo.stack = componentInfo.stack); + componentDebugInfo.props = componentInfo.props; + existingRef = outlineDebugModel(request, existingRef, componentDebugInfo); + existingRef = serializeByValueID(existingRef); + request.writtenDebugObjects.set(componentInfo, existingRef); + request.writtenObjects.set(componentInfo, existingRef); + return existingRef; + } + function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + if (TaintRegistryByteLengths.has(typedArray.byteLength)) { + var tainted = TaintRegistryValues.get( + String.fromCharCode.apply( + String, + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ) + ); + void 0 !== tainted && throwTaintViolation(tainted.message); + } + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + typedArray = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + tainted = typedArray.byteLength; + id = id.toString(16) + ":" + tag + tainted.toString(16) + ","; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id, typedArray) + : request.completedRegularChunks.push(id, typedArray); + } + function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + text = stringToChunk(text); + var binaryLength = text.byteLength; + id = id.toString(16) + ":T" + binaryLength.toString(16) + ","; + id = stringToChunk(id); + debug + ? request.completedDebugChunks.push(id, text) + : request.completedRegularChunks.push(id, text); + } + function renderDebugModel( + request, + counter, + parent, + parentPropertyName, + value + ) { + if (null === value) return null; + if (value === REACT_ELEMENT_TYPE) return "$"; + if ("object" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === CONSTRUCTOR_MARKER) { + value = value.constructor; + var ref = request.writtenDebugObjects.get(value); + void 0 === ref && + ((request = outlineDebugModel(request, counter, value)), + (ref = serializeByValueID(request))); + return "$P" + ref.slice(1); + } + if (void 0 !== request.temporaryReferences) { + var tempRef = request.temporaryReferences.get(value); + if (void 0 !== tempRef) return "$T" + tempRef; + } + tempRef = request.writtenDebugObjects; + var existingDebugReference = tempRef.get(value); + if (void 0 !== existingDebugReference) + if (debugModelRoot === value) debugModelRoot = null; + else return existingDebugReference; + else if (-1 === parentPropertyName.indexOf(":")) + if ( + ((existingDebugReference = tempRef.get(parent)), + void 0 !== existingDebugReference) + ) { + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + var propertyName = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + propertyName = "type"; + break; + case "2": + propertyName = "key"; + break; + case "3": + propertyName = "props"; + break; + case "4": + propertyName = "_owner"; + } + tempRef.set(value, existingDebugReference + ":" + propertyName); + } else if (debugNoOutline !== value) { + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + request = outlineDebugModel(request, counter, value); + return serializeByValueID(request); + } + parent = request.writtenObjects.get(value); + if (void 0 !== parent) return parent; + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + counter.objectLimit--; + parent = request.deferredDebugObjects; + if ( + null !== parent && + ((parentPropertyName = parent.existing.get(value)), + void 0 !== parentPropertyName) + ) + return ( + parent.existing.delete(value), + parent.retained.delete(parentPropertyName), + emitOutlinedDebugModelChunk( + request, + parentPropertyName, + counter, + value + ), + serializeByValueID(parentPropertyName) + ); + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + null != value._owner && outlineComponentInfo(request, value._owner); + "object" === typeof value.type && + null !== value.type && + doNotLimit.add(value.type); + "object" === typeof value.key && + null !== value.key && + doNotLimit.add(value.key); + doNotLimit.add(value.props); + null !== value._owner && doNotLimit.add(value._owner); + counter = null; + if (null != value._debugStack) + for ( + counter = filterStackTrace( + request, + parseStackTrace(value._debugStack, 1) + ), + doNotLimit.add(counter), + request = 0; + request < counter.length; + request++ + ) + doNotLimit.add(counter[request]); + return [ + REACT_ELEMENT_TYPE, + value.type, + value.key, + value.props, + value._owner, + counter, + value._store.validated + ]; + case REACT_LAZY_TYPE: + value = value._payload; + if (null !== value && "object" === typeof value) { + switch (value._status) { + case 1: + return ( + (request = outlineDebugModel( + request, + counter, + value._result + )), + serializeLazyID(request) + ); + case 2: + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value._result, + !0, + null + ), + serializeLazyID(counter) + ); + } + switch (value.status) { + case "fulfilled": + return ( + (request = outlineDebugModel( + request, + counter, + value.value + )), + serializeLazyID(request) + ); + case "rejected": + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value.reason, + !0, + null + ), + serializeLazyID(counter) + ); + } + } + request.pendingDebugChunks++; + value = request.nextChunkId++; + emitDebugHaltChunk(request, value); + return serializeLazyID(value); + } + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + if (isArrayImpl(value)) + return 200 < value.length && !doNotLimit.has(value) + ? serializeDeferredObject(request, value) + : value; + if (value instanceof Date) return "$D" + value.toJSON(); + if (value instanceof Map) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) { + var entry = value[ref]; + doNotLimit.add(entry); + var key = entry[0]; + entry = entry[1]; + "object" === typeof key && null !== key && doNotLimit.add(key); + "object" === typeof entry && + null !== entry && + doNotLimit.add(entry); + } + return "$Q" + outlineDebugModel(request, counter, value).toString(16); + } + if (value instanceof Set) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) + (key = value[ref]), + "object" === typeof key && null !== key && doNotLimit.add(key); + return "$W" + outlineDebugModel(request, counter, value).toString(16); + } + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + + outlineDebugModel( + request, + { objectLimit: 2 * value.length + 1 }, + value + ).toString(16) + ); + if (value instanceof Error) { + counter = "Error"; + var env = (0, request.environmentName)(); + try { + (counter = value.name), + (ref = String(value.message)), + (key = filterStackTrace(request, parseStackTrace(value, 0))), + (entry = value.environmentName), + "string" === typeof entry && (env = entry); + } catch (x) { + (ref = + "An error occurred but serializing the error message failed."), + (key = []); + } + request = + "$Z" + + outlineDebugModel( + request, + { objectLimit: 2 * key.length + 1 }, + { name: counter, message: ref, stack: key, env: env } + ).toString(16); + return request; + } + if (value instanceof ArrayBuffer) + return serializeDebugTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeDebugTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeDebugTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeDebugTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeDebugTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeDebugTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeDebugTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeDebugTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeDebugTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeDebugTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeDebugTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeDebugTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeDebugTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeDebugBlob(request, value); + if (getIteratorFn(value)) return Array.from(value); + request = getPrototypeOf(value); + if (request !== ObjectPrototype && null !== request) { + counter = Object.create(null); + for (env in value) + if (hasOwnProperty.call(value, env) || isGetter(request, env)) + counter[env] = value[env]; + ref = request.constructor; + "function" !== typeof ref || + ref.prototype !== request || + hasOwnProperty.call(value, "") || + isGetter(request, "") || + (counter[""] = { $$typeof: CONSTRUCTOR_MARKER, constructor: ref }); + return counter; + } + return value; + } + if ("string" === typeof value) { + if (1024 <= value.length) { + if (0 >= counter.objectLimit) + return serializeDeferredObject(request, value); + counter.objectLimit--; + request.pendingDebugChunks++; + counter = request.nextChunkId++; + emitTextChunk(request, counter, value, !0); + return serializeByValueID(counter); + } + return "$" === value[0] ? "$" + value : value; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((counter = request.temporaryReferences.get(value)), + void 0 !== counter) + ) + return "$T" + counter; + counter = request.writtenDebugObjects; + ref = counter.get(value); + if (void 0 !== ref) return ref; + ref = Function.prototype.toString.call(value); + key = value.name; + key = + "$E" + + ("string" === typeof key + ? "Object.defineProperty(" + + ref + + ',"name",{value:' + + JSON.stringify(key) + + "})" + : "(" + ref + ")"); + request.pendingDebugChunks++; + ref = request.nextChunkId++; + key = encodeReferenceChunk(request, ref, key); + request.completedDebugChunks.push(key); + request = serializeByValueID(ref); + counter.set(value, request); + return request; + } + if ("symbol" === typeof value) { + counter = request.writtenSymbols.get(value); + if (void 0 !== counter) return serializeByValueID(counter); + value = value.description; + request.pendingChunks++; + counter = request.nextChunkId++; + emitSymbolChunk(request, counter, value); + return serializeByValueID(counter); + } + return "bigint" === typeof value + ? "$n" + value.toString(10) + : "unknown type " + typeof value; + } + function serializeDebugModel(request, objectLimit, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + var counter = { objectLimit: objectLimit }; + objectLimit = debugNoOutline; + debugNoOutline = model; + try { + return stringify(model, replacer); + } catch (x) { + return stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugNoOutline = objectLimit; + } + } + function emitOutlinedDebugModelChunk(request, id, counter, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + "object" === typeof model && null !== model && doNotLimit.add(model); + var prevModelRoot = debugModelRoot; + debugModelRoot = model; + "object" === typeof model && + null !== model && + request.writtenDebugObjects.set(model, serializeByValueID(id)); + try { + var json = stringify(model, replacer); + } catch (x) { + json = stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugModelRoot = prevModelRoot; + } + id = id.toString(16) + ":" + json + "\n"; + id = stringToChunk(id); + request.completedDebugChunks.push(id); + } + function outlineDebugModel(request, counter, model) { + var id = request.nextChunkId++; + request.pendingDebugChunks++; + emitOutlinedDebugModelChunk(request, id, counter, model); + return id; + } + function emitTimeOriginChunk(request, timeOrigin) { + request.pendingDebugChunks++; + timeOrigin = stringToChunk(":N" + timeOrigin + "\n"); + request.completedDebugChunks.push(timeOrigin); + } + function forwardDebugInfo(request$jscomp$1, task, debugInfo) { + for (var id = task.id, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + if ("number" === typeof info.time) + markOperationEndTime(request$jscomp$1, task, info.time); + else if ("string" === typeof info.name) + outlineComponentInfo(request$jscomp$1, info), + request$jscomp$1.pendingChunks++, + emitDebugChunk(request$jscomp$1, id, info); + else if (info.awaited) { + var ioInfo = info.awaited; + if (!(ioInfo.end <= request$jscomp$1.timeOrigin)) { + var request = request$jscomp$1, + ioInfo$jscomp$0 = ioInfo; + if (!request.writtenObjects.has(ioInfo$jscomp$0)) { + request.pendingDebugChunks++; + var id$jscomp$0 = request.nextChunkId++, + owner = ioInfo$jscomp$0.owner; + null != owner && outlineComponentInfo(request, owner); + var debugStack = + null == ioInfo$jscomp$0.stack && + null != ioInfo$jscomp$0.debugStack + ? filterStackTrace( + request, + parseStackTrace(ioInfo$jscomp$0.debugStack, 1) + ) + : ioInfo$jscomp$0.stack; + var env = ioInfo$jscomp$0.env; + null == env && (env = (0, request.environmentName)()); + var request$jscomp$0 = request, + id$jscomp$1 = id$jscomp$0, + value = ioInfo$jscomp$0.value, + objectLimit = 10; + debugStack && (objectLimit += debugStack.length); + var debugIOInfo = { + name: ioInfo$jscomp$0.name, + start: ioInfo$jscomp$0.start - request$jscomp$0.timeOrigin, + end: ioInfo$jscomp$0.end - request$jscomp$0.timeOrigin + }; + null != env && (debugIOInfo.env = env); + null != debugStack && (debugIOInfo.stack = debugStack); + null != owner && (debugIOInfo.owner = owner); + void 0 !== value && (debugIOInfo.value = value); + env = serializeDebugModel( + request$jscomp$0, + objectLimit, + debugIOInfo + ); + id$jscomp$1 = id$jscomp$1.toString(16) + ":J" + env + "\n"; + id$jscomp$1 = stringToChunk(id$jscomp$1); + request$jscomp$0.completedDebugChunks.push(id$jscomp$1); + request.writtenDebugObjects.set( + ioInfo$jscomp$0, + serializeByValueID(id$jscomp$0) + ); + } + null != info.owner && + outlineComponentInfo(request$jscomp$1, info.owner); + request = + null == info.stack && null != info.debugStack + ? filterStackTrace( + request$jscomp$1, + parseStackTrace(info.debugStack, 1) + ) + : info.stack; + ioInfo = { awaited: ioInfo }; + ioInfo.env = + null != info.env + ? info.env + : (0, request$jscomp$1.environmentName)(); + null != info.owner && (ioInfo.owner = info.owner); + null != request && (ioInfo.stack = request); + request$jscomp$1.pendingChunks++; + emitDebugChunk(request$jscomp$1, id, ioInfo); + } + } else + request$jscomp$1.pendingChunks++, + emitDebugChunk(request$jscomp$1, id, info); + } + } + function forwardDebugInfoFromThenable(request, task, thenable) { + (thenable = thenable._debugInfo) && + forwardDebugInfo(request, task, thenable); + } + function forwardDebugInfoFromCurrentContext(request, task, thenable) { + (thenable = thenable._debugInfo) && + forwardDebugInfo(request, task, thenable); + } + function forwardDebugInfoFromAbortedTask(request, task) { + var model = task.model; + "object" === typeof model && + null !== model && + (model = model._debugInfo) && + forwardDebugInfo(request, task, model); + } + function emitTimingChunk(request, id, timestamp) { + request.pendingChunks++; + var json = '{"time":' + (timestamp - request.timeOrigin) + "}"; + null !== request.debugDestination + ? ((timestamp = request.nextChunkId++), + (json = timestamp.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(stringToChunk(json)), + (id = + serializeRowHeader("D", id) + + '"$' + + timestamp.toString(16) + + '"\n'), + request.completedRegularChunks.push(stringToChunk(id))) + : ((id = serializeRowHeader("D", id) + json + "\n"), + request.completedRegularChunks.push(stringToChunk(id))); + } + function markOperationEndTime(request, task, timestamp) { + (request.status === ABORTING && timestamp > request.abortTime) || + (timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : emitTimingChunk(request, task.id, task.time)); + } + function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? ((task = TaintRegistryValues.get(value)), + void 0 !== task && throwTaintViolation(task.message), + emitTextChunk(request, id, value, !1)) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk( + request, + id, + "m", + value, + !1 + ) + : value instanceof DataView + ? emitTypedArrayChunk( + request, + id, + "V", + value, + !1 + ) + : ((value = stringify(value, task.toJSON)), + emitModelChunk(request, task.id, value)); + } + function erroredTask(request, task, error) { + task.timed && markOperationEndTime(request, task, performance.now()); + task.status = 4; + if ( + "object" === typeof error && + null !== error && + error.$$typeof === REACT_POSTPONE_TYPE + ) + logPostpone(request, error.message, task), + emitPostponeChunk(request, task.id, error); + else { + var digest = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner); + } + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } + function retryTask(request, task) { + if (0 === task.status) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + canEmitDebugInfo = !0; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + canEmitDebugInfo = !1; + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + var currentEnv = (0, request.environmentName)(); + currentEnv !== task.environmentName && + (request.pendingChunks++, + emitDebugChunk(request, task.id, { env: currentEnv })); + task.timed && markOperationEndTime(request, task, performance.now()); + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set( + resolvedModel, + serializeByValueID(task.id) + ), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel); + emitModelChunk(request, task.id, json); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (request.status === ABORTING) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + (canEmitDebugInfo = prevCanEmitDebugInfo), + (serializedSize = parentSerializedSize); + } + } + } + function tryStreamTask(request, task) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + canEmitDebugInfo = !1; + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + (serializedSize = parentSerializedSize), + (canEmitDebugInfo = prevCanEmitDebugInfo); + } + } + function performWork(request) { + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } + } + function abortTask(task) { + 0 === task.status && (task.status = 3); + } + function finishAbortedTask(task, request, errorId) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + task.timed && markOperationEndTime(request, task, request.abortTime), + (errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); + } + function haltTask(task) { + 0 === task.status && (task.status = 3); + } + function finishHaltedTask(task, request) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + request.pendingChunks--); + } + function flushCompletedChunks(request) { + if (null !== request.debugDestination) { + var debugDestination = request.debugDestination; + currentView = new Uint8Array(4096); + writtenBytes = 0; + try { + for ( + var debugChunks = request.completedDebugChunks, i = 0; + i < debugChunks.length; + i++ + ) + request.pendingDebugChunks--, + writeChunkAndReturn(debugDestination, debugChunks[i]); + debugChunks.splice(0, i); + } finally { + completeWriting(debugDestination); + } + } + debugDestination = request.destination; + if (null !== debugDestination) { + currentView = new Uint8Array(4096); + writtenBytes = 0; + try { + var importsChunks = request.completedImportChunks; + for ( + debugChunks = 0; + debugChunks < importsChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + importsChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + importsChunks.splice(0, debugChunks); + var hintChunks = request.completedHintChunks; + for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++) + if ( + !writeChunkAndReturn(debugDestination, hintChunks[debugChunks]) + ) { + request.destination = null; + debugChunks++; + break; + } + hintChunks.splice(0, debugChunks); + if (null === request.debugDestination) { + var _debugChunks = request.completedDebugChunks; + for ( + debugChunks = 0; + debugChunks < _debugChunks.length; + debugChunks++ + ) + if ( + (request.pendingDebugChunks--, + !writeChunkAndReturn( + debugDestination, + _debugChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + _debugChunks.splice(0, debugChunks); + } + var regularChunks = request.completedRegularChunks; + for ( + debugChunks = 0; + debugChunks < regularChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + regularChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + regularChunks.splice(0, debugChunks); + var errorChunks = request.completedErrorChunks; + for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(debugDestination, errorChunks[debugChunks])) + ) { + request.destination = null; + debugChunks++; + break; + } + errorChunks.splice(0, debugChunks); + } finally { + (request.flushScheduled = !1), completeWriting(debugDestination); + } + } + 0 === request.pendingChunks && + ((importsChunks = request.debugDestination), + 0 === request.pendingDebugChunks + ? (null !== importsChunks && + (importsChunks.close(), (request.debugDestination = null)), + cleanupTaintQueue(request), + request.status < ABORTING && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = CLOSED), + request.destination.close(), + (request.destination = null)), + null !== request.debugDestination && + (request.debugDestination.close(), + (request.debugDestination = null))) + : null !== importsChunks && + null !== request.destination && + ((request.status = CLOSED), + request.destination.close(), + (request.destination = null))); + } + function startWork(request) { + request.flushScheduled = null !== request.destination; + supportsRequestStorage + ? scheduleMicrotask(function () { + requestStorage.run(request, performWork, request); + }) + : scheduleMicrotask(function () { + return performWork(request); + }); + setTimeout(function () { + 10 === request.status && (request.status = 11); + }, 0); + } + function enqueueFlush(request) { + !1 !== request.flushScheduled || + 0 !== request.pingedTasks.length || + (null === request.destination && null === request.debugDestination) || + ((request.flushScheduled = !0), + setTimeout(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + }, 0)); + } + function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); + } + function startFlowing(request, destination) { + if (13 === request.status) + (request.status = CLOSED), + closeWithError(destination, request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } + function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = ABORTING; + request.abortTime = performance.now(); + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + setTimeout(function () { + return finishHalt(request, abortableTasks); + }, 0); + else if ( + "object" === typeof reason && + null !== reason && + reason.$$typeof === REACT_POSTPONE_TYPE + ) { + logPostpone(request, reason.message, null); + var errorId = request.nextChunkId++; + request.fatalError = errorId; + request.pendingChunks++; + emitPostponeChunk(request, errorId, reason); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId); + }); + setTimeout(function () { + return finishAbort(request, abortableTasks, errorId); + }, 0); + } else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + _errorId2 = request.nextChunkId++; + request.fatalError = _errorId2; + request.pendingChunks++; + emitErrorChunk(request, _errorId2, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, _errorId2); + }); + setTimeout(function () { + return finishAbort(request, abortableTasks, _errorId2); + }, 0); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$2) { + logRecoverableError(request, error$2, null), + fatalError(request, error$2); + } + } + function fromHex(str) { + return parseInt(str, 16); + } + function closeDebugChannel(request) { + var deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + deferredDebugObjects.retained.forEach(function (value, id) { + request.pendingDebugChunks--; + deferredDebugObjects.retained.delete(id); + deferredDebugObjects.existing.delete(value); + }); + enqueueFlush(request); + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + i++ + ) { + var thenable = globalThis.__next_chunk_load__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; + } + function createPendingChunk(response) { + return new Chunk("pending", null, null, response); + } + function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); + } + function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } + } + function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } + } + function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1, + response + ); + } + function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1 + ); + } + function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key + ) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; + } + function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString( + response, + parentObj, + parentKey, + value, + reference + ); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel( + response, + value, + i, + value[i], + parentObj + )), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; + } + function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = + -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), + (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } + } + function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path + ) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && + null === blocked.value && + (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; + } + function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; + } + function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey + ) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; + } + function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close( + "C" === chunks ? '"$undefined"' : chunks.slice(1) + ) + : controller.enqueueModel(chunks); + } + function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk = createPendingChunk(response); + _chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk; + chunk.then(function () { + previousBlockedChunk === _chunk && (previousBlockedChunk = null); + resolveModelChunk(_chunk, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = _defineProperty({}, ASYNC_ITERATOR, function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }); + iterator = iterator ? iterable[ASYNC_ITERATOR]() : iterable; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; + } + function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return ( + (obj = parseInt(value.slice(2), 16)), getChunk(response, obj) + ); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel( + response, + value, + obj, + key, + createModel + )), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if ( + void 0 === reference || + void 0 === response._temporaryReferences + ) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray( + response, + value, + Uint8ClampedArray, + 1, + obj, + key + ); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray( + response, + value, + BigUint64Array, + 8, + obj, + key + ); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; + } + function createResponse( + bundlerConfig, + formFieldPrefix, + temporaryReferences + ) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; + } + function close(response) { + reportGlobalError(response, Error("Connection closed.")); + } + function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); + } + function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; + } + function startReadingFromDebugChannelReadableStream( + request$jscomp$0, + stream + ) { + function progress(_ref) { + var done = _ref.done, + buffer = _ref.value; + _ref = stringBuffer; + done + ? ((buffer = new Uint8Array(0)), + (buffer = stringDecoder.decode(buffer))) + : (buffer = stringDecoder.decode(buffer, decoderOptions)); + stringBuffer = _ref + buffer; + _ref = stringBuffer.split("\n"); + for (buffer = 0; buffer < _ref.length - 1; buffer++) { + var request = request$jscomp$0, + message = _ref[buffer], + deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + if ("" === message) closeDebugChannel(request); + else { + var command = message.charCodeAt(0); + message = message.slice(2).split(",").map(fromHex); + switch (command) { + case 82: + for (command = 0; command < message.length; command++) { + var id = message[command], + retainedValue = deferredDebugObjects.retained.get(id); + void 0 !== retainedValue && + (request.pendingDebugChunks--, + deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + enqueueFlush(request)); + } + break; + case 81: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: 10 }, + retainedValue + ), + enqueueFlush(request)); + break; + case 80: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + emitRequestedDebugThenable( + request, + id, + { objectLimit: 10 }, + retainedValue + )); + break; + default: + throw Error( + "Unknown command. The debugChannel was not wired up properly." + ); + } + } + } + stringBuffer = _ref[_ref.length - 1]; + if (done) closeDebugChannel(request$jscomp$0); + else return reader.read().then(progress).catch(error); + } + function error(e) { + abort( + request$jscomp$0, + Error("Lost connection to the Debug Channel.", { cause: e }) + ); + } + var reader = stream.getReader(), + stringDecoder = new TextDecoder(), + stringBuffer = ""; + reader.read().then(progress).catch(error); + } + var ReactDOM = require("react-dom"), + React = require("react"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), + REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + LocalPromise = Promise, + scheduleMicrotask = + "function" === typeof queueMicrotask + ? queueMicrotask + : function (callback) { + LocalPromise.resolve(null) + .then(callback) + .catch(handleErrorInNextTick); + }, + currentView = null, + writtenBytes = 0, + textEncoder = new TextEncoder(), + CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"), + FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice, + PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; + ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: function (href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } + }, + C: function (href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = + "C|" + + (null == crossOrigin ? "null" : crossOrigin) + + "|" + + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } + }, + L: preload, + m: preloadModule$1, + X: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } + }, + S: function (href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } + }, + M: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } + } + }; + var framesToSkip = 0, + collectedStackTrace = null, + identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, + frameRegExp = + /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|)\)|(?:async )?(.+):(\d+):(\d+)|)$/, + stackTraceCache = new WeakMap(), + supportsRequestStorage = "function" === typeof AsyncLocalStorage, + requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null, + supportsComponentStorage = supportsRequestStorage, + componentStorage = supportsComponentStorage + ? new AsyncLocalStorage() + : null, + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }, + SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." + ), + suspendedThenable = null, + currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null, + currentComponentDebugInfo = null, + HooksDispatcher = { + readContext: unsupportedContext, + use: function (usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (isClientReference(usable)) { + if ( + null != usable.value && + usable.value.$$typeof === REACT_CONTEXT_TYPE + ) + throw Error( + "Cannot read a Client Context from a Server Component." + ); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error( + "An unsupported type was passed to use(): " + String(usable) + ); + }, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: function () { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return ( + "_" + + currentRequest$1.identifierPrefix + + "S_" + + id.toString(32) + + "_" + ); + }, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } + }; + HooksDispatcher.useEffectEvent = unsupportedHook; + var currentOwner = null, + DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var cache = (cache = resolveRequest()) ? cache.cache : new Map(); + var entry = cache.get(resourceType); + void 0 === entry && + ((entry = resourceType()), cache.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); + var prefix, suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var lastResetTime = 0; + if ( + "object" === typeof performance && + "function" === typeof performance.now + ) { + var localPerformance = performance; + var getCurrentTime = function () { + return localPerformance.now(); + }; + } else { + var localDate = Date; + getCurrentTime = function () { + return localDate.now(); + }; + } + var callComponent = { + react_stack_bottom_frame: function ( + Component, + props, + componentDebugInfo + ) { + currentOwner = componentDebugInfo; + try { + return Component(props, void 0); + } finally { + currentOwner = null; + } + } + }, + callComponentInDEV = + callComponent.react_stack_bottom_frame.bind(callComponent), + callLazyInit = { + react_stack_bottom_frame: function (lazy) { + var init = lazy._init; + return init(lazy._payload); + } + }, + callLazyInitInDEV = + callLazyInit.react_stack_bottom_frame.bind(callLazyInit), + callIterator = { + react_stack_bottom_frame: function (iterator, progress, error) { + iterator.next().then(progress, error); + } + }, + callIteratorInDEV = + callIterator.react_stack_bottom_frame.bind(callIterator), + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + hasOwnProperty = Object.prototype.hasOwnProperty, + doNotLimit = new WeakSet(); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, + stringify = JSON.stringify, + ABORTING = 12, + CLOSED = 14, + TaintRegistryObjects = ReactSharedInternalsServer.TaintRegistryObjects, + TaintRegistryValues = ReactSharedInternalsServer.TaintRegistryValues, + TaintRegistryByteLengths = + ReactSharedInternalsServer.TaintRegistryByteLengths, + TaintRegistryPendingRequests = + ReactSharedInternalsServer.TaintRegistryPendingRequests, + defaultPostponeHandler = noop, + currentRequest = null, + canEmitDebugInfo = !1, + serializedSize = 0, + MAX_ROW_SIZE = 3200, + modelRoot = !1, + CONSTRUCTOR_MARKER = Symbol(), + debugModelRoot = null, + debugNoOutline = null, + emptyRoot = {}, + decoderOptions = { stream: !0 }, + instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(); + Chunk.prototype = Object.create(Promise.prototype); + Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + default: + reject(this.reason); + } + }; + var initializingChunk = null, + initializingChunkBlockedModel = null; + exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); + }; + exports.createTemporaryReferenceSet = function () { + return new WeakMap(); + }; + exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference( + serverManifest, + value.id, + value.bound + ))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); + }; + exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); + }; + exports.decodeReply = function (body, turbopackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + turbopackMap = getChunk(body, 0); + close(body); + return turbopackMap; + }; + exports.decodeReplyFromAsyncIterable = function ( + iterable, + turbopackMap, + options + ) { + function progress(entry) { + if (entry.done) close(response$jscomp$0); + else { + entry = entry.value; + var name = entry[0]; + entry = entry[1]; + if ("string" === typeof entry) { + var response = response$jscomp$0; + response._formData.append(name, entry); + var prefix = response._prefix; + name.startsWith(prefix) && + ((response = response._chunks), + (name = +name.slice(prefix.length)), + (prefix = response.get(name)) && + resolveModelChunk(prefix, entry, name)); + } else response$jscomp$0._formData.append(name, entry); + iterator.next().then(progress, error); + } + } + function error(reason) { + reportGlobalError(response$jscomp$0, reason); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + var iterator = iterable[ASYNC_ITERATOR](), + response$jscomp$0 = createResponse( + turbopackMap, + "", + options ? options.temporaryReferences : void 0 + ); + iterator.next().then(progress, error); + return getChunk(response$jscomp$0, 0); + }; + exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = createPrerenderRequest( + model, + turbopackMap, + function () { + var stream = new ReadableStream( + { + type: "bytes", + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + !1 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; + exports.registerClientReference = function ( + proxyImplementation, + id, + exportName + ) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); + }; + exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + $$location: { value: Error("react-stack-top-frame"), configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + }; + exports.renderToReadableStream = function (model, turbopackMap, options) { + var debugChannelReadable = + options && options.debugChannel + ? options.debugChannel.readable + : void 0, + debugChannelWritable = + options && options.debugChannel + ? options.debugChannel.writable + : void 0, + request = createRequest( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + void 0 !== debugChannelReadable + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + void 0 !== debugChannelWritable && + new ReadableStream( + { + type: "bytes", + pull: function (controller) { + if (13 === request.status) + (request.status = CLOSED), + closeWithError(controller, request.fatalError); + else if ( + request.status !== CLOSED && + null === request.debugDestination + ) { + request.debugDestination = controller; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), + fatalError(request, error); + } + } + } + }, + { highWaterMark: 0 } + ).pipeTo(debugChannelWritable); + void 0 !== debugChannelReadable && + startReadingFromDebugChannelReadableStream( + request, + debugChannelReadable + ); + return new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + }; + })(); diff --git a/.socket/blob/24f0b09dc039e0ac8b8b833c39993241580b4d5c3b00dad3d110c9622b988f2c b/.socket/blob/24f0b09dc039e0ac8b8b833c39993241580b4d5c3b00dad3d110c9622b988f2c new file mode 100644 index 0000000..392a903 --- /dev/null +++ b/.socket/blob/24f0b09dc039e0ac8b8b833c39993241580b4d5c3b00dad3d110c9622b988f2c @@ -0,0 +1,3264 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-webpack-server.node.unbundled.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 strict"; +var stream = require("stream"), + util = require("util"); +require("crypto"); +var async_hooks = require("async_hooks"), + ReactDOM = require("react-dom"), + React = require("react"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); +Symbol.for("react.postpone"); +var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; +} +var ASYNC_ITERATOR = Symbol.asyncIterator, + scheduleMicrotask = queueMicrotask, + currentView = null, + writtenBytes = 0, + destinationHasCapacity = !0; +function writeToDestination(destination, view) { + destination = destination.write(view); + destinationHasCapacity = destinationHasCapacity && destination; +} +function writeChunkAndReturn(destination, chunk) { + if ("string" === typeof chunk) { + if (0 !== chunk.length) + if (4096 < 3 * chunk.length) + 0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk); + else { + var target = currentView; + 0 < writtenBytes && (target = currentView.subarray(writtenBytes)); + target = textEncoder.encodeInto(chunk, target); + var read = target.read; + writtenBytes += target.written; + read < chunk.length && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = textEncoder.encodeInto( + chunk.slice(read), + currentView + ).written)); + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)); + } + } else + 0 !== chunk.byteLength && + (4096 < chunk.byteLength + ? (0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk)) + : ((target = currentView.length - writtenBytes), + target < chunk.byteLength && + (0 === target + ? writeToDestination(destination, currentView) + : (currentView.set(chunk.subarray(0, target), writtenBytes), + (writtenBytes += target), + writeToDestination(destination, currentView), + (chunk = chunk.subarray(target))), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + currentView.set(chunk, writtenBytes), + (writtenBytes += chunk.byteLength), + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)))); + return destinationHasCapacity; +} +var textEncoder = new util.TextEncoder(); +function byteLengthOfChunk(chunk) { + return "string" === typeof chunk + ? Buffer.byteLength(chunk, "utf8") + : chunk.byteLength; +} +var CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"); +function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); +} +var FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice; +function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; +} +var PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }; +function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl({}, target.$$id, !0), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; +} +var proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; +ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: prefetchDNS, + C: preconnect, + L: preload, + m: preloadModule$1, + X: preinitScript, + S: preinitStyle, + M: preinitModuleScript +}; +function prefetchDNS(href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } +} +function preconnect(href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "C|" + (null == crossOrigin ? "null" : crossOrigin) + "|" + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } +} +function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } +} +function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } +} +function preinitStyle(href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } +} +function preinitScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } +} +function preinitModuleScript(src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } +} +function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } +} +var requestStorage = new async_hooks.AsyncLocalStorage(), + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }; +function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; +} +function noop() {} +var SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." +); +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; +} +var currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null; +function getThenableStateAfterSuspending() { + var state = thenableState || []; + thenableState = null; + return state; +} +var HooksDispatcher = { + readContext: unsupportedContext, + use: use, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: useId, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } +}; +HooksDispatcher.useEffectEvent = unsupportedHook; +function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); +} +function unsupportedRefresh() { + throw Error("Refreshing the cache is not supported in Server Components."); +} +function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); +} +function useId() { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return "_" + currentRequest$1.identifierPrefix + "S_" + id.toString(32) + "_"; +} +function use(usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (usable.$$typeof === CLIENT_REFERENCE_TAG$1) { + if (null != usable.value && usable.value.$$typeof === REACT_CONTEXT_TYPE) + throw Error("Cannot read a Client Context from a Server Component."); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error("An unsupported type was passed to use(): " + String(usable)); +} +var DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var JSCompiler_inline_result = (JSCompiler_inline_result = + resolveRequest()) + ? JSCompiler_inline_result.cache + : new Map(); + var entry = JSCompiler_inline_result.get(resourceType); + void 0 === entry && + ((entry = resourceType()), + JSCompiler_inline_result.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }, + ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); +var isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf; +function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); +} +function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } +} +function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; +} +var CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"); +function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + objKind = -1; + var length = 0; + if (isArrayImpl(objectOrArray)) { + var str = "["; + for (var i = 0; i < objectOrArray.length; i++) { + 0 < i && (str += ", "); + var value = objectOrArray[i]; + value = + "object" === typeof value && null !== value + ? describeObjectForErrorMessage(value) + : describeValueForErrorMessage(value); + "" + i === expandedName + ? ((objKind = str.length), (length = value.length), (str += value)) + : (str = + 10 > value.length && 40 > str.length + value.length + ? str + value + : str + "..."); + } + str += "]"; + } else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + str = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + str = "{"; + i = Object.keys(objectOrArray); + for (value = 0; value < i.length; value++) { + 0 < value && (str += ", "); + var name = i[value], + encodedKey = JSON.stringify(name); + str += ('"' + name + '"' === encodedKey ? name : encodedKey) + ": "; + encodedKey = objectOrArray[name]; + encodedKey = + "object" === typeof encodedKey && null !== encodedKey + ? describeObjectForErrorMessage(encodedKey) + : describeValueForErrorMessage(encodedKey); + name === expandedName + ? ((objKind = str.length), + (length = encodedKey.length), + (str += encodedKey)) + : (str = + 10 > encodedKey.length && 40 > str.length + encodedKey.length + ? str + encodedKey + : str + "..."); + } + str += "}"; + } + return void 0 === expandedName + ? str + : -1 < objKind && 0 < length + ? ((objectOrArray = " ".repeat(objKind) + "^".repeat(length)), + "\n " + str + "\n " + objectOrArray) + : "\n " + str; +} +var hasOwnProperty = Object.prototype.hasOwnProperty, + ObjectPrototype = Object.prototype, + stringify = JSON.stringify; +function defaultErrorHandler(error) { + console.error(error); +} +function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences +) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error("Currently React only supports one RSC renderer at a time."); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + var abortSet = new Set(), + pingedTasks = [], + hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = []; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = void 0 === onPostpone ? noop : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + type = createTask(this, model, null, !1, 0, abortSet); + pingedTasks.push(type); +} +var currentRequest = null; +function resolveRequest() { + if (currentRequest) return currentRequest; + var store = requestStorage.getStore(); + return store ? store : null; +} +function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + switch (thenable.status) { + case "fulfilled": + return ( + (newTask.model = thenable.value), pingTask(request, newTask), newTask.id + ); + case "rejected": + return erroredTask(request, newTask, thenable.reason), newTask.id; + default: + if (12 === request.status) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + (erroredTask(request, newTask, reason), enqueueFlush(request)); + } + ); + return newTask.id; +} +function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(entry), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$8) { + error(x$8); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener("abort", abortStream), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(task); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); +} +function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModelWithFormatContext( + request, + entry.value, + 0 + ); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(endStreamRow); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + iterator.next().then(progress, error); + } catch (x$9) { + error(x$9); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + iterable = iterable === iterator; + var streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + request.pendingChunks++; + task = streamTask.id.toString(16) + ":" + (iterable ? "x" : "X") + "\n"; + request.completedRegularChunks.push(task); + request.cacheController.signal.addEventListener("abort", abortIterable); + iterator.next().then(progress, error); + return serializeByValueID(streamTask.id); +} +function emitHint(request, code, model) { + model = stringify(model); + request.completedHintChunks.push(":H" + code + model + "\n"); + enqueueFlush(request); +} +function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; +} +function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return wakeable.value; + case "rejected": + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { $$typeof: REACT_LAZY_TYPE, _payload: wakeable, _init: readThenable }; +} +function voidHandler() {} +function processServerComponentReturnValue(request, task, Component, result) { + if ( + "object" !== typeof result || + null === result || + result.$$typeof === CLIENT_REFERENCE_TAG$1 + ) + return result; + if ("function" === typeof result.then) + return createLazyWrapperAroundWakeable(request, task, result); + var iteratorFn = getIteratorFn(result); + return iteratorFn + ? ((request = {}), + (request[Symbol.iterator] = function () { + return iteratorFn.call(result); + }), + request) + : "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((request = {}), + (request[ASYNC_ITERATOR] = function () { + return result[ASYNC_ITERATOR](); + }), + request); +} +function renderFunctionComponent(request, task, key, Component, props) { + var prevThenableState = task.thenableState; + task.thenableState = null; + thenableIndexCounter = 0; + thenableState = prevThenableState; + props = Component(props, void 0); + if (12 === request.status) + throw ( + ("object" === typeof props && + null !== props && + "function" === typeof props.then && + props.$$typeof !== CLIENT_REFERENCE_TAG$1 && + props.then(voidHandler, voidHandler), + null) + ); + props = processServerComponentReturnValue(request, task, Component, props); + Component = task.keyPath; + prevThenableState = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = prevThenableState; + return request; +} +function renderFragment(request, task, children) { + return null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children } + ]), + task.implicitSlot ? [request] : request) + : children; +} +var serializedSize = 0; +function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + pingTask(request, task); + return serializeLazyID(task.id); +} +function renderElement(request, task, type, key, ref, props) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + if ( + "function" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 && + type.$$typeof !== TEMPORARY_REFERENCE_TAG + ) + return renderFunctionComponent(request, task, key, type, props); + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + (type = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (props = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = type), + props + ); + if ( + null != type && + "object" === typeof type && + type.$$typeof !== CLIENT_REFERENCE_TAG$1 + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + var init = type._init; + type = init(type._payload); + if (12 === request.status) throw null; + return renderElement(request, task, type, key, ref, props); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent(request, task, key, type.render, props); + case REACT_MEMO_TYPE: + return renderElement(request, task, type.type, key, ref, props); + } + else + "string" === typeof type && + ((ref = task.formatContext), + (init = getChildFormatContext(ref, type, props)), + ref !== init && + null != props.children && + outlineModelWithFormatContext(request, props.children, init)); + request = key; + key = task.keyPath; + null === request + ? (request = key) + : null !== key && (request = key + "," + request); + props = [REACT_ELEMENT_TYPE, type, request, props]; + task = task.implicitSlot && null !== request ? [props] : props; + return task; +} +function pingTask(request, task) { + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : setImmediate(function () { + return performWork(request); + })); +} +function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet +) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + serializedSize += parentPropertyName.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + var JSCompiler_inline_result = renderModelDestructive( + request, + task, + this, + parentPropertyName, + value + ); + } catch (thrownValue) { + if ( + ((parentPropertyName = task.model), + (parentPropertyName = + "object" === typeof parentPropertyName && + null !== parentPropertyName && + (parentPropertyName.$$typeof === REACT_ELEMENT_TYPE || + parentPropertyName.$$typeof === REACT_LAZY_TYPE)), + 12 === request.status) + ) + (task.status = 3), + 21 === request.type + ? ((prevKeyPath = request.nextChunkId++), + (prevKeyPath = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)), + (JSCompiler_inline_result = prevKeyPath)) + : ((prevKeyPath = request.fatalError), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath))); + else if ( + ((value = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue), + "object" === typeof value && + null !== value && + "function" === typeof value.then) + ) { + JSCompiler_inline_result = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks + ); + var ping = JSCompiler_inline_result.ping; + value.then(ping, ping); + JSCompiler_inline_result.thenableState = + getThenableStateAfterSuspending(); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(JSCompiler_inline_result.id) + : serializeByValueID(JSCompiler_inline_result.id); + } else + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + request.pendingChunks++, + (prevKeyPath = request.nextChunkId++), + (prevImplicitSlot = logRecoverableError(request, value, task)), + emitErrorChunk(request, prevKeyPath, prevImplicitSlot), + (JSCompiler_inline_result = parentPropertyName + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath)); + } + return JSCompiler_inline_result; + }, + thenableState: null + }; + abortSet.add(task); + return task; +} +function serializeByValueID(id) { + return "$" + id.toString(16); +} +function serializeLazyID(id) { + return "$L" + id.toString(16); +} +function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + return id.toString(16) + ":" + request + "\n"; +} +function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference +) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var config = request.bundlerConfig, + modulePath = clientReference.$$id; + existingId = ""; + var resolvedModuleData = config[modulePath]; + if (resolvedModuleData) existingId = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((existingId = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + var JSCompiler_inline_result = + !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, existingId, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, existingId]; + request.pendingChunks++; + var importId = request.nextChunkId++, + json = stringify(JSCompiler_inline_result), + processedChunk = importId.toString(16) + ":I" + json + "\n"; + request.completedImportChunks.push(processedChunk); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName), + serializeByValueID(parent) + ); + } +} +function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks + ); + retryTask(request, value); + return value.id; +} +function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); +} +function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener("abort", abortBlob), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener("abort", abortBlob), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask(request, model, null, !1, 0, request.abortableTasks), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); +} +var modelRoot = !1; +function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value +) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var existingReference = writtenObjects.get(value); + if (void 0 !== existingReference) + if (modelRoot === value) modelRoot = null; + else return existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((parent = writtenObjects.get(parent)), + void 0 !== parent && + ((elementReference = parent + ":" + parentPropertyName), + writtenObjects.set(value, elementReference))); + } + if (3200 < serializedSize) return deferTask(request, task); + parentPropertyName = value.props; + parent = parentPropertyName.ref; + request = renderElement( + request, + task, + value.type, + value.key, + void 0 !== parent ? parent : null, + parentPropertyName + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (writtenObjects.has(request) || + writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (3200 < serializedSize) return deferTask(request, task); + task.thenableState = null; + parentPropertyName = value._init; + value = parentPropertyName(value._payload); + if (12 === request.status) throw null; + return renderModelDestructive(request, task, emptyRoot, "", value); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = request.writtenObjects; + writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return "$@" + serializeThenable(request, task, value).toString(16); + if (modelRoot === value) modelRoot = null; + else return writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== writtenObjects) + if (modelRoot === value) { + if (writtenObjects !== serializeByValueID(task.id)) + return writtenObjects; + modelRoot = null; + } else return writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((writtenObjects = elementReference.get(parent)), + void 0 !== writtenObjects) + ) { + existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + existingReference = "type"; + break; + case "2": + existingReference = "key"; + break; + case "3": + existingReference = "props"; + break; + case "4": + existingReference = "_owner"; + } + elementReference.set(value, writtenObjects + ":" + existingReference); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) + return ( + (value = Array.from(value)), + "$Q" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Set) + return ( + (value = Array.from(value)), + "$W" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + outlineModelWithFormatContext(request, value, 0).toString(16) + ); + if (value instanceof Error) return "$Z"; + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (parentPropertyName = elementReference.call(value)), + parentPropertyName === value + ? ((value = Array.from(parentPropertyName)), + "$i" + + outlineModelWithFormatContext(request, value, 0).toString(16)) + : renderFragment(request, task, Array.from(parentPropertyName)) + ); + if ("function" === typeof ReadableStream && value instanceof ReadableStream) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return ( + null !== task.keyPath + ? ((request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: value } + ]), + (request = task.implicitSlot ? [request] : request)) + : ((parentPropertyName = elementReference.call(value)), + (request = serializeAsyncIterable( + request, + task, + value, + parentPropertyName + ))), + request + ); + if (value instanceof Date) return "$D" + value.toJSON(); + request = getPrototypeOf(value); + if ( + request !== ObjectPrototype && + (null === request || null !== getPrototypeOf(request)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + return value; + } + if ("string" === typeof value) { + serializedSize += value.length; + if ( + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ) + return "$D" + value; + if (1024 <= value.length && null !== byteLengthOfChunk) + return ( + request.pendingChunks++, + (task = request.nextChunkId++), + emitTextChunk(request, task, value, !1), + serializeByValueID(task) + ); + request = "$" === value[0] ? "$" + value : value; + return request; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) + return Number.isFinite(value) + ? 0 === value && -Infinity === 1 / value + ? "$-0" + : value + : Infinity === value + ? "$Infinity" + : -Infinity === value + ? "$-Infinity" + : "$NaN"; + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (value.$$typeof === CLIENT_REFERENCE_TAG$1) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return ( + (task = request.writtenServerReferences), + (parentPropertyName = task.get(value)), + void 0 !== parentPropertyName + ? (request = "$F" + parentPropertyName.toString(16)) + : ((parentPropertyName = value.$$bound), + (parentPropertyName = + null === parentPropertyName + ? null + : Promise.resolve(parentPropertyName)), + (request = outlineModelWithFormatContext( + request, + { id: value.$$id, bound: parentPropertyName }, + 0 + )), + task.set(value, request), + (request = "$F" + request.toString(16))), + request + ); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), void 0 !== request) + ) + return "$T" + request; + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + parentPropertyName = request.nextChunkId++; + parent = encodeReferenceChunk( + request, + parentPropertyName, + "$S" + elementReference + ); + request.completedImportChunks.push(parent); + task.set(value, parentPropertyName); + return serializeByValueID(parentPropertyName); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); +} +function logRecoverableError(request, error) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var errorDigest = requestStorage.run(void 0, request.onError, error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; +} +function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + null !== request.destination + ? ((request.status = 14), request.destination.destroy(error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); +} +function emitErrorChunk(request, id, digest) { + digest = { digest: digest }; + id = id.toString(16) + ":E" + stringify(digest) + "\n"; + request.completedErrorChunks.push(id); +} +function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + typedArray = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + debug = typedArray.byteLength; + id = id.toString(16) + ":" + tag + debug.toString(16) + ","; + request.completedRegularChunks.push(id, typedArray); +} +function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + debug = byteLengthOfChunk(text); + id = id.toString(16) + ":T" + debug.toString(16) + ","; + request.completedRegularChunks.push(id, text); +} +function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? emitTextChunk(request, id, value, !1) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk(request, id, "m", value, !1) + : value instanceof DataView + ? emitTypedArrayChunk(request, id, "V", value, !1) + : ((value = stringify(value, task.toJSON)), + (task = + task.id.toString(16) + ":" + value + "\n"), + request.completedRegularChunks.push(task)); +} +function erroredTask(request, task, error) { + task.status = 4; + error = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, error); + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); +} +var emptyRoot = {}; +function retryTask(request, task) { + if (0 === task.status) { + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set(resolvedModel, serializeByValueID(task.id)), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel), + processedChunk = task.id.toString(16) + ":" + json + "\n"; + request.completedRegularChunks.push(processedChunk); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (12 === request.status) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + serializedSize = parentSerializedSize; + } + } +} +function tryStreamTask(request, task) { + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + serializedSize = parentSerializedSize; + } +} +function performWork(request) { + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } +} +function abortTask(task) { + 0 === task.status && (task.status = 3); +} +function finishAbortedTask(task, request, errorId) { + 3 === task.status && + ((errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); +} +function haltTask(task) { + 0 === task.status && (task.status = 3); +} +function finishHaltedTask(task, request) { + 3 === task.status && request.pendingChunks--; +} +function flushCompletedChunks(request) { + var destination = request.destination; + if (null !== destination) { + currentView = new Uint8Array(4096); + writtenBytes = 0; + destinationHasCapacity = !0; + try { + for ( + var importsChunks = request.completedImportChunks, i = 0; + i < importsChunks.length; + i++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(destination, importsChunks[i])) + ) { + request.destination = null; + i++; + break; + } + importsChunks.splice(0, i); + var hintChunks = request.completedHintChunks; + for (i = 0; i < hintChunks.length; i++) + if (!writeChunkAndReturn(destination, hintChunks[i])) { + request.destination = null; + i++; + break; + } + hintChunks.splice(0, i); + var regularChunks = request.completedRegularChunks; + for (i = 0; i < regularChunks.length; i++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(destination, regularChunks[i])) + ) { + request.destination = null; + i++; + break; + } + regularChunks.splice(0, i); + var errorChunks = request.completedErrorChunks; + for (i = 0; i < errorChunks.length; i++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(destination, errorChunks[i])) + ) { + request.destination = null; + i++; + break; + } + errorChunks.splice(0, i); + } finally { + (request.flushScheduled = !1), + currentView && + 0 < writtenBytes && + destination.write(currentView.subarray(0, writtenBytes)), + (currentView = null), + (writtenBytes = 0), + (destinationHasCapacity = !0); + } + "function" === typeof destination.flush && destination.flush(); + } + 0 === request.pendingChunks && + (12 > request.status && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = 14), + request.destination.end(), + (request.destination = null))); +} +function startWork(request) { + request.flushScheduled = null !== request.destination; + scheduleMicrotask(function () { + requestStorage.run(request, performWork, request); + }); + setImmediate(function () { + 10 === request.status && (request.status = 11); + }); +} +function enqueueFlush(request) { + !1 === request.flushScheduled && + 0 === request.pingedTasks.length && + null !== request.destination && + ((request.flushScheduled = !0), + setImmediate(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + })); +} +function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); +} +function startFlowing(request, destination) { + if (13 === request.status) + (request.status = 14), destination.destroy(request.fatalError); + else if (14 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} +function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } +} +function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = 12; + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + setImmediate(function () { + return finishHalt(request, abortableTasks); + }); + else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + errorId = request.nextChunkId++; + request.fatalError = errorId; + request.pendingChunks++; + emitErrorChunk(request, errorId, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, errorId); + }); + setImmediate(function () { + return finishAbort(request, abortableTasks, errorId); + }); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$23) { + logRecoverableError(request, error$23, null), + fatalError(request, error$23); + } +} +function resolveServerReference(bundlerConfig, id) { + var idx = id.lastIndexOf("#"); + bundlerConfig = id.slice(0, idx); + id = id.slice(idx + 1); + return { specifier: bundlerConfig, name: id }; +} +var asyncModuleCache = new Map(); +function preloadModule(metadata) { + var existingPromise = asyncModuleCache.get(metadata.specifier); + if (existingPromise) + return "fulfilled" === existingPromise.status ? null : existingPromise; + var modulePromise = import(metadata.specifier); + metadata.async && + (modulePromise = modulePromise.then(function (value) { + return value.default; + })); + modulePromise.then( + function (value) { + var fulfilledThenable = modulePromise; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = value; + }, + function (reason) { + var rejectedThenable = modulePromise; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = reason; + } + ); + asyncModuleCache.set(metadata.specifier, modulePromise); + return modulePromise; +} +function requireModule(metadata) { + var moduleExports = asyncModuleCache.get(metadata.specifier); + if ("fulfilled" === moduleExports.status) moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata.name + ? moduleExports + : "" === metadata.name + ? moduleExports.default + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata.name) ? moduleExports[metadata.name] : void 0); +} +function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; +} +Chunk.prototype = Object.create(Promise.prototype); +Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), this.reason.push(reject)); + break; + default: + reject(this.reason); + } +}; +function createPendingChunk(response) { + return new Chunk("pending", null, null, response); +} +function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); +} +function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } +} +function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } +} +function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1, + response + ); +} +function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}", + -1 + ); +} +function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key +) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; +} +function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString(response, parentObj, parentKey, value, reference); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel(response, value, i, value[i], parentObj)), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; +} +var initializingChunk = null, + initializingChunkBlockedModel = null; +function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } +} +function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); +} +function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; +} +function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path +) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && null === blocked.value && (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; +} +function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; +} +function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } +} +function createMap(response, model) { + return new Map(model); +} +function createSet(response, model) { + return new Set(model); +} +function extractIterator(response, model) { + return model[Symbol.iterator](); +} +function createModel(response, model) { + return model; +} +function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey +) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; +} +function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close("C" === chunks ? '"$undefined"' : chunks.slice(1)) + : controller.enqueueModel(chunks); +} +function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var chunk$26 = createPendingChunk(response); + chunk$26.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = chunk$26; + chunk.then(function () { + previousBlockedChunk === chunk$26 && (previousBlockedChunk = null); + resolveModelChunk(chunk$26, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; +} +function asyncIterator() { + return this; +} +function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; +} +function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + $jscomp$compprop2 = {}; + $jscomp$compprop2 = + (($jscomp$compprop2[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }), + $jscomp$compprop2); + iterator = iterator ? $jscomp$compprop2[ASYNC_ITERATOR]() : $jscomp$compprop2; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; +} +function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return (obj = parseInt(value.slice(2), 16)), getChunk(response, obj); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel(response, value, obj, key, createModel)), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if (void 0 === reference || void 0 === response._temporaryReferences) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray(response, value, Uint8ClampedArray, 1, obj, key); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray(response, value, BigUint64Array, 8, obj, key); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; +} +function createResponse(bundlerConfig, formFieldPrefix, temporaryReferences) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; +} +function resolveField(response, key, value) { + response._formData.append(key, value); + var prefix = response._prefix; + key.startsWith(prefix) && + ((response = response._chunks), + (key = +key.slice(prefix.length)), + (prefix = response.get(key)) && resolveModelChunk(prefix, value, key)); +} +function close(response) { + reportGlobalError(response, Error("Connection closed.")); +} +function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); +} +function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; +} +function createDrainHandler(destination, request) { + return function () { + return startFlowing(request, destination); + }; +} +function createCancelHandler(request, reason) { + return function () { + request.destination = null; + abort(request, Error(reason)); + }; +} +function createFakeWritableFromReadableStreamController(controller) { + return { + write: function (chunk) { + "string" === typeof chunk && (chunk = textEncoder.encode(chunk)); + controller.enqueue(chunk); + return !0; + }, + end: function () { + controller.close(); + }, + destroy: function (error) { + "function" === typeof controller.error + ? controller.error(error) + : controller.close(); + } + }; +} +function createFakeWritableFromNodeReadable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; +} +exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); +}; +exports.createTemporaryReferenceSet = function () { + return new WeakMap(); +}; +exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference(serverManifest, value.id, value.bound))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); +}; +exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); +}; +exports.decodeReply = function (body, webpackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + webpackMap = getChunk(body, 0); + close(body); + return webpackMap; +}; +exports.decodeReplyFromAsyncIterable = function ( + iterable, + webpackMap, + options +) { + function progress(entry) { + if (entry.done) close(response); + else { + var _entry$value = entry.value; + entry = _entry$value[0]; + _entry$value = _entry$value[1]; + "string" === typeof _entry$value + ? resolveField(response, entry, _entry$value) + : response._formData.append(entry, _entry$value); + iterator.next().then(progress, error); + } + } + function error(reason) { + reportGlobalError(response, reason); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + var iterator = iterable[ASYNC_ITERATOR](), + response = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0 + ); + iterator.next().then(progress, error); + return getChunk(response, 0); +}; +exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) { + var response = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0 + ), + pendingFiles = 0, + queuedFields = []; + busboyStream.on("field", function (name, value) { + 0 < pendingFiles + ? queuedFields.push(name, value) + : resolveField(response, name, value); + }); + busboyStream.on("file", function (name, value, _ref2) { + var filename = _ref2.filename, + mimeType = _ref2.mimeType; + if ("base64" === _ref2.encoding.toLowerCase()) + throw Error( + "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it." + ); + pendingFiles++; + var JSCompiler_object_inline_chunks_274 = []; + value.on("data", function (chunk) { + JSCompiler_object_inline_chunks_274.push(chunk); + }); + value.on("end", function () { + var blob = new Blob(JSCompiler_object_inline_chunks_274, { + type: mimeType + }); + response._formData.append(name, blob, filename); + pendingFiles--; + if (0 === pendingFiles) { + for (blob = 0; blob < queuedFields.length; blob += 2) + resolveField(response, queuedFields[blob], queuedFields[blob + 1]); + queuedFields.length = 0; + } + }); + }); + busboyStream.on("finish", function () { + close(response); + }); + busboyStream.on("error", function (err) { + reportGlobalError(response, err); + }); + return getChunk(response, 0); +}; +exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + 21, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + function () { + var writable, + stream = new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = + createFakeWritableFromReadableStreamController(controller); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; +exports.prerenderToNodeStream = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + 21, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritableFromNodeReadable(readable); + resolve({ prelude: readable }); + }, + reject, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; +exports.registerClientReference = function ( + proxyImplementation, + id, + exportName +) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); +}; +exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); +}; +exports.renderToPipeableStream = function (model, webpackMap, options) { + var request = new RequestInstance( + 20, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + noop, + noop, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ), + hasStartedFlowing = !1; + startWork(request); + return { + pipe: function (destination) { + if (hasStartedFlowing) + throw Error( + "React currently only supports piping to one writable stream." + ); + hasStartedFlowing = !0; + startFlowing(request, destination); + destination.on("drain", createDrainHandler(destination, request)); + destination.on( + "error", + createCancelHandler( + request, + "The destination stream errored while writing data." + ) + ); + destination.on( + "close", + createCancelHandler(request, "The destination stream closed early.") + ); + return destination; + }, + abort: function (reason) { + abort(request, reason); + } + }; +}; +exports.renderToReadableStream = function (model, webpackMap, options) { + var request = new RequestInstance( + 20, + model, + webpackMap, + options ? options.onError : void 0, + options ? options.onPostpone : void 0, + noop, + noop, + options ? options.identifierPrefix : void 0, + options ? options.temporaryReferences : void 0 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + var writable; + return new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = createFakeWritableFromReadableStreamController(controller); + startWork(request); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); +}; diff --git a/.socket/blob/264b99915e50e84b71b3d5747126f97f1a584f71d5cfabb8233b527904039ed8 b/.socket/blob/264b99915e50e84b71b3d5747126f97f1a584f71d5cfabb8233b527904039ed8 new file mode 100644 index 0000000..043e528 --- /dev/null +++ b/.socket/blob/264b99915e50e84b71b3d5747126f97f1a584f71d5cfabb8233b527904039ed8 @@ -0,0 +1,47 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +(()=>{var e={"./dist/build/webpack/alias/react-dom-server-experimental.js":function(e,t,r){"use strict";var n;function i(){throw Object.defineProperty(Error("Internal Error: do not use legacy react-dom/server APIs. If you encountered this error, please open an issue on the Next.js repo."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}t.version=(n=r("./dist/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js")).version,t.renderToReadableStream=n.renderToReadableStream,t.renderToString=i,t.renderToStaticMarkup=i,n.resume&&(t.resume=n.resume)},"./dist/compiled/@edge-runtime/cookies/index.js":function(e){"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={},o={RequestCookies:()=>p,ResponseCookies:()=>h,parseCookie:()=>u,parseSetCookie:()=>c,stringifyCookie:()=>l};for(var s in o)t(a,s,{get:o[s],enumerable:!0});function l(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function u(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,i]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=i?i:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...n]=u(e),{domain:i,expires:a,httponly:o,maxage:s,path:l,samesite:c,secure:p,partitioned:h,priority:m}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,y,v={name:t,value:decodeURIComponent(r),domain:i,...a&&{expires:new Date(a)},...o&&{httpOnly:!0},..."string"==typeof s&&{maxAge:Number(s)},path:l,...c&&{sameSite:d.includes(g=(g=c).toLowerCase())?g:void 0},...p&&{secure:!0},...m&&{priority:f.includes(y=(y=m).toLowerCase())?y:void 0},...h&&{partitioned:!0}};let e={};for(let t in v)v[t]&&(e[t]=v[t]);return e}}e.exports=((e,a,o,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))i.call(e,l)||l===o||t(e,l,{get:()=>a[l],enumerable:!(s=r(a,l))||s.enumerable});return e})(t({},"__esModule",{value:!0}),a);var d=["strict","lax","none"],f=["low","medium","high"],p=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,r]of u(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>l(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>l(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},h=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;let i=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(let e of Array.isArray(i)?i:function(e){if(!e)return[];var t,r,n,i,a,o=[],s=0;function l(){for(;s=e.length)&&o.push(e.substring(t,e.length))}return o}(i)){let t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=l(r);t.append("set-cookie",e)}}(i,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(l).join("; ")}}},"./dist/compiled/busboy/index.js":function(e,t,r){!function(){"use strict";var t={900:function(e,t,r){let{parseContentType:n}=r(318),i=[r(104),r(506)].filter(function(e){return"function"==typeof e.detect});e.exports=e=>{if(("object"!=typeof e||null===e)&&(e={}),"object"!=typeof e.headers||null===e.headers||"string"!=typeof e.headers["content-type"])throw Error("Missing Content-Type");var t=e;let r=t.headers,a=n(r["content-type"]);if(!a)throw Error("Malformed content type");for(let e of i){if(!e.detect(a))continue;let n={limits:t.limits,headers:r,conType:a,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return t.highWaterMark&&(n.highWaterMark=t.highWaterMark),t.fileHwm&&(n.fileHwm=t.fileHwm),n.defCharset=t.defCharset,n.defParamCharset=t.defParamCharset,n.preservePath=t.preservePath,new e(n)}throw Error(`Unsupported content type: ${r["content-type"]}`)}},104:function(e,t,r){let{Readable:n,Writable:i}=r(781),a=r(542),{basename:o,convertToUTF8:s,getDecoder:l,parseContentType:u,parseDisposition:c}=r(318),d=Buffer.from("\r\n"),f=Buffer.from("\r"),p=Buffer.from("-");function h(){}class m{constructor(e){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0,this.cb=e}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0}push(e,t,r){let n=t;for(;t{if(this._read(),0==--t._fileEndsLeft&&t._finalcb){let e=t._finalcb;t._finalcb=null,process.nextTick(e)}})}_read(e){let t=this._readcb;t&&(this._readcb=null,t())}}let y={push:(e,t)=>{},destroy:()=>{}};function v(e,t){return e}function b(e,t,r){if(r)return t(r);t(r=w(e))}function w(e){if(e._hparser)return Error("Malformed part header");let t=e._fileStream;if(t&&(e._fileStream=null,t.destroy(Error("Unexpected end of file"))),!e._complete)return Error("Unexpected end of form")}let S=[0,0,0,0,0,0,0,0,0,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,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];e.exports=class extends i{constructor(e){let t,r,n,i,b;if(super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.highWaterMark?e.highWaterMark:void 0}),!e.conType.params||"string"!=typeof e.conType.params.boundary)throw Error("Multipart: Boundary not found");let w=e.conType.params.boundary,S="string"==typeof e.defParamCharset&&e.defParamCharset?l(e.defParamCharset):v,_=e.defCharset||"utf8",k=e.preservePath,E={autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.fileHwm?e.fileHwm:void 0},x=e.limits,R=x&&"number"==typeof x.fieldSize?x.fieldSize:1048576,C=x&&"number"==typeof x.fileSize?x.fileSize:1/0,T=x&&"number"==typeof x.files?x.files:1/0,P=x&&"number"==typeof x.fields?x.fields:1/0,A=x&&"number"==typeof x.parts?x.parts:1/0,O=-1,j=0,$=0,I=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let D=0,N=0,M=!1,L=!1,F=!1;this._hparser=null;let U=new m(e=>{let a;if(this._hparser=null,I=!1,i="text/plain",r=_,n="7bit",b=void 0,M=!1,!e["content-disposition"]){I=!0;return}let s=c(e["content-disposition"][0],S);if(!s||"form-data"!==s.type){I=!0;return}if(s.params&&(s.params.name&&(b=s.params.name),s.params["filename*"]?a=s.params["filename*"]:s.params.filename&&(a=s.params.filename),void 0===a||k||(a=o(a))),e["content-type"]){let t=u(e["content-type"][0]);t&&(i=`${t.type}/${t.subtype}`,t.params&&"string"==typeof t.params.charset&&(r=t.params.charset.toLowerCase()))}if(e["content-transfer-encoding"]&&(n=e["content-transfer-encoding"][0].toLowerCase()),"application/octet-stream"===i||void 0!==a){if($===T){L||(L=!0,this.emit("filesLimit")),I=!0;return}if(++$,0===this.listenerCount("file")){I=!0;return}D=0,this._fileStream=new g(E,this),++this._fileEndsLeft,this.emit("file",b,this._fileStream,{filename:a,encoding:n,mimeType:i})}else{if(j===P){F||(F=!0,this.emit("fieldsLimit")),I=!0;return}if(++j,0===this.listenerCount("field")){I=!0;return}t=[],N=0}}),H=0,B=(e,a,o,l,u)=>{for(;a;){if(null!==this._hparser){let e=this._hparser.push(a,o,l);if(-1===e){this._hparser=null,U.reset(),this.emit("error",Error("Malformed part header"));break}o=e}if(o===l)break;if(0!==H){if(1===H){switch(a[o]){case 45:H=2,++o;break;case 13:H=3,++o;break;default:H=0}if(o===l)return}if(2===H){if(H=0,45===a[o]){this._complete=!0,this._bparser=y;return}let e=this._writecb;this._writecb=h,B(!1,p,0,1,!1),this._writecb=e}else if(3===H){if(H=0,10===a[o]){if(++o,O>=A||(this._hparser=U,o===l))break;continue}{let e=this._writecb;this._writecb=h,B(!1,f,0,1,!1),this._writecb=e}}}if(!I){if(this._fileStream){let e,t=Math.min(l-o,C-D);u?e=a.slice(o,o+t):(e=Buffer.allocUnsafe(t),a.copy(e,0,o,o+t)),(D+=e.length)===C?(e.length>0&&this._fileStream.push(e),this._fileStream.emit("limit"),this._fileStream.truncated=!0,I=!0):this._fileStream.push(e)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if(void 0!==t){let e,r=Math.min(l-o,R-N);u?e=a.slice(o,o+r):(e=Buffer.allocUnsafe(r),a.copy(e,0,o,o+r)),N+=r,t.push(e),N===R&&(I=!0,M=!0)}}break}if(e){if(H=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if(void 0!==t){let e;switch(t.length){case 0:e="";break;case 1:e=s(t[0],r,0);break;default:e=s(Buffer.concat(t,N),r,0)}t=void 0,N=0,this.emit("field",b,e,{nameTruncated:!1,valueTruncated:M,encoding:n,mimeType:i})}++O===A&&this.emit("partsLimit")}};this._bparser=new a(`\r +--${w}`,B),this._writecb=null,this._finalcb=null,this.write(d)}static detect(e){return"multipart"===e.type&&"form-data"===e.subtype}_write(e,t,r){this._writecb=r,this._bparser.push(e,0),this._writecb&&function(e,t){let r=e._writecb;e._writecb=null,r&&r()}(this)}_destroy(e,t){this._hparser=null,this._bparser=y,e||(e=w(this));let r=this._fileStream;r&&(this._fileStream=null,r.destroy(e)),t(e)}_final(e){if(this._bparser.destroy(),!this._complete)return e(Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=b.bind(null,this,e):b(this,e)}}},506:function(e,t,r){let{Writable:n}=r(781),{getDecoder:i}=r(318);function a(e,t,r,n){if(r>=n)return n;if(-1===e._byte){let i=l[t[r++]];if(-1===i)return -1;if(i>=8&&(e._encode=2),re.fieldNameSizeLimit){for(!e._keyTrunc&&e._lastPose.fieldSizeLimit){for(!e._valTrunc&&e._lastPos=this.fieldsLimit)return r();let n=0,i=e.length;if(this._lastPos=0,-2!==this._byte){if(-1===(n=a(this,e,n,i)))return r(Error("Malformed urlencoded form"));if(n>=i)return r();this._inKey?++this._bytesKey:++this._bytesVal}e:for(;n0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),r();continue;case 43:this._lastPos=i)return r();++this._bytesKey,n=o(this,e,n,i);continue}++n,++this._bytesKey,n=o(this,e,n,i)}this._lastPos0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),r();continue e;case 43:this._lastPos=i)return r();++this._bytesVal,n=s(this,e,n,i);continue}++n,++this._bytesVal,n=s(this,e,n,i)}this._lastPos0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),e()}}},318:function(e){function t(e){let t;for(;;)switch(e){case"utf-8":case"utf8":return r.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return r.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return r.utf16le;case"base64":return r.base64;default:if(void 0===t){t=!0,e=e.toLowerCase();continue}return r.other.bind(e)}}let r={utf8:(e,t)=>{if(0===e.length)return"";if("string"==typeof e){if(t<2)return e;e=Buffer.from(e,"latin1")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>0===e.length?"":"string"==typeof e?e:e.latin1Slice(0,e.length),utf16le:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.ucs2Slice(0,e.length)),base64:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.base64Slice(0,e.length)),other:(e,t)=>{if(0===e.length)return"";"string"==typeof e&&(e=Buffer.from(e,"latin1"));try{return new TextDecoder(this).decode(e)}catch{}}};function n(e,r,n){let i=t(r);if(i)return i(e,n)}let i=[0,0,0,0,0,0,0,0,0,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,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],o=[0,0,0,0,0,0,0,0,0,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,0,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=[0,0,0,0,0,0,0,0,0,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,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];e.exports={basename:function(e){if("string"!=typeof e)return"";for(let t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return".."===(e=e.slice(t+1))||"."===e?"":e}return".."===e||"."===e?"":e},convertToUTF8:n,getDecoder:t,parseContentType:function(e){if(0===e.length)return;let t=Object.create(null),r=0;for(;r=128?i=2:0===i&&(i=1);continue}return}break}}if(h+=e.slice(d,t),void 0===(h=n(h,f,i)))return}else{if(++t===e.length)return;if(34===e.charCodeAt(t)){d=++t;let r=!1;for(;t1)for(let t=0;t-e._lookbehindSize?e._cb(!0,f,0,e._lookbehindSize+s,!1):e._cb(!0,void 0,0,0,!0),e._bufPos=s+o;s+=d[i]}for(;s<0&&!r(e,n,s,i-s);)++s;if(s<0){let t=e._lookbehindSize+s;return t>0&&e._cb(!1,f,0,t,!1),e._lookbehindSize-=t,f.copy(f,0,t,e._lookbehindSize),f.set(n,e._lookbehindSize),e._lookbehindSize+=i,e._bufPos=i,i}e._cb(!1,f,0,e._lookbehindSize,!1),e._lookbehindSize=0}s+=e._bufPos;let p=a[0];for(;s<=c;){let r=n[s+l];if(r===u&&n[s]===p&&t(a,0,n,s,l))return++e.matches,s>0?e._cb(!0,n,e._bufPos,s,!0):e._cb(!0,void 0,0,0,!0),e._bufPos=s+o;s+=d[r]}for(;s0&&e._cb(!1,n,e._bufPos,s{"use strict";var t={56:e=>{e.exports=function(e,t){return"string"==typeof e?o(e):"number"==typeof e?a(e,t):null},e.exports.format=a,e.exports.parse=o;var t=/\B(?=(\d{3})+(?!\d))/g,r=/(?:\.0*|(\.[^0]+)0+)$/,n={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},i=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function a(e,i){if(!Number.isFinite(e))return null;var a=Math.abs(e),o=i&&i.thousandsSeparator||"",s=i&&i.unitSeparator||"",l=i&&void 0!==i.decimalPlaces?i.decimalPlaces:2,u=!!(i&&i.fixedDecimals),c=i&&i.unit||"";c&&n[c.toLowerCase()]||(c=a>=n.pb?"PB":a>=n.tb?"TB":a>=n.gb?"GB":a>=n.mb?"MB":a>=n.kb?"KB":"B");var d=(e/n[c.toLowerCase()]).toFixed(l);return u||(d=d.replace(r,"$1")),o&&(d=d.split(".").map(function(e,r){return 0===r?e.replace(t,o):e}).join(".")),d+s+c}function o(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,r=i.exec(e),a="b";return r?(t=parseFloat(r[1]),a=r[4].toLowerCase()):(t=parseInt(e,10),a="b"),Math.floor(n[a]*t)}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}},o=!0;try{t[e](a,a.exports,n),o=!1}finally{o&&delete r[e]}return a.exports}n.ab=__dirname+"/",e.exports=n(56)})()},"./dist/compiled/cookie/index.js":function(e){(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t,r,n,i,a={};a.parse=function(e,r){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var i={},a=e.split(n),o=(r||{}).decode||t,s=0;s{"use strict";var t={993:e=>{var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,o){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new i(n,a||e,o),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{e.exports=(e,t)=>(t=t||(()=>{}),e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e})))},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){let n=0,i=e.length;for(;i>0;){let a=i/2|0,o=n+a;0>=r(e[o],t)?(n=++o,i-=a+1):i=a}return n}},821:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});let n=r(574);t.default=class{constructor(){this._queue=[]}enqueue(e,t){let r={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)return void this._queue.push(r);let i=n.default(this._queue,r,(e,t)=>t.priority-e.priority);this._queue.splice(i,0,r)}dequeue(){let e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this._queue.length}}},816:(e,t,r)=>{let n=r(213);class i extends Error{constructor(e){super(e),this.name="TimeoutError"}}let a=(e,t,r)=>new Promise((a,o)=>{if("number"!=typeof t||t<0)throw TypeError("Expected `milliseconds` to be a positive number");if(t===1/0)return void a(e);let s=setTimeout(()=>{if("function"==typeof r){try{a(r())}catch(e){o(e)}return}let n="string"==typeof r?r:`Promise timed out after ${t} milliseconds`,s=r instanceof Error?r:new i(n);"function"==typeof e.cancel&&e.cancel(),o(s)},t);n(e.then(a,o),()=>{clearTimeout(s)})});e.exports=a,e.exports.default=a,e.exports.TimeoutError=i}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}},o=!0;try{t[e](a,a.exports,n),o=!1}finally{o&&delete r[e]}return a.exports}n.ab=__dirname+"/";var i={};(()=>{Object.defineProperty(i,"__esModule",{value:!0});let e=n(993),t=n(816),r=n(821),a=()=>{},o=new t.TimeoutError;i.default=class extends e{constructor(e){var t,n,i,o;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=a,this._resolveIdle=a,!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},e)).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!=(n=null==(t=e.intervalCap)?void 0:t.toString())?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!=(o=null==(i=e.interval)?void 0:i.toString())?o:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()},t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,r={}){return new Promise((n,i)=>{let a=async()=>{this._pendingCount++,this._intervalCount++;try{let a=void 0===this._timeout&&void 0===r.timeout?e():t.default(Promise.resolve(e()),void 0===r.timeout?this._timeout:r.timeout,()=>{(void 0===r.throwOnTimeout?this._throwOnTimeout:r.throwOnTimeout)&&i(o)});n(await a)}catch(e){i(e)}this._next()};this._queue.enqueue(a,r),this._tryToStartAnother(),this.emit("add")})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this._isPaused&&(this._isPaused=!1,this._processQueue()),this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise(e=>{let t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(e=>{let t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}})(),e.exports=i})()},"./dist/compiled/path-to-regexp/index.js":function(e){(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{function e(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o){i+=e[a++];continue}break}if(!i)throw TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=a;continue}if("("===n){var s=1,l="",a=r+1;if("?"===e[a])throw TypeError('Pattern cannot start with "?" at '.concat(a));for(;a-1)return!0}return!1},g=function(e){var t=l[l.length-1],r=e||(t&&"string"==typeof t?t:"");if(t&&!r)throw TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!r||m(r)?"[^".concat(i(s),"]+?"):"(?:(?!".concat(i(r),")[^").concat(i(s),"])+?")};c-1:void 0===S;o||(m+="(?:".concat(h,"(?=").concat(p,"))?")),_||(m+="(?=".concat(h,"|").concat(p,")"))}return new RegExp(m,a(r))}function s(t,r,n){if(t instanceof RegExp){var i;if(!r)return t;for(var l=/\((?:\?<(.*?)>)?(?!\?)/g,u=0,c=l.exec(t.source);c;)r.push({name:c[1]||u++,prefix:"",suffix:"",modifier:"",pattern:""}),c=l.exec(t.source);return t}return Array.isArray(t)?(i=t.map(function(e){return s(e,r,n).source}),new RegExp("(?:".concat(i.join("|"),")"),a(n))):o(e(t,n),r,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.pathToRegexp=t.tokensToRegexp=t.regexpToFunction=t.match=t.tokensToFunction=t.compile=t.parse=void 0,t.parse=e,t.compile=function(t,n){return r(e(t,n),n)},t.tokensToFunction=r,t.match=function(e,t){var r=[];return n(s(e,r,t),r,t)},t.regexpToFunction=n,t.tokensToRegexp=o,t.pathToRegexp=s})(),e.exports=t})()},"./dist/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js":function(e,t,r){"use strict";var n,i,a=r("util"),o=r("crypto"),s=r("async_hooks"),l=r("./dist/compiled/react-experimental/index.js"),u=r("./dist/compiled/react-dom-experimental/index.js"),c=r("stream"),d=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),y=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),k=Symbol.for("react.scope"),E=Symbol.for("react.activity"),x=Symbol.for("react.legacy_hidden"),R=Symbol.for("react.memo_cache_sentinel"),C=Symbol.for("react.postpone"),T=Symbol.for("react.view_transition"),P=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=P&&e[P]||e["@@iterator"])?e:null}var O=Symbol.asyncIterator,j=Array.isArray,$=queueMicrotask;function I(e){"function"==typeof e.flush&&e.flush()}var D=null,N=0,M=!0;function L(e,t){if("string"==typeof t){if(0!==t.length)if(4096<3*t.length)0]/;function ee(e){if("boolean"==typeof e||"number"==typeof e||"bigint"==typeof e)return""+e;e=""+e;var t=Z.exec(e);if(t){var r,n="",i=0;for(r=t.index;r; rel=dns-prefetch",n=0<=(i.remainingCapacity-=r.length+2)),n?(a.resets.dns[e]=null,i.preconnects&&(i.preconnects+=", "),i.preconnects+=r):(tt(r=[],{href:e,rel:"dns-prefetch"}),a.preconnects.add(r))),i4(t))}else el.D(e)},C:function(e,t){var r=ir();if(r){var n=r.resumableState,i=r.renderState;if("string"==typeof e&&e){var a,o,s="use-credentials"===t?"credentials":"string"==typeof t?"anonymous":"default";n.connectResources[s].hasOwnProperty(e)||(n.connectResources[s][e]=null,(o=(n=i.headers)&&0; rel=preconnect","string"==typeof t&&(o+='; crossorigin="'+(""+t).replace(r2,r4)+'"'),a=o,o=0<=(n.remainingCapacity-=a.length+2)),o?(i.resets.connect[s][e]=null,n.preconnects&&(n.preconnects+=", "),n.preconnects+=a):(tt(s=[],{rel:"preconnect",href:e,crossOrigin:t}),i.preconnects.add(s))),i4(r)}}else el.C(e,t)},L:function(e,t,r){var n=ir();if(n){var i=n.resumableState,a=n.renderState;if(t&&e){switch(t){case"image":if(r)var o,s=r.imageSrcSet,l=r.imageSizes,u=r.fetchPriority;var c=s?s+"\n"+(l||""):e;if(i.imageResources.hasOwnProperty(c))return;i.imageResources[c]=eu,(i=a.headers)&&0'),ef=z(""),eh=z('`,n=!1;return new TransformStream({transform(e,t){if(n)return void t.enqueue(e);let i=S(e,w.CLOSED.HEAD);if(-1===i)return void t.enqueue(e);let a=T.encode(r),o=new Uint8Array(e.length+a.length);o.set(e.slice(0,i)),o.set(a,i),o.set(e.slice(i),i+a.length),t.enqueue(o),n=!0}})}()).pipeThrough(M(n)).pipeThrough(F(t,!0)).pipeThrough(H())}async function G(e,{delayDataUntilFirstHtmlChunk:t,inlinedDataStream:r,getServerInsertedHTML:n,getServerInsertedMetadata:i}){return e.pipeThrough(I()).pipeThrough(L(n)).pipeThrough(M(i)).pipeThrough(F(r,t)).pipeThrough(H())}let V=Symbol.for("NextInternalRequestMeta");function X(e,t){let r=e[V]||{};return"string"==typeof t?r[t]:r}var J=r("./dist/esm/lib/constants.js");function K(e){for(let t of[J.AA,J.h])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}function Y(e,t,r){if(e){for(let n of(r&&(r=r.toLowerCase()),e))if(t===n.domain?.split(":",1)[0].toLowerCase()||r===n.defaultLocale.toLowerCase()||n.locales?.some(e=>e.toLowerCase()===r))return n}}var Q=r("./dist/esm/shared/lib/router/utils/remove-trailing-slash.js"),Z=r("./dist/esm/shared/lib/router/utils/add-path-prefix.js"),ee=r("./dist/esm/shared/lib/router/utils/parse-path.js");function et(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=(0,ee.R)(e);return`${r}${t}${n}${i}`}function er(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,ee.R)(e);return r===t||r.startsWith(t+"/")}function en(e,t){let r;if(t?.host&&!Array.isArray(t.host))r=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;r=e.hostname}return r.toLowerCase()}let ei=new WeakMap;function ea(e,t){let r;if(!t)return{pathname:e};let n=ei.get(t);n||(n=t.map(e=>e.toLowerCase()),ei.set(t,n));let i=e.split("/",2);if(!i[1])return{pathname:e};let a=i[1].toLowerCase(),o=n.indexOf(a);return o<0?{pathname:e}:(r=t[o],{pathname:e=e.slice(r.length+1)||"/",detectedLocale:r})}function eo(e,t){if(!er(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:`/${r}`}let es=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function el(e,t){return new URL(String(e).replace(es,"localhost"),t&&String(t).replace(es,"localhost"))}let eu=Symbol("NextURLInternal");class ec{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[eu]={url:el(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,n,i;let a=function(e,t){let{basePath:r,i18n:n,trailingSlash:i}=t.nextConfig??{},a={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):i};r&&er(a.pathname,r)&&(a.pathname=eo(a.pathname,r),a.basePath=r);let o=a.pathname;if(a.pathname.startsWith("/_next/data/")&&a.pathname.endsWith(".json")){let e=a.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/");a.buildId=e[0],o="index"!==e[1]?`/${e.slice(1).join("/")}`:"/",!0===t.parseData&&(a.pathname=o)}if(n){let e=t.i18nProvider?t.i18nProvider.analyze(a.pathname):ea(a.pathname,n.locales);a.locale=e.detectedLocale,a.pathname=e.pathname??a.pathname,!e.detectedLocale&&a.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(o):ea(o,n.locales)).detectedLocale&&(a.locale=e.detectedLocale)}return a}(this[eu].url.pathname,{nextConfig:this[eu].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[eu].options.i18nProvider}),o=en(this[eu].url,this[eu].options.headers);this[eu].domainLocale=this[eu].options.i18nProvider?this[eu].options.i18nProvider.detectDomainLocale(o):Y(null==(t=this[eu].options.nextConfig)||null==(e=t.i18n)?void 0:e.domains,o);let s=(null==(r=this[eu].domainLocale)?void 0:r.defaultLocale)||(null==(i=this[eu].options.nextConfig)||null==(n=i.i18n)?void 0:n.defaultLocale);this[eu].url.pathname=a.pathname,this[eu].defaultLocale=s,this[eu].basePath=a.basePath??"",this[eu].buildId=a.buildId,this[eu].locale=a.locale??s,this[eu].trailingSlash=a.trailingSlash}formatPathname(){var e;let t;return t=function(e,t,r,n){if(!t||t===r)return e;let i=e.toLowerCase();return!n&&(er(i,"/api")||er(i,`/${t.toLowerCase()}`))?e:(0,Z.B)(e,`/${t}`)}((e={basePath:this[eu].basePath,buildId:this[eu].buildId,defaultLocale:this[eu].options.forceLocale?void 0:this[eu].defaultLocale,locale:this[eu].locale,pathname:this[eu].url.pathname,trailingSlash:this[eu].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=(0,Q.U)(t)),e.buildId&&(t=et((0,Z.B)(t,`/_next/data/${e.buildId}`),"/"===e.pathname?"index.json":".json")),t=(0,Z.B)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:et(t,"/"):(0,Q.U)(t)}formatSearch(){return this[eu].url.search}get buildId(){return this[eu].buildId}set buildId(e){this[eu].buildId=e}get locale(){return this[eu].locale??""}set locale(e){var t,r;if(!this[eu].locale||!(null==(r=this[eu].options.nextConfig)||null==(t=r.i18n)?void 0:t.locales.includes(e)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${e}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[eu].locale=e}get defaultLocale(){return this[eu].defaultLocale}get domainLocale(){return this[eu].domainLocale}get searchParams(){return this[eu].url.searchParams}get host(){return this[eu].url.host}set host(e){this[eu].url.host=e}get hostname(){return this[eu].url.hostname}set hostname(e){this[eu].url.hostname=e}get port(){return this[eu].url.port}set port(e){this[eu].url.port=e}get protocol(){return this[eu].url.protocol}set protocol(e){this[eu].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[eu].url=el(e),this.analyze()}get origin(){return this[eu].url.origin}get pathname(){return this[eu].url.pathname}set pathname(e){this[eu].url.pathname=e}get hash(){return this[eu].url.hash}set hash(e){this[eu].url.hash=e}get search(){return this[eu].url.search}set search(e){this[eu].url.search=e}get password(){return this[eu].url.password}set password(e){this[eu].url.password=e}get username(){return this[eu].url.username}set username(e){this[eu].url.username=e}get basePath(){return this[eu].basePath}set basePath(e){this[eu].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new ec(String(this),this[eu].options)}}var ed=r("./dist/esm/server/web/spec-extension/cookies.js");Symbol("internal request"),Request,Symbol.for("edge-runtime.inspect.custom");let ef="ResponseAborted";class ep extends Error{constructor(...e){super(...e),this.name=ef}}let eh=0,em=0,eg=0;function ey(e={}){let t=0===eh?void 0:{clientComponentLoadStart:eh,clientComponentLoadTimes:em,clientComponentLoadCount:eg};return e.reset&&(eh=0,em=0,eg=0),t}function ev(e){return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.name)===ef}async function eb(e,t,r){try{let{errored:n,destroyed:i}=t;if(n||i)return;let a=function(e){let t=new AbortController;return e.once("close",()=>{e.writableFinished||t.abort(new ep)}),t}(t),o=function(e,t){let r=!1,n=new g;function i(){n.resolve()}e.on("drain",i),e.once("close",()=>{e.off("drain",i),n.resolve()});let a=new g;return e.once("finish",()=>{a.resolve()}),new WritableStream({write:async t=>{if(!r){if(r=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let e=ey();e&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:e.clientComponentLoadStart,end:e.clientComponentLoadStart+e.clientComponentLoadTimes})}e.flushHeaders(),(0,h.getTracer)().trace(m.Fx.startResponse,{spanName:"start response"},()=>void 0)}try{let r=e.write(t);"flush"in e&&"function"==typeof e.flush&&e.flush(),r||(await n.promise,n=new g)}catch(t){throw e.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:t}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:t=>{e.writableFinished||e.destroy(t)},close:async()=>{if(t&&await t,!e.writableFinished)return e.end(),a.promise}})}(t,r);await e.pipeTo(o,{signal:a.signal})}catch(e){if(ev(e))return;throw Object.defineProperty(Error("failed to pipe response",{cause:e}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}var ew=r("./dist/esm/shared/lib/invariant-error.js");class eS{static #e=this.EMPTY=new eS(null,{metadata:{},contentType:null});static fromStatic(e,t){return new eS(e,{metadata:{},contentType:t})}constructor(e,{contentType:t,waitUntil:r,metadata:n}){this.response=e,this.contentType=t,this.metadata=n,this.waitUntil=r}assignMetadata(e){Object.assign(this.metadata,e)}get isNull(){return null===this.response}get isDynamic(){return"string"!=typeof this.response}toUnchunkedString(e=!1){if(null===this.response)return"";if("string"!=typeof this.response){if(!e)throw Object.defineProperty(new ew.z("dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E732",enumerable:!1,configurable:!0});return $(this.readable)}return this.response}get readable(){return null===this.response?new ReadableStream({start(e){e.close()}}):"string"==typeof this.response?A(this.response):Buffer.isBuffer(this.response)?O(this.response):Array.isArray(this.response)?P(...this.response):this.response}coerce(){return null===this.response?[]:"string"==typeof this.response?[A(this.response)]:Array.isArray(this.response)?this.response:Buffer.isBuffer(this.response)?[O(this.response)]:[this.response]}unshift(e){this.response=this.coerce(),this.response.unshift(e)}push(e){this.response=this.coerce(),this.response.push(e)}async pipeTo(e){try{await this.readable.pipeTo(e,{preventClose:!0}),this.waitUntil&&await this.waitUntil,await e.close()}catch(t){if(ev(t))return void await e.abort(t);throw t}}async pipeToNodeResponse(e){await eb(this.readable,e,this.waitUntil)}}let e_=[x._A];function ek(e){return{trailingSlash:e.trailingSlash,isStaticMetadataRouteFile:!1}}var eE=r("./dist/esm/server/web/spec-extension/adapters/headers.js"),ex=r("./dist/esm/server/web/spec-extension/adapters/reflect.js");class eR extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new eR}}class eC{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return eR.callable;default:return ex.l.get(e,t,r)}}})}}let eT=Symbol.for("next.mutated.cookies");function eP(e){let t=e[eT];return t&&Array.isArray(t)&&0!==t.length?t:[]}class eA{static wrap(e,t){let r=new ed.VO(new Headers);for(let t of e.getAll())r.set(t);let n=[],i=new Set,a=()=>{let e=f.workAsyncStorage.getStore();if(e&&(e.pathWasRevalidated=!0),n=r.getAll().filter(e=>i.has(e.name)),t){let e=[];for(let t of n){let r=new ed.VO(new Headers);r.set(t),e.push(r.toString())}t(e)}},o=new Proxy(r,{get(e,t,r){switch(t){case eT:return n;case"delete":return function(...t){i.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.delete(...t),o}finally{a()}};case"set":return function(...t){i.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t),o}finally{a()}};default:return ex.l.get(e,t,r)}}});return o}}function eO(e,t){if("action"!==e.phase)throw new eR}var ej=r("./dist/esm/server/api-utils/index.js");class e${constructor(e,t,r,n){var i;let a=e&&(0,ej.checkIsOnDemandRevalidate)(t,e).isOnDemandRevalidate,o=null==(i=r.get(ej.COOKIE_NAME_PRERENDER_BYPASS))?void 0:i.value;this._isEnabled=!!(!a&&o&&e&&o===e.previewModeId),this._previewModeId=null==e?void 0:e.previewModeId,this._mutableCookies=n}get isEnabled(){return this._isEnabled}enable(){if(!this._previewModeId)throw Object.defineProperty(Error("Invariant: previewProps missing previewModeId this should never happen"),"__NEXT_ERROR_CODE",{value:"E93",enumerable:!1,configurable:!0});this._mutableCookies.set({name:ej.COOKIE_NAME_PRERENDER_BYPASS,value:this._previewModeId,httpOnly:!0,sameSite:"none",secure:!0,path:"/"}),this._isEnabled=!0}disable(){this._mutableCookies.set({name:ej.COOKIE_NAME_PRERENDER_BYPASS,value:"",httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:new Date(0)}),this._isEnabled=!1}}function eI(e,t){if("x-middleware-set-cookie"in e.headers&&"string"==typeof e.headers["x-middleware-set-cookie"]){let r=e.headers["x-middleware-set-cookie"],n=new Headers;for(let e of function(e){var t,r,n,i,a,o=[],s=0;function l(){for(;s=e.length)&&o.push(e.substring(t,e.length))}return o}(r))n.append("set-cookie",e);for(let e of new ed.VO(n).getAll())t.set(e)}}function eD(e,t,r,n,i,a,o,s,l,u,c){var d=e,f=t,p=r,h=n,m=i,g=a,y=u,v=o,b=s,w=l,S=c;function _(e){f&&f.setHeader("Set-Cookie",e)}let k={};return{type:"request",phase:"render",implicitTags:m,url:{pathname:p.pathname,search:p.search??""},rootParams:h,get headers(){return k.headers||(k.headers=function(e){let t=eE.o.from(e);for(let e of x.KD)t.delete(e);return eE.o.seal(t)}(d.headers)),k.headers},get cookies(){if(!k.cookies){let e=new ed.tm(eE.o.from(d.headers));eI(d,e),k.cookies=eC.seal(e)}return k.cookies},set cookies(value){k.cookies=value},get mutableCookies(){if(!k.mutableCookies){let e=function(e,t){let r=new ed.tm(eE.o.from(e));return eA.wrap(r,t)}(d.headers,g||(f?_:void 0));eI(d,e),k.mutableCookies=e}return k.mutableCookies},get userspaceMutableCookies(){return k.userspaceMutableCookies||(k.userspaceMutableCookies=function(e){let t=new Proxy(e.mutableCookies,{get(r,n,i){switch(n){case"delete":return function(...n){return eO(e,"cookies().delete"),r.delete(...n),t};case"set":return function(...n){return eO(e,"cookies().set"),r.set(...n),t};default:return ex.l.get(r,n,i)}}});return t}(this)),k.userspaceMutableCookies},get draftMode(){return k.draftMode||(k.draftMode=new e$(v,d,this.cookies,this.mutableCookies)),k.draftMode},renderResumeDataCache:y??null,isHmrRefresh:b,serverComponentsHmrCache:w||globalThis.__serverComponentsHmrCache,devFallbackParams:S}}var eN=r("./dist/compiled/p-queue/index.js"),eM=r.n(eN),eL=r("./dist/esm/shared/lib/is-thenable.js");class eF{constructor(e,t,r){this.prev=null,this.next=null,this.key=e,this.data=t,this.size=r}}class eU{constructor(){this.prev=null,this.next=null}}class eH{constructor(e,t){this.cache=new Map,this.totalSize=0,this.maxSize=e,this.calculateSize=t,this.head=new eU,this.tail=new eU,this.head.next=this.tail,this.tail.prev=this.head}addToHead(e){e.prev=this.head,e.next=this.head.next,this.head.next.prev=e,this.head.next=e}removeNode(e){e.prev.next=e.next,e.next.prev=e.prev}moveToHead(e){this.removeNode(e),this.addToHead(e)}removeTail(){let e=this.tail.prev;return this.removeNode(e),e}set(e,t){let r=(null==this.calculateSize?void 0:this.calculateSize.call(this,t))??1;if(r>this.maxSize)return void console.warn("Single item size exceeds maxSize");let n=this.cache.get(e);if(n)n.data=t,this.totalSize=this.totalSize-n.size+r,n.size=r,this.moveToHead(n);else{let n=new eF(e,t,r);this.cache.set(e,n),this.addToHead(n),this.totalSize+=r}for(;this.totalSize>this.maxSize&&this.cache.size>0;){let e=this.removeTail();this.cache.delete(e.key),this.totalSize-=e.size}}has(e){return this.cache.has(e)}get(e){let t=this.cache.get(e);if(t)return this.moveToHead(t),t.data}*[Symbol.iterator](){let e=this.head.next;for(;e&&e!==this.tail;){let t=e;yield[t.key,t.data],e=e.next}}remove(e){let t=this.cache.get(e);t&&(this.removeNode(t),this.cache.delete(e),this.totalSize-=t.size)}get size(){return this.cache.size}get currentSize(){return this.totalSize}}let eB=require("next/dist/server/lib/incremental-cache/tags-manifest.external.js");function ez(e){if(0===e)return{get:()=>Promise.resolve(void 0),set:()=>Promise.resolve(),refreshTags:()=>Promise.resolve(),getExpiration:()=>Promise.resolve(0),updateTags:()=>Promise.resolve()};let t=new eH(e,e=>e.size),r=new Map,n=process.env.NEXT_PRIVATE_DEBUG_CACHE?console.debug.bind(console,"DefaultCacheHandler:"):void 0;return{async get(e){let i=r.get(e);i&&(null==n||n("get",e,"pending"),await i);let a=t.get(e);if(!a){null==n||n("get",e,"not found");return}let o=a.entry;if(performance.timeOrigin+performance.now()>o.timestamp+1e3*o.revalidate){null==n||n("get",e,"expired");return}let s=o.revalidate;if((0,eB.areTagsExpired)(o.tags,o.timestamp)){null==n||n("get",e,"had expired tag");return}(0,eB.areTagsStale)(o.tags,o.timestamp)&&(null==n||n("get",e,"had stale tag"),s=-1);let[l,u]=o.value.tee();return o.value=u,null==n||n("get",e,"found",{tags:o.tags,timestamp:o.timestamp,expire:o.expire,revalidate:s}),{...o,revalidate:s,value:l}},async set(e,i){null==n||n("set",e,"start");let a=()=>{},o=new Promise(e=>{a=e});r.set(e,o);let s=await i,l=0;try{let[r,i]=s.value.tee();s.value=r;let a=i.getReader();for(let e;!(e=await a.read()).done;)l+=Buffer.from(e.value).byteLength;t.set(e,{entry:s,isErrored:!1,errorRetryCount:0,size:l}),null==n||n("set",e,"done")}catch(t){null==n||n("set",e,"failed",t)}finally{a(),r.delete(e)}},async refreshTags(){},async getExpiration(e){let t=Math.max(...e.map(e=>{let t=eB.tagsManifest.get(e);return t&&t.expired||0}),0);return null==n||n("getExpiration",{tags:e,expiration:t}),t},async updateTags(e,t){let r=Math.round(performance.timeOrigin+performance.now());for(let i of(null==n||n("updateTags",{tags:e,timestamp:r}),e)){let e=eB.tagsManifest.get(i)||{};if(t){let n={...e};n.stale=r,void 0!==t.expire&&(n.expired=r+1e3*t.expire),eB.tagsManifest.set(i,n)}else eB.tagsManifest.set(i,{...e,expired:r})}}}}let eq=process.env.NEXT_PRIVATE_DEBUG_CACHE?(e,...t)=>{console.log(`use-cache: ${e}`,...t)}:void 0,eW=Symbol.for("@next/cache-handlers"),eG=Symbol.for("@next/cache-handlers-map"),eV=Symbol.for("@next/cache-handlers-set"),eX=globalThis;function eJ(){if(eX[eG])return eX[eG].entries()}async function eK(e,t){if(!e)return t();let r=eY(e);try{return await t()}finally{let t=function(e,t){let r=new Set(e.pendingRevalidatedTags.map(e=>{let t="object"==typeof e.profile?JSON.stringify(e.profile):e.profile||"";return`${e.tag}:${t}`})),n=new Set(e.pendingRevalidateWrites);return{pendingRevalidatedTags:t.pendingRevalidatedTags.filter(e=>{let t="object"==typeof e.profile?JSON.stringify(e.profile):e.profile||"";return!r.has(`${e.tag}:${t}`)}),pendingRevalidates:Object.fromEntries(Object.entries(t.pendingRevalidates).filter(([t])=>!(t in e.pendingRevalidates))),pendingRevalidateWrites:t.pendingRevalidateWrites.filter(e=>!n.has(e))}}(r,eY(e));await eZ(e,t)}}function eY(e){return{pendingRevalidatedTags:e.pendingRevalidatedTags?[...e.pendingRevalidatedTags]:[],pendingRevalidates:{...e.pendingRevalidates},pendingRevalidateWrites:e.pendingRevalidateWrites?[...e.pendingRevalidateWrites]:[]}}async function eQ(e,t,r){if(0===e.length)return;let n=function(){if(eX[eV])return eX[eV].values()}(),i=[],a=new Map;for(let t of e){let e,r=t.profile;for(let[t]of a)if("string"==typeof t&&"string"==typeof r&&t===r||"object"==typeof t&&"object"==typeof r&&JSON.stringify(t)===JSON.stringify(r)||t===r){e=t;break}let n=e||r;a.has(n)||a.set(n,[]),a.get(n).push(t.tag)}for(let[e,s]of a){let a;if(e){let t;if("object"==typeof e)t=e;else if("string"==typeof e){var o;if(!(t=null==r||null==(o=r.cacheLifeProfiles)?void 0:o[e]))throw Object.defineProperty(Error(`Invalid profile provided "${e}" must be configured under cacheLife in next.config or be "max"`),"__NEXT_ERROR_CODE",{value:"E873",enumerable:!1,configurable:!0})}t&&(a={expire:t.expire})}for(let t of n||[])e?i.push(null==t.updateTags?void 0:t.updateTags.call(t,s,a)):i.push(null==t.updateTags?void 0:t.updateTags.call(t,s));t&&i.push(t.revalidateTag(s,a))}await Promise.all(i)}async function eZ(e,t){let r=(null==t?void 0:t.pendingRevalidatedTags)??e.pendingRevalidatedTags??[],n=(null==t?void 0:t.pendingRevalidates)??e.pendingRevalidates??{},i=(null==t?void 0:t.pendingRevalidateWrites)??e.pendingRevalidateWrites??[];return Promise.all([eQ(r,e.incrementalCache,e),...Object.values(n),...i])}let e0=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class e1{disable(){throw e0}getStore(){}run(){throw e0}exit(){throw e0}enterWith(){throw e0}static bind(e){return e}}let e2="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;var e4=r("../../app-render/work-unit-async-storage.external");let e3=require("next/dist/server/app-render/after-task-async-storage.external.js");class e6{constructor({waitUntil:e,onClose:t,onTaskError:r}){this.workUnitStores=new Set,this.waitUntil=e,this.onClose=t,this.onTaskError=r,this.callbackQueue=new(eM()),this.callbackQueue.pause()}after(e){if((0,eL.Q)(e))this.waitUntil||e8(),this.waitUntil(e.catch(e=>this.reportTaskError("promise",e)));else if("function"==typeof e)this.addCallback(e);else throw Object.defineProperty(Error("`after()`: Argument must be a promise or a function"),"__NEXT_ERROR_CODE",{value:"E50",enumerable:!1,configurable:!0})}addCallback(e){var t;this.waitUntil||e8();let r=e4.workUnitAsyncStorage.getStore();r&&this.workUnitStores.add(r);let n=e3.afterTaskAsyncStorage.getStore(),i=n?n.rootTaskSpawnPhase:null==r?void 0:r.phase;this.runCallbacksOnClosePromise||(this.runCallbacksOnClosePromise=this.runCallbacksOnClose(),this.waitUntil(this.runCallbacksOnClosePromise));let a=(t=async()=>{try{await e3.afterTaskAsyncStorage.run({rootTaskSpawnPhase:i},()=>e())}catch(e){this.reportTaskError("function",e)}},e2?e2.bind(t):e1.bind(t));this.callbackQueue.add(a)}async runCallbacksOnClose(){return await new Promise(e=>this.onClose(e)),this.runCallbacks()}async runCallbacks(){if(0===this.callbackQueue.size)return;for(let e of this.workUnitStores)e.phase="after";let e=f.workAsyncStorage.getStore();if(!e)throw Object.defineProperty(new ew.z("Missing workStore in AfterContext.runCallbacks"),"__NEXT_ERROR_CODE",{value:"E547",enumerable:!1,configurable:!0});return eK(e,()=>(this.callbackQueue.start(),this.callbackQueue.onIdle()))}reportTaskError(e,t){if(console.error("promise"===e?"A promise passed to `after()` rejected:":"An error occurred in a function passed to `after()`:",t),this.onTaskError)try{null==this.onTaskError||this.onTaskError.call(this,t)}catch(e){console.error(Object.defineProperty(new ew.z("`onTaskError` threw while handling an error thrown from an `after` task",{cause:e}),"__NEXT_ERROR_CODE",{value:"E569",enumerable:!1,configurable:!0}))}}}function e8(){throw Object.defineProperty(Error("`after()` will not work correctly, because `waitUntil` is not available in the current environment."),"__NEXT_ERROR_CODE",{value:"E91",enumerable:!1,configurable:!0})}function e9(e){return e.startsWith("/")?e:`/${e}`}var e5=r("./dist/esm/shared/lib/segment.js");function e7(e){return e9(e.split("/").reduce((e,t,r,n)=>!t||(0,e5.V)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:`${e}/${t}`,""))}function te(e){return e.replace(/\.rsc($|\?)/,"$1")}function tt(e){let t,r={then:(n,i)=>(t||(t=e()),t.then(e=>{r.value=e}).catch(()=>{}),t.then(n,i))};return r}var tr=r("./dist/esm/client/components/http-access-fallback/http-access-fallback.js"),tn=r("./dist/esm/client/components/redirect-error.js");function ti(e){return(0,tn.nJ)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function ta(e){if(!(0,tn.nJ)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return e.digest.split(";",2)[1]}function to(e){if(!(0,tn.nJ)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}async function ts(e,t,r){let n=new Set;for(let t of(e=>{let t=["/layout"];if(e.startsWith("/")){let r=e.split("/");for(let e=1;ei.getExpiration(e)));return t}(i)}}r("../../app-render/action-async-storage.external").actionAsyncStorage;class tl extends eS{constructor(e,t={}){super(e,{contentType:x.al,metadata:t})}}var tu=r("./dist/compiled/string-hash/index.js"),tc=r.n(tu);let td=["useDeferredValue","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useReducer","useRef","useState","useSyncExternalStore","useTransition","experimental_useOptimistic","useOptimistic"];function tf(e,t){if(e.message=t,e.stack){let r=e.stack.split("\n");r[0]=t,e.stack=r.join("\n")}}function tp(e){let t=e.stack;return t?t.replace(/^[^\n]*\n/,""):""}function th(e){if("string"==typeof(null==e?void 0:e.message)){if(e.message.includes("Class extends value undefined is not a constructor or null")){let t="This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component";if(e.message.includes(t))return;tf(e,`${e.message} + +${t}`);return}if(e.message.includes("createContext is not a function"))return void tf(e,'createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component');for(let t of td)if(RegExp(`\\b${t}\\b.*is not a function`).test(e.message))return void tf(e,`${t} only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component`)}}var tm=r("./dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js"),tg=r("./dist/esm/client/components/hooks-server-context.js"),ty=r("./dist/esm/client/components/is-next-router-error.js"),tv=r("./dist/esm/server/app-render/dynamic-rendering.js"),tb=r("./dist/compiled/safe-stable-stringify/index.js"),tw=r.n(tb);function tS(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function t_(e){return tS(e)?e:Object.defineProperty(Error(!function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}(e)?e+"":tw()(e)),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}let tk=(e,t)=>"object"==typeof e&&null!==e&&"__NEXT_ERROR_CODE"in e?`${t}@${e.__NEXT_ERROR_CODE}`:t;function tE(e){return"object"==typeof e&&null!==e&&"message"in e&&"string"==typeof e.message&&e.message.startsWith("This rendered a large document (>")}function tx(e){if((0,tm.C)(e)||(0,ty.p)(e)||(0,tg.isDynamicServerError)(e)||(0,tv.AA)(e))return e.digest}function tR(e,t){return r=>{if("string"==typeof r)return tc()(r).toString();if(ev(r))return;let n=tx(r);if(n)return n;if(tE(r))return void console.error(r);let i=t_(r);i.digest||(i.digest=tc()(i.message+i.stack||"").toString()),e&&th(i);let a=(0,h.getTracer)().getActiveScopeSpan();return a&&(a.recordException(i),a.setAttribute("error.type",i.name),a.setStatus({code:h.SpanStatusCode.ERROR,message:i.message})),t(i),tk(r,i.digest)}}function tC(e,t,r,n,i){return a=>{var o;if("string"==typeof a)return tc()(a).toString();if(ev(a))return;let s=tx(a);if(s)return s;if(tE(a))return void console.error(a);let l=t_(a);if(l.digest||(l.digest=tc()(l.message+(l.stack||"")).toString()),r.has(l.digest)||r.set(l.digest,l),e&&th(l),!(t&&(null==l||null==(o=l.message)?void 0:o.includes("The specific message is omitted in production builds to avoid leaking sensitive details.")))){let e=(0,h.getTracer)().getActiveScopeSpan();e&&(e.recordException(l),e.setAttribute("error.type",l.name),e.setStatus({code:h.SpanStatusCode.ERROR,message:l.message})),n||null==i||i(l)}return tk(a,l.digest)}}function tT(e,t,r,n,i,a){return(o,s)=>{var l;if(tE(o))return void console.error(o);let u=!0;if(n.push(o),ev(o))return;let c=tx(o);if(c)return c;let d=t_(o);if(d.digest?r.has(d.digest)&&(o=r.get(d.digest),u=!1):d.digest=tc()(d.message+((null==s?void 0:s.componentStack)||d.stack||"")).toString(),e&&th(d),!(t&&(null==d||null==(l=d.message)?void 0:l.includes("The specific message is omitted in production builds to avoid leaking sensitive details.")))){let e=(0,h.getTracer)().getActiveScopeSpan();e&&(e.recordException(d),e.setAttribute("error.type",d.name),e.setStatus({code:h.SpanStatusCode.ERROR,message:d.message})),!i&&u&&a(d,s)}return tk(o,d.digest)}}let tP={catchall:"c","catchall-intercepted":"ci","optional-catchall":"oc",dynamic:"d","dynamic-intercepted":"di"},tA=["(..)(..)","(.)","(..)","(...)"];function tO(e){return void 0!==e.split("/").find(e=>tA.find(t=>e.startsWith(t)))}function tj(e){let t=tA.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:t?"catchall-intercepted":"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:t?"dynamic-intercepted":"dynamic",param:e.slice(1,-1)}:null}let t$={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},tI=/[&><\u2028\u2029]/g;function tD(e){return e.replace(tI,e=>t$[e])}var tN=r("./dist/compiled/superstruct/index.cjs"),tM=r.n(tN);let tL=tM().enums(["c","ci","oc","d","di"]),tF=tM().union([tM().string(),tM().tuple([tM().string(),tM().string(),tL])]),tU=tM().tuple([tF,tM().record(tM().string(),tM().lazy(()=>tU)),tM().optional(tM().nullable(tM().string())),tM().optional(tM().nullable(tM().union([tM().literal("refetch"),tM().literal("refresh"),tM().literal("inside-shared-layout"),tM().literal("metadata-only")]))),tM().optional(tM().boolean())]);var tH=r("./dist/esm/shared/lib/app-router-types.js");function tB([e,t,{layout:r,loading:n}],i,a,o,s){let l=i(e),u=l?l.treeSegment:e,c=[(0,e5.HG)(u,a),{}];s||void 0===r||(s=!0,c[4]=!0);let d=!1,f={};return Object.keys(t).forEach(e=>{let r=tB(t[e],i,a,o,s);o&&r[5]!==tH.r.SubtreeHasNoLoadingBoundary&&(d=!0),f[e]=r}),c[1]=f,o&&(c[5]=n?tH.r.SegmentHasLoadingBoundary:d?tH.r.SubtreeHasLoadingBoundary:tH.r.SubtreeHasNoLoadingBoundary),c}function tz(e,t,r){return tB(e,t,r,!1,!1)}function tq(e,t){return tB(e,t,{},!0,!1)}let tW=["accept-encoding","keepalive","keep-alive","content-encoding","transfer-encoding","connection","expect","content-length","set-cookie"];function tG(e){let t,r;e.headers instanceof Headers?(t=e.headers.get(x.ts)??null,r=e.headers.get("content-type")):(t=e.headers[x.ts]??null,r=e.headers["content-type"]??null);let n="POST"===e.method&&"application/x-www-form-urlencoded"===r,i=!!("POST"===e.method&&(null==r?void 0:r.startsWith("multipart/form-data"))),a=void 0!==t&&"string"==typeof t&&"POST"===e.method;return{actionId:t,isURLEncodedAction:n,isMultipartAction:i,isFetchAction:a,isPossibleServerAction:!!(a||n||i)}}let{env:tV,stdout:tX}=(null==(i=globalThis)?void 0:i.process)??{},tJ=tV&&!tV.NO_COLOR&&(tV.FORCE_COLOR||(null==tX?void 0:tX.isTTY)&&!tV.CI&&"dumb"!==tV.TERM),tK=(e,t,r,n)=>{let i=e.substring(0,n)+r,a=e.substring(n+t.length),o=a.indexOf(t);return~o?i+tK(a,t,r,o):i+a},tY=(e,t,r=e)=>tJ?n=>{let i=""+n,a=i.indexOf(t,e.length);return~a?e+tK(i,t,r,a)+t:e+i+t}:String,tQ=tY("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m");tY("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),tY("\x1b[3m","\x1b[23m"),tY("\x1b[4m","\x1b[24m"),tY("\x1b[7m","\x1b[27m"),tY("\x1b[8m","\x1b[28m"),tY("\x1b[9m","\x1b[29m"),tY("\x1b[30m","\x1b[39m");let tZ=tY("\x1b[31m","\x1b[39m"),t0=tY("\x1b[32m","\x1b[39m"),t1=tY("\x1b[33m","\x1b[39m");tY("\x1b[34m","\x1b[39m");let t2=tY("\x1b[35m","\x1b[39m");tY("\x1b[38;2;173;127;168m","\x1b[39m"),tY("\x1b[36m","\x1b[39m");let t4=tY("\x1b[37m","\x1b[39m");tY("\x1b[90m","\x1b[39m"),tY("\x1b[40m","\x1b[49m"),tY("\x1b[41m","\x1b[49m"),tY("\x1b[42m","\x1b[49m"),tY("\x1b[43m","\x1b[49m"),tY("\x1b[44m","\x1b[49m"),tY("\x1b[45m","\x1b[49m"),tY("\x1b[46m","\x1b[49m"),tY("\x1b[47m","\x1b[49m");let t3={wait:t4(tQ("○")),error:tZ(tQ("⨯")),warn:t1(tQ("⚠")),ready:"▲",info:t4(tQ(" ")),event:t0(tQ("✓")),trace:t2(tQ("\xbb"))},t6={log:"log",warn:"warn",error:"error"};function t8(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in t6?t6[e]:"log",n=t3[e];0===t.length?console[r](""):1===t.length&&"string"==typeof t[0]?console[r](" "+n+" "+t[0]):console[r](" "+n,...t)}function t9(...e){t8("error",...e)}function t5(...e){t8("warn",...e)}function t7(e){return er(e,"app")?e:"app"+e}new eH(1e4,e=>e.length),new eH(1e4,e=>e.length);var re=r("./dist/esm/client/components/redirect-status-code.js"),rt=r("./dist/esm/client/components/router-reducer/set-cache-busting-search-param.js");function rr(e){let t={};for(let[r,n]of Object.entries(e))void 0!==n&&(t[r]=Array.isArray(n)?n.join(", "):`${n}`);return t}function rn(e,t){let r=e.headers,n=new ed.tm(eE.o.from(r)),i=t.getHeaders(),a=new ed.VO(function(e){let t=new Headers;for(let[r,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(r,e));return t}(i)),o=((e,t)=>{for(let[r,n]of(e["content-length"]&&"0"===e["content-length"]&&delete e["content-length"],Object.entries(e)))(t.includes(r)||!(Array.isArray(n)||"string"==typeof n))&&delete e[r];return e})({...rr(r),...rr(i)},tW);return a.getAll().forEach(e=>{void 0===e.value?n.delete(e.name):n.set(e)}),o.cookie=n.toString(),delete o["transfer-encoding"],new Headers(o)}async function ri(e,t,r,n,i){var a,o,s;if(!r)throw Object.defineProperty(Error("Invariant: Missing `host` header from a forwarded Server Actions request."),"__NEXT_ERROR_CODE",{value:"E226",enumerable:!1,configurable:!0});let l=rn(e,t);l.set("x-action-forwarded","1");let u=(null==(a=X(e,"initProtocol"))?void 0:a.replace(/:+$/,""))||"https",c=process.env.__NEXT_PRIVATE_ORIGIN||`${u}://${r.value}`,d=new URL(`${c}${i}${n}`);try{let r;r=e.stream();let n=await fetch(d,{method:"POST",body:r,duplex:"half",headers:l,redirect:"manual",next:{internal:1}});if(null==(o=n.headers.get("content-type"))?void 0:o.startsWith(x.al)){for(let[e,r]of n.headers)tW.includes(e)||t.setHeader(e,r);return new tl(n.body)}null==(s=n.body)||s.cancel()}catch(e){console.error("failed to forward action response",e)}return eS.fromStatic("{}",J.U2)}async function ra(e,t,r,n,i,a,o,s){t.setHeader("x-action-redirect",`${n};${i}`);let l=function(e,t,r,n){if(r.startsWith("/"))return new URL(`${e}${r}`,"http://n");if(r.startsWith(".")){let t=n||"/";t.endsWith("/")||(t+="/");let i=new URL(r,`http://n${t}`);return new URL(`${e}${i.pathname}${i.search}${i.hash}`,"http://n")}let i=new URL(r);return(null==t?void 0:t.value)!==i.host?null:i.pathname.startsWith(e)?i:null}(a,r,n,s);if(l){var u,c,d,f,p,h;if(!r)throw Object.defineProperty(Error("Invariant: Missing `host` header from a forwarded Server Actions request."),"__NEXT_ERROR_CODE",{value:"E226",enumerable:!1,configurable:!0});let n=rn(e,t);n.set(x.hY,"1");let i=(null==(u=X(e,"initProtocol"))?void 0:u.replace(/:+$/,""))||"https",a=process.env.__NEXT_PRIVATE_ORIGIN||`${i}://${r.value}`,s=new URL(`${a}${l.pathname}${l.search}`);o.pendingRevalidatedTags&&(n.set(J.vS,o.pendingRevalidatedTags.map(e=>e.tag).join(",")),n.set(J.c1,(null==(f=o.incrementalCache)||null==(d=f.prerenderManifest)||null==(c=d.preview)?void 0:c.previewModeId)||"")),n.delete(x.B),n.delete(x.ts);try{(0,rt.A)(s,{[x._V]:n.get(x._V)?"1":void 0,[x.qm]:n.get(x.qm)??void 0,[x.B]:n.get(x.B)??void 0,[x.kO]:n.get(x.kO)??void 0});let e=await fetch(s,{method:"GET",headers:n,next:{internal:1}});if(null==(p=e.headers.get("content-type"))?void 0:p.startsWith(x.al)){for(let[r,n]of e.headers)tW.includes(r)||t.setHeader(r,n);return new tl(e.body)}null==(h=e.body)||h.cancel()}catch(e){console.error("failed to get redirect response",e)}}return eS.EMPTY}function ro(e){return e.length>100?e.slice(0,100)+"...":e}async function rs({req:e,res:t,ComponentMod:n,serverModuleMap:i,generateFlight:a,workStore:o,requestStore:s,serverActions:l,ctx:u,metadata:c}){let d,f,p=e.headers["content-type"],{serverActionsManifest:h,page:m}=u.renderOpts,{actionId:g,isURLEncodedAction:y,isMultipartAction:v,isFetchAction:b,isPossibleServerAction:w}=tG(e);if(!w)return null;if(o.isStaticGeneration)throw Object.defineProperty(Error("Invariant: server actions can't be handled during static rendering"),"__NEXT_ERROR_CODE",{value:"E359",enumerable:!1,configurable:!0});o.fetchCache="default-no-store";let S=e.headers.origin,_="string"==typeof S&&"null"!==S?new URL(S).host:void 0,k=function(e,t){var r,n;let i=e["x-forwarded-host"],a=i&&Array.isArray(i)?i[0]:null==i||null==(n=i.split(","))||null==(r=n[0])?void 0:r.trim(),o=e.host;return a?{type:"x-forwarded-host",value:a}:o?{type:"host",value:o}:void 0}(e.headers);if(_){if(!k||_!==k.value)if(((e,t=[])=>t.some(t=>t&&(t===e||function(e,t){let r=e.split("."),n=t.split(".");if(n.length<1||r.length0)return!1;return void 0!==t;default:if(t!==e)return!1}}return 0===r.length}(e,t))))(_,null==l?void 0:l.allowedOrigins));else{k?console.error(`\`${k.type}\` header with value \`${ro(k.value)}\` does not match \`origin\` header with value \`${ro(_)}\` from a forwarded Server Actions request. Aborting the action.`):console.error("`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded Server Actions request. Aborting the action.");let r=Object.defineProperty(Error("Invalid Server Actions request."),"__NEXT_ERROR_CODE",{value:"E80",enumerable:!1,configurable:!0});if(b){t.statusCode=500,c.statusCode=500;let n=Promise.reject(r);try{await n}catch{}return{type:"done",result:await a(e,u,s,{actionResult:n,skipFlight:!0,temporaryReferences:d})}}throw r}}else f="Missing `origin` header from a forwarded Server Actions request.";t.setHeader("Cache-Control","no-cache, no-store, max-age=0, must-revalidate");let{actionAsyncStorage:E}=n,R=!!e.headers["x-action-forwarded"];if(g){let r=function(e,t,r){var n;let i=null==(n=r.node[e])?void 0:n.workers,a=t7(t);if(i&&!i[a])return e7(eo(Object.keys(i)[0],"app"))}(g,m,h);if(r)return{type:"done",result:await ri(e,t,k,r,u.renderOpts.basePath)}}let C=e=>(console.warn(e),t.setHeader(x.Ic,"1"),t.setHeader("content-type","text/plain"),t.statusCode=404,{type:"done",result:eS.fromStatic("Server action not found.","text/plain")});try{return await E.run({isAction:!0},async()=>{let c,h=[];{let{createTemporaryReferenceSet:t,decodeReply:n,decodeReplyFromBusboy:a,decodeAction:u,decodeFormState:m}=r("(react-server)/./dist/esm/server/app-render/react-server.node.js");d=t();let{Transform:w,pipeline:S}=r("node:stream"),_="1 MB",k=(null==l?void 0:l.bodySizeLimit)??_,E=k!==_?r("./dist/compiled/bytes/index.js").parse(k):1048576,x=0,R=new w({transform(e,t,n){if((x+=Buffer.byteLength(e,t))>E){let{ApiError:e}=r("./dist/esm/server/api-utils/index.js");n(Object.defineProperty(new e(413,`Body exceeded ${k} limit. +To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}));return}n(null,e)}}),T=S(e.body,R,()=>{});if(v)if(b){let t=r("./dist/compiled/busboy/index.js")({defParamCharset:"utf8",headers:e.headers,limits:{fieldSize:E}});S(T,t,()=>{}),h=await a(t,i,{temporaryReferences:d})}else{let e=new Request("http://localhost",{method:"POST",headers:{"Content-Type":p},body:new ReadableStream({start:e=>{T.on("data",t=>{e.enqueue(new Uint8Array(t))}),T.on("end",()=>{e.close()}),T.on("error",t=>{e.error(t)})}}),duplex:"half"}),t=await e.formData(),r=await u(t,i);if("function"!=typeof r)return null;{f&&t5(f);let e=await rl(r,[],o,s),n=await m(e,t,i);return{type:"done",result:void 0,formState:n}}}else{if(!b)return null;try{c=ru(g,i)}catch(e){return C(e)}let e=[];for await(let t of T)e.push(Buffer.from(t));let t=Buffer.concat(e).toString("utf-8");if(y){let e=function(e){let t=new URLSearchParams(e),r=new FormData;for(let[e,n]of t)r.append(e,n);return r}(t);h=await n(e,i,{temporaryReferences:d})}else h=await n(t,i,{temporaryReferences:d})}}try{c=c??ru(g,i)}catch(e){return C(e)}let m=(await n.__next_app__.require(c))[g],w=await rl(m,h,o,s).finally(()=>{!function(e,{workStore:t,requestStore:r}){var n;let i=+(null!=(n=t.pendingRevalidatedTags)&&!!n.length),a=+!!eP(r.mutableCookies).length;e.setHeader("x-action-revalidated",JSON.stringify([[],i,a]))}(t,{workStore:o,requestStore:s})});if(!b)return null;{let t=await a(e,u,s,{actionResult:Promise.resolve(w),skipFlight:!o.pathWasRevalidated||R,temporaryReferences:d});return{type:"done",result:t}}})}catch(r){if((0,tn.nJ)(r)){let n=ti(r),i=ta(r);if(t.statusCode=re.Q.SeeOther,c.statusCode=re.Q.SeeOther,b)return{type:"done",result:await ra(e,t,k,n,i,u.renderOpts.basePath,o,s.url.pathname)};return t.setHeader("Location",n),{type:"done",result:eS.EMPTY}}if((0,tr.RM)(r)){if(t.statusCode=(0,tr.jT)(r),c.statusCode=t.statusCode,b){let t=Promise.reject(r);try{await t}catch{}return{type:"done",result:await a(e,u,s,{skipFlight:!1,actionResult:t,temporaryReferences:d})}}return{type:"not-found"}}if(b){t.statusCode=500,c.statusCode=500;let n=Promise.reject(r);try{await n}catch{}return{type:"done",result:await a(e,u,s,{actionResult:n,skipFlight:!o.pathWasRevalidated||R,temporaryReferences:d})}}throw r}}async function rl(e,t,r,n){n.phase="action";try{return await e4.workUnitAsyncStorage.run(n,()=>e.apply(null,t))}finally{n.phase="render",n.cookies=eC.seal(function(e){let t=new ed.tm(new Headers);for(let r of e.getAll())t.set(r);return t}(n.mutableCookies)),r.isDraftMode=n.draftMode.isEnabled,await eZ(r)}}function ru(e,t){var r;if(!e)throw Object.defineProperty(new ew.z("Missing 'next-action' header."),"__NEXT_ERROR_CODE",{value:"E664",enumerable:!1,configurable:!0});let n=null==(r=t[e])?void 0:r.id;if(!n)throw Object.defineProperty(Error(`Failed to find Server Action "${e}". This request might be from an older or newer deployment. +Read more: https://nextjs.org/docs/messages/failed-to-find-server-action`),"__NEXT_ERROR_CODE",{value:"E665",enumerable:!1,configurable:!0});return n}let rc=p.createContext(null);function rd(e){let t=(0,p.useContext)(rc);t&&t(e)}function rf(){let e=[],t=t=>{e.push(t)};return{ServerInsertedHTMLProvider:({children:e})=>(0,d.jsx)(rc.Provider,{value:t,children:e}),renderServerInsertedHTML:()=>e.map((e,t)=>(0,d.jsx)(p.Fragment,{children:e()},"__next_server_inserted__"+t))}}function rp(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}var rh=r("./dist/compiled/react-dom-experimental/index.js");function rm(e,t,r,n,i,a,o){var s;let l,u=[],c={src:"",crossOrigin:r},d=((null==(s=e.rootMainFilesTree)?void 0:s[o])||e.rootMainFiles).map(rp);if(0===d.length)throw Object.defineProperty(Error("Invariant: missing bootstrap script. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E459",enumerable:!1,configurable:!0});if(n){c.src=`${t}/_next/`+d[0]+i,c.integrity=n[d[0]];for(let e=1;e{for(let e=0;e{for(let e=0;e(0,d.jsx)("script",{...e},e.src)),s=(n||[]).map(({key:e,value:t},r)=>(0,d.jsx)("meta",{name:e,content:t},`next-trace-data-${r}`));return async function(){let e=[];for(;arS(e))}function r_(e){if(e.$$typeof!==Symbol.for("react.server.reference"))return!1;let{type:t}=function(e){let t=parseInt(e.slice(0,2),16),r=t>>1&63,n=Array(6);for(let e=0;e<6;e++){let t=r>>5-e&1;n[e]=1===t}return{type:1==(t>>7&1)?"use-cache":"server-action",usedArgs:n,hasRestArgs:1==(1&t)}}(e.$$id);return"use-cache"===t}async function rk(e){let t,r,n,{layout:i,page:a,defaultPage:o}=e[2],s=void 0!==i,l=void 0!==a,u=void 0!==o&&e[0]===e5.WO;return s?(t=await i[0](),r="layout",n=i[1]):l?(t=await a[0](),r="page",n=a[1]):u&&(t=await o[0](),r="page",n=o[1]),{mod:t,modType:r,filePath:n}}function rE(e){return e.default||e}function rx(e){let[t,r,n]=e,{layout:i,template:a}=n,{page:o}=n;o=t===e5.WO?n.defaultPage:o;let s=i?.[1]||a?.[1]||o?.[1];return{page:o,segment:t,modules:n,conventionPath:s,parallelRoutes:r}}function rR(e,t){let r="";return e.renderOpts.deploymentId&&(r+=`?dpl=${e.renderOpts.deploymentId}`),r}function rC(e,t,r){let{componentMod:{createElement:n}}=t;return e.map((e,i)=>{let a="next",o=`${t.assetPrefix}/_next/${rp(e.path)}${rR(t,!0)}`;return e.inlined&&!t.parsedRequestHeaders.isRSCRequest?n("style",{key:i,nonce:t.nonce,precedence:a,href:o},e.content):(null==r||r.push(()=>{t.componentMod.preloadStyle(o,t.renderOpts.crossOrigin,t.nonce)}),n("link",{key:i,rel:"stylesheet",href:o,precedence:a,crossOrigin:t.renderOpts.crossOrigin,nonce:t.nonce}))})}async function rT({filePath:e,getComponent:t,injectedCSS:r,injectedJS:n,ctx:i}){let{componentMod:{createElement:a}}=i,{styles:o,scripts:s}=rb(i.clientReferenceManifest,e,r,n),l=rC(o,i),u=s?s.map((e,t)=>a("script",{src:`${i.assetPrefix}/_next/${rp(e)}${rR(i,!0)}`,async:!0,key:`script-${t}`})):null;return[rE(await t()),l,u]}r("./dist/esm/server/dynamic-rendering-utils.js");let rP=()=>{};globalThis.FinalizationRegistry&&new FinalizationRegistry(e=>{let t=e.deref();t&&!t.locked&&t.cancel("Response object has been garbage collected").then(rP)});class rA{constructor(e,t=e=>e()){this.cacheKeyFn=e,this.schedulerFn=t,this.pending=new Map}static create(e){return new rA(null==e?void 0:e.cacheKeyFn,null==e?void 0:e.schedulerFn)}async batch(e,t){let r=this.cacheKeyFn?await this.cacheKeyFn(e):e;if(null===r)return t({resolve:e=>Promise.resolve(e),key:e});let n=this.pending.get(r);if(n)return n;let{promise:i,resolve:a,reject:o}=new g;return this.pending.set(r,i),this.schedulerFn(async()=>{try{let r=await t({resolve:a,key:e});a(r)}catch(e){o(e)}finally{this.pending.delete(r)}}),i}}var rO=function(e){return e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.REDIRECT="REDIRECT",e.IMAGE="IMAGE",e}({}),rj=function(e){return e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.IMAGE="IMAGE",e}({}),r$=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({});async function rI(e){var t,r;return{...e,value:(null==(t=e.value)?void 0:t.kind)===rO.PAGES?{kind:rO.PAGES,html:await e.value.html.toUnchunkedString(!0),pageData:e.value.pageData,headers:e.value.headers,status:e.value.status}:(null==(r=e.value)?void 0:r.kind)===rO.APP_PAGE?{kind:rO.APP_PAGE,html:await e.value.html.toUnchunkedString(!0),postponed:e.value.postponed,rscData:e.value.rscData,headers:e.value.headers,status:e.value.status,segmentData:e.value.segmentData}:e.value}}async function rD(e){var t,r;return e?{isMiss:e.isMiss,isStale:e.isStale,cacheControl:e.cacheControl,value:(null==(t=e.value)?void 0:t.kind)===rO.PAGES?{kind:rO.PAGES,html:eS.fromStatic(e.value.html,J.j9),pageData:e.value.pageData,headers:e.value.headers,status:e.value.status}:(null==(r=e.value)?void 0:r.kind)===rO.APP_PAGE?{kind:rO.APP_PAGE,html:eS.fromStatic(e.value.html,J.j9),rscData:e.value.rscData,headers:e.value.headers,status:e.value.status,postponed:e.value.postponed,segmentData:e.value.segmentData}:e.value}:null}class rN{constructor(e){this.getBatcher=rA.create({cacheKeyFn:({key:e,isOnDemandRevalidate:t})=>`${e}-${t?"1":"0"}`,schedulerFn:y}),this.revalidateBatcher=rA.create({schedulerFn:y}),this.minimal_mode=e}async get(e,t,r){var n;if(!e)return t({hasResolved:!1,previousCacheEntry:null});if(this.minimal_mode&&(null==(n=this.previousCacheItem)?void 0:n.key)===e&&this.previousCacheItem.expiresAt>Date.now())return rD(this.previousCacheItem.entry);let{incrementalCache:i,isOnDemandRevalidate:a=!1,isFallback:o=!1,isRoutePPREnabled:s=!1,isPrefetch:l=!1,waitUntil:u,routeKind:c}=r;return rD(await this.getBatcher.batch({key:e,isOnDemandRevalidate:a},({resolve:r})=>{let n=this.handleGet(e,t,{incrementalCache:i,isOnDemandRevalidate:a,isFallback:o,isRoutePPREnabled:s,isPrefetch:l,routeKind:c},r);return u&&u(n),n}))}async handleGet(e,t,r,n){let i=null,a=!1;try{if((i=this.minimal_mode?null:await r.incrementalCache.get(e,{kind:function(e){switch(e){case r$.PAGES:return rj.PAGES;case r$.APP_PAGE:return rj.APP_PAGE;case r$.IMAGE:return rj.IMAGE;case r$.APP_ROUTE:return rj.APP_ROUTE;case r$.PAGES_API:throw Object.defineProperty(Error(`Unexpected route kind ${e}`),"__NEXT_ERROR_CODE",{value:"E64",enumerable:!1,configurable:!0});default:return e}}(r.routeKind),isRoutePPREnabled:r.isRoutePPREnabled,isFallback:r.isFallback}))&&!r.isOnDemandRevalidate&&(n(i),a=!0,!i.isStale||r.isPrefetch))return i;let o=await this.revalidate(e,r.incrementalCache,r.isRoutePPREnabled,r.isFallback,t,i,null!==i&&!r.isOnDemandRevalidate);if(!o)return this.minimal_mode&&(this.previousCacheItem=void 0),null;return r.isOnDemandRevalidate,o}catch(e){if(a)return console.error(e),null;throw e}}async revalidate(e,t,r,n,i,a,o,s){return this.revalidateBatcher.batch(e,()=>{let l=this.handleRevalidate(e,t,r,n,i,a,o);return s&&s(l),l})}async handleRevalidate(e,t,r,n,i,a,o){try{let s=await i({hasResolved:o,previousCacheEntry:a,isRevalidating:!0});if(!s)return null;let l=await rI({...s,isMiss:!a});return l.cacheControl&&(this.minimal_mode?this.previousCacheItem={key:e,entry:l,expiresAt:Date.now()+1e3}:await t.set(e,l.value,{cacheControl:l.cacheControl,isRoutePPREnabled:r,isFallback:n})),l}catch(i){if(null==a?void 0:a.cacheControl){let i=Math.min(Math.max(a.cacheControl.revalidate||3,3),30),o=void 0===a.cacheControl.expire?void 0:Math.max(i+3,a.cacheControl.expire);await t.set(e,a.value,{cacheControl:{revalidate:i,expire:o},isRoutePPREnabled:r,isFallback:n})}throw i}}}r("./dist/esm/server/app-render/staged-rendering.js"),Symbol.for("next-patch"),tr.s8;var rM=r("./dist/esm/client/components/static-generation-bailout.js");let rL="__next_builtin__",rF=/^(.*[\\/])?next[\\/]dist[\\/]client[\\/]components[\\/]builtin[\\/]/;function rU(e,t){let r=process.cwd(),n=e.replace(r,""),i=(t||"").replace(/^\[project\]/,"").replace(n,"").replace(e,"").replace(r,"").replace(/^([\\/])*(src[\\/])?app[\\/]/,"");return rF.test(i)&&(i=i.replace(rF,""),i=`${rL}${i}`),i.replace(/\\/g,"/")}let rH="boundary:";function rB(e,t,r){let n=e[2],i=n[r]?n[r][1]:void 0;if(i)return rU(t,i)}function rz(e){return(0,h.getTracer)().trace(m.Fx.createComponentTree,{spanName:"build component tree"},()=>rW(e,!0))}function rq(e,t){throw Object.defineProperty(Error(`The default export is not a React Component in "${"/"===e?"":e}/${t}"`),"__NEXT_ERROR_CODE",{value:"E45",enumerable:!1,configurable:!0})}async function rW({loaderTree:e,parentParams:t,rootLayoutIncluded:n,injectedCSS:i,injectedJS:a,injectedFontPreloadTags:o,ctx:s,missingSlots:l,preloadCallbacks:u,authInterrupts:c,MetadataOutlet:d},f){let{renderOpts:{nextConfigOutput:p,experimental:g,cacheComponents:y},workStore:v,componentMod:{createElement:b,Fragment:w,SegmentViewNode:S,HTTPAccessFallbackBoundary:_,LayoutRouter:k,RenderFromTemplateContext:E,ClientPageRoot:x,ClientSegmentRoot:R,createServerSearchParamsForServerPage:C,createPrerenderSearchParamsForClientPage:T,createServerParamsForServerSegment:P,createPrerenderParamsForClientSegment:A,serverHooks:{DynamicServerError:O},Postpone:j},pagePath:$,getDynamicParamFromSegment:I,isPrefetch:D,query:N}=s,{page:M,conventionPath:L,segment:F,modules:U,parallelRoutes:H}=rx(e),{layout:B,template:z,error:q,loading:W,"not-found":G,forbidden:V,unauthorized:X}=U,K=new Set(i),Y=new Set(a),Q=new Set(o),Z=function({ctx:e,layoutOrPagePath:t,injectedCSS:r,injectedJS:n,injectedFontPreloadTags:i,preloadCallbacks:a}){let{componentMod:{createElement:o}}=e,{styles:s,scripts:l}=t?rb(e.clientReferenceManifest,t,r,n,!0):{styles:[],scripts:[]},u=t?rw(e.renderOpts.nextFontManifest,t,i):null;if(u)if(u.length)for(let t=0;t{e.componentMod.preloadFont(o,i,e.renderOpts.crossOrigin,e.nonce)})}else try{let t=new URL(e.assetPrefix);a.push(()=>{e.componentMod.preconnect(t.origin,"anonymous",e.nonce)})}catch(t){a.push(()=>{e.componentMod.preconnect("/","anonymous",e.nonce)})}let c=rC(s,e,a),d=l?l.map((t,r)=>o("script",{src:`${e.assetPrefix}/_next/${rp(t)}${rR(e,!0)}`,async:!0,key:`script-${r}`,nonce:e.nonce})):[];return c.length||d.length?[...c,...d]:null}({preloadCallbacks:u,ctx:s,layoutOrPagePath:L,injectedCSS:K,injectedJS:Y,injectedFontPreloadTags:Q}),[ee,et,er]=z?await rT({ctx:s,filePath:z[1],getComponent:z[0],injectedCSS:K,injectedJS:Y}):[w],[en,ei,ea]=q?await rT({ctx:s,filePath:q[1],getComponent:q[0],injectedCSS:K,injectedJS:Y}):[],[eo,es,el]=W?await rT({ctx:s,filePath:W[1],getComponent:W[0],injectedCSS:K,injectedJS:Y}):[],eu=void 0!==B,ec=void 0!==M,{mod:ed,modType:ef}=await (0,h.getTracer)().trace(m.Fx.getLayoutOrPageModule,{hideSpan:!(eu||ec),spanName:"resolve segment modules",attributes:{"next.segment":F}},()=>rk(e)),ep=eu&&!n,eh=n||ep,[em,eg]=G?await rT({ctx:s,filePath:G[1],getComponent:G[0],injectedCSS:K,injectedJS:Y}):[],ey=ed?ed.unstable_prefetch:void 0,ev=(null==ey?void 0:ey.mode)==="runtime",[eb,ew]=c&&V?await rT({ctx:s,filePath:V[1],getComponent:V[0],injectedCSS:K,injectedJS:Y}):[],[eS,e_]=c&&X?await rT({ctx:s,filePath:X[1],getComponent:X[0],injectedCSS:K,injectedJS:Y}):[],ek=null==ed?void 0:ed.dynamic;if("export"===p)if(ek&&"auto"!==ek){if("force-dynamic"===ek)throw Object.defineProperty(new rM.f('Page with `dynamic = "force-dynamic"` couldn\'t be exported. `output: "export"` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports'),"__NEXT_ERROR_CODE",{value:"E527",enumerable:!1,configurable:!0})}else ek="error";if("string"==typeof ek)if("error"===ek)v.dynamicShouldError=!0;else if("force-dynamic"===ek){if(v.forceDynamic=!0,v.isStaticGeneration&&!g.isRoutePPREnabled){let e=Object.defineProperty(new O('Page with `dynamic = "force-dynamic"` won\'t be rendered statically.'),"__NEXT_ERROR_CODE",{value:"E585",enumerable:!1,configurable:!0});throw v.dynamicUsageDescription=e.message,v.dynamicUsageStack=e.stack,e}}else v.dynamicShouldError=!1,v.forceStatic="force-static"===ek;if("string"==typeof(null==ed?void 0:ed.fetchCache)&&(v.fetchCache=null==ed?void 0:ed.fetchCache),void 0!==(null==ed?void 0:ed.revalidate)&&function(e,t){try{if(!1===e)J.AR;else if("number"==typeof e&&!isNaN(e)&&e>-1);else if(void 0!==e)throw Object.defineProperty(Error(`Invalid revalidate value "${e}" on "${t}", must be a non-negative number or false`),"__NEXT_ERROR_CODE",{value:"E179",enumerable:!1,configurable:!0})}catch(e){if(e instanceof Error&&e.message.includes("Invalid revalidate"))throw e;return}}(null==ed?void 0:ed.revalidate,v.route),"number"==typeof(null==ed?void 0:ed.revalidate)){let e=ed.revalidate,t=e4.workUnitAsyncStorage.getStore();if(t)switch(t.type){case"prerender":case"prerender-runtime":case"prerender-legacy":case"prerender-ppr":t.revalidate>e&&(t.revalidate=e)}if(!v.forceStatic&&v.isStaticGeneration&&0===e&&!g.isRoutePPREnabled){let e=`revalidate: 0 configured ${F}`;throw v.dynamicUsageDescription=e,Object.defineProperty(new O(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}let eE=v.isStaticGeneration,ex=eE&&!0===g.isRoutePPREnabled,eR=ed?rE(ed):void 0;if(eE){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");void 0===eR||e(eR)||rq($,ef??"page"),void 0===en||e(en)||rq($,"error"),void 0===eo||e(eo)||rq($,"loading"),void 0===em||e(em)||rq($,"not-found"),void 0===eb||e(eb)||rq($,"forbidden"),void 0===eS||e(eS)||rq($,"unauthorized")}let eC=I(F),eT=t;eC&&null!==eC.value&&(eT={...t,[eC.param]:eC.value});let eP=!!s.renderOpts.dev,eA=s.renderOpts.dir||"",[eO,ej]=await rX({ctx:s,conventionName:"not-found",Component:em,styles:eg,tree:e}),[e$]=await rX({ctx:s,conventionName:"forbidden",Component:eb,styles:ew,tree:e}),[eI]=await rX({ctx:s,conventionName:"unauthorized",Component:eS,styles:e_,tree:e}),eD=await Promise.all(Object.keys(H).map(async t=>{let r="children"===t,n=H[t],i=r?eO:void 0,a=r?e$:void 0,o=r?eI:void 0,p=null;D&&(eo||!rS(n))&&!g.isRoutePPREnabled||(p=await rW({loaderTree:n,parentParams:eT,rootLayoutIncluded:eh,injectedCSS:K,injectedJS:Y,injectedFontPreloadTags:Q,ctx:s,missingSlots:l,preloadCallbacks:u,authInterrupts:c,MetadataOutlet:r?d:null},!1));let h=b(ee,null,b(E,null)),m=rB(e,eA,"template"),y=rB(e,eA,"error"),v=rB(e,eA,"loading"),_=f?rB(e,eA,"global-error"):void 0,x=eP&&y?b(S,{type:"error",pagePath:y},ei):ei,R="@boundary",C=eP?b(w,null,ej&&b(S,{type:`${rH}not-found`,pagePath:ej+R}),v&&b(S,{type:`${rH}loading`,pagePath:v+R}),y&&b(S,{type:`${rH}error`,pagePath:y+R}),_&&b(S,{type:`${rH}global-error`,pagePath:rF.test(_)?`${rL}global-error.js${R}`:_})):null;return[t,b(k,{parallelRouterKey:t,error:en,errorStyles:x,errorScripts:ea,template:eP&&m?b(S,{type:"template",pagePath:m},h):h,templateStyles:et,templateScripts:er,notFound:i,forbidden:a,unauthorized:o,...eP&&{segmentViewBoundaries:C}}),p]})),eN={},eM={};for(let e of eD){let[t,r,n]=e;eN[t]=r,eM[t]=n}let eL=eo?b(eo,{key:"l"}):null,eF=rB(e,eA,"loading");eP&&eL&&eF&&(eL=b(S,{key:"c-loading",type:"loading",pagePath:eF},eL));let eU=eL?[eL,es,el]:null;if(!eR)return[b(w,{key:"c"},Z,eN.children),eM,eU,ex,ev];if(v.isStaticGeneration&&v.forceDynamic&&g.isRoutePPREnabled)return[b(w,{key:"c"},b(j,{reason:'dynamic = "force-dynamic" was used',route:v.route}),Z),eM,eU,!0,ev];let eH=function(e){let t=(null==e?void 0:e.default)||e;return(null==t?void 0:t.$$typeof)===Symbol.for("react.client.reference")}(ed);if(ec){let t;if(eH)if(y)t=b(x,{Component:eR,serverProvidedParams:null});else if(eE){let e=A(eT),r=T(v);t=b(x,{Component:eR,serverProvidedParams:{searchParams:N,params:eT,promises:[r,e]}})}else t=b(x,{Component:eR,serverProvidedParams:{searchParams:N,params:eT,promises:null}});else{let e=P(eT,v),r=C(N,v);t=r_(eR)?b(eR,{params:e,searchParams:r,$$isPage:!0}):b(eR,{params:e,searchParams:r})}let r=F===e5.WO,n=rB(e,eA,"page")??rB(e,eA,"defaultPage"),i=r?"default":"page",a=eP&&n?b(S,{key:"c-"+i,type:i,pagePath:n},t):t;return[b(w,{key:"c"},a,Z,d?b(d,null):null),eM,eU,ex,ev]}{let t,r=ep&&"children"in H&&Object.keys(H).length>1;if(eH){let e;if(y)e=b(R,{Component:eR,slots:eN,serverProvidedParams:null});else if(eE){let t=A(eT);e=b(R,{Component:eR,slots:eN,serverProvidedParams:{params:eT,promises:[t]}})}else e=b(R,{Component:eR,slots:eN,serverProvidedParams:{params:eT,promises:null}});if(r){let r,n,i;r=rG({ctx:s,ErrorBoundaryComponent:em,errorElement:eO,ClientSegmentRoot:R,layerAssets:Z,SegmentComponent:eR,currentParams:eT}),n=rG({ctx:s,ErrorBoundaryComponent:eb,errorElement:e$,ClientSegmentRoot:R,layerAssets:Z,SegmentComponent:eR,currentParams:eT}),i=rG({ctx:s,ErrorBoundaryComponent:eS,errorElement:eI,ClientSegmentRoot:R,layerAssets:Z,SegmentComponent:eR,currentParams:eT}),t=r||n||i?b(_,{key:"c",notFound:r,forbidden:n,unauthorized:i},Z,e):b(w,{key:"c"},Z,e)}else t=b(w,{key:"c"},Z,e)}else{let e,n=P(eT,v);e=r_(eR)?b(eR,{...eN,params:n,$$isLayout:!0},eN.children):b(eR,{...eN,params:n},eN.children),t=r?b(_,{key:"c",notFound:eO?b(w,null,Z,b(eR,{params:n},eg,eO)):void 0},Z,e):b(w,{key:"c"},Z,e)}let n=rB(e,eA,"layout");return[eP&&n?b(S,{key:"layout",type:"layout",pagePath:n},t):t,eM,eU,ex,ev]}}function rG({ctx:e,ErrorBoundaryComponent:t,errorElement:r,ClientSegmentRoot:n,layerAssets:i,SegmentComponent:a,currentParams:o}){let{componentMod:{createElement:s,Fragment:l}}=e;return t?s(l,null,i,s(n,{Component:a,slots:{children:r},params:o})):null}function rV(e,t,r){let{segment:n,modules:{layout:i},parallelRoutes:a}=rx(t),o=r(n),s=e;return(o&&null!==o.value&&(s={...e,[o.param]:o.value}),void 0!==i)?s:a.children?rV(s,a.children,r):s}async function rX({ctx:e,conventionName:t,Component:r,styles:n,tree:i}){let{componentMod:{createElement:a,Fragment:o}}=e,s=!!e.renderOpts.dev,l=e.renderOpts.dir||"",{SegmentViewNode:u}=e.componentMod,c=r?a(o,null,a(r,null),n):void 0,d=rB(i,l,t);return[s&&c?a(u,{key:"c-"+t,type:t,pagePath:d},c):c,d]}async function rJ({loaderTreeToFilter:e,parentParams:t,flightRouterState:r,parentIsInsideSharedLayout:n,rscHead:i,injectedCSS:a,injectedJS:o,injectedFontPreloadTags:s,rootLayoutIncluded:l,ctx:u,preloadCallbacks:c,MetadataOutlet:d}){let{renderOpts:{nextFontManifest:f,experimental:p},query:h,isPrefetch:m,getDynamicParamFromSegment:g,parsedRequestHeaders:y}=u,[v,b,w]=e,S=Object.keys(b),{layout:_}=w,k=void 0!==_&&!l,E=l||k,x=g(v),R=x&&null!==x.value?{...t,[x.param]:x.value}:t,C=(0,e5.HG)(x?x.treeSegment:v,h),T=!r||!(0,rv.t)(C,r[0])||0===S.length||"refetch"===r[3],P=T||n||"inside-shared-layout"===r[3];if(P&&!p.isRoutePPREnabled&&(y.isRouteTreePrefetchRequest||m&&!w.loading&&!rS(e)))return[[r&&rK(C,r[0])?r[0]:C,y.isRouteTreePrefetchRequest?tq(e,g):tz(e,g,h),null,[null,null],!0]];if(r&&"metadata-only"===r[3])return[[r&&rK(C,r[0])?r[0]:C,y.isRouteTreePrefetchRequest?tq(e,g):tz(e,g,h),null,i,!1]];if(T){let t=r&&rK(C,r[0])?r[0]:C,n=tz(e,g,h),f=await rz({ctx:u,loaderTree:e,parentParams:R,injectedCSS:a,injectedJS:o,injectedFontPreloadTags:s,rootLayoutIncluded:l,preloadCallbacks:c,authInterrupts:p.authInterrupts,MetadataOutlet:d});return[[t,n,f,i,!1]]}let A=null==_?void 0:_[1],O=new Set(a),j=new Set(o),$=new Set(s);A&&(rb(u.clientReferenceManifest,A,O,j,!0),rw(f,A,$));let I=[];for(let e of S){let t=b[e];for(let n of(await rJ({ctx:u,loaderTreeToFilter:t,parentParams:R,flightRouterState:r&&r[1][e],parentIsInsideSharedLayout:P,rscHead:i,injectedCSS:O,injectedJS:j,injectedFontPreloadTags:$,rootLayoutIncluded:E,preloadCallbacks:c,MetadataOutlet:d})))I.push([C,e,...n])}return I}let rK=(e,t)=>{var r;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(r=tj(e))?void 0:r.param)===t[0]},rY=Symbol.for("next.server.action-manifests");function rQ(e,t,r,n){let i=structuredClone(t),a=[{tree:e,depth:0}],o=r.split("/").slice(1);for(;a.length>0;){let{tree:e,depth:t}=a.pop(),{segment:r,parallelRoutes:s}=rx(e),l=tj(r);if(l&&!i.hasOwnProperty(l.param)&&!n?.has(l.param))switch(l.type){case"catchall":case"optional-catchall":case"catchall-intercepted":let u=o.slice(t).flatMap(e=>{let t=tj(e);return t?i[t.param]:e}).filter(e=>void 0!==e);u.length>0&&(i[l.param]=u);break;case"dynamic":case"dynamic-intercepted":if(tencodeURIComponent(e)):"string"==typeof n&&(n=encodeURIComponent(n));return n}(e,t,n);if(!i||0===i.length){if("oc"===r)return{param:t,value:null,type:r,treeSegment:[t,"",r]};throw Object.defineProperty(new ew.z(`Missing value for segment key: "${t}" with dynamic param type: ${r}`),"__NEXT_ERROR_CODE",{value:"E864",enumerable:!1,configurable:!0})}return{param:t,value:i,treeSegment:[t,Array.isArray(i)?i.join("/"):i,r],type:r}}let r0=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function r1(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}async function r2(e,t){return Promise.all(Array.from(e).map(([e,r])=>r.then(async r=>{if(t&&(0===r.revalidate||r.expire<300))return null;let[n,i]=r.value.tee();r.value=i;let a="";for await(let e of n)a+=function(e){let t=new Uint8Array(e),r=t.byteLength;if(r<65535)return String.fromCharCode.apply(null,t);let n="";for(let e=0;enull)))}async function r4(e,t){{if(0===e.fetch.size&&0===e.cache.size)return"null";let n={store:{fetch:Object.fromEntries(Array.from(e.fetch.entries())),cache:Object.fromEntries((await r2(e.cache.entries(),t)).filter(e=>null!==e)),encryptedBoundArgs:Object.fromEntries(Array.from(e.encryptedBoundArgs.entries()))}},{deflateSync:i}=r("node:zlib");return i(JSON.stringify(n)).toString("base64")}}function r3(){return{cache:new Map,fetch:new Map,encryptedBoundArgs:new Map,decryptedBoundArgs:new Map}}function r6(e){{if("string"!=typeof e)return e;if("null"===e)return{cache:new Map,fetch:new Map,encryptedBoundArgs:new Map,decryptedBoundArgs:new Map};let{inflateSync:t}=r("node:zlib"),n=JSON.parse(t(Buffer.from(e,"base64")).toString("utf-8"));return{cache:function(e){let t=new Map;for(let[r,{value:n,tags:i,stale:a,timestamp:o,expire:s,revalidate:l}]of e)t.set(r,Promise.resolve({value:new ReadableStream({start(e){e.enqueue(function(e){let t=e.length,r=new Uint8Array(t);for(let n=0;n{process.nextTick(()=>e(s))});return ne.set(e,t),t}}return ne.set(e,s),s}function ni(e,t,r){let n=t?``))}catch(t){e.error(t)}},async pull(e){try{let{done:t,value:r}=await i.read();if(r)try{let i=a.decode(r,{stream:!t});na(e,n,i)}catch{na(e,n,r)}t&&e.close()}catch(t){e.error(t)}}})}function na(e,t,r){let n;n="string"==typeof r?tD(JSON.stringify([1,r])):tD(JSON.stringify([3,btoa(String.fromCodePoint(...r))])),e.enqueue(nt.encode(`${t}self.__next_f.push(${n})`))}"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class no extends Error{}class ns extends Error{}function nl(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function nu(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function nc(e,t,r=!0){let n=new URL("http://n"),i=t?new URL(t,n):e.startsWith(".")?new URL("http://n"):n,{pathname:a,searchParams:o,search:s,hash:l,href:u,origin:c}=new URL(e,i);if(c!==n.origin)throw Object.defineProperty(Error(`invariant: invalid relative URL, router received ${e}`),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:a,query:r?nl(o):void 0,search:s,hash:l,href:u.slice(c.length),slashes:void 0}}let nd=p.createContext(null),nf=p.createContext(null),np=p.createContext(null),nh=p.createContext(null),nm=p.createContext(new Set);var ng=r("./dist/esm/client/components/router-reducer/router-reducer-types.js"),ny=r("./dist/esm/client/components/router-reducer/create-href-from-url.js");let nv=(0,p.createContext)(null),nb=(0,p.createContext)(null),nw=(0,p.createContext)(null),nS=(0,p.createContext)(null);function n_(e,t){let r=Promise.resolve(t);return r.status="fulfilled",r.value=t,r.displayName=`${e} (SSR)`,r}var nk=r("./dist/esm/client/components/use-action-queue.js");let nE="next-route-announcer";function nx({tree:e}){let[t,r]=(0,p.useState)(null);(0,p.useEffect)(()=>(r(function(){let e=document.getElementsByName(nE)[0];if(e?.shadowRoot?.childNodes[0])return e.shadowRoot.childNodes[0];{let e=document.createElement(nE);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(nE)[0];e?.isConnected&&document.body.removeChild(e)}),[]);let[n,i]=(0,p.useState)(""),a=(0,p.useRef)(void 0);return(0,p.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==a.current&&a.current!==e&&i(e),a.current=e},[e]),t?(0,rh.createPortal)(n,t):null}function nR(){let e=(0,p.useContext)(nd);if(null===e)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return e}function nC({redirect:e,reset:t,redirectType:r}){let n=nR();return(0,p.useEffect)(()=>{p.startTransition(()=>{r===tn.zB.push?n.push(e,{}):n.replace(e,{}),t()})},[e,r,t,n]),null}tr.s8,tr.s8,r("./dist/esm/client/components/unstable-rethrow.server.js").X,r("./dist/esm/server/app-render/dynamic-rendering.js").Ip,r("./dist/esm/server/app-render/dynamic-rendering.js").FD;class nT extends p.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if((0,tn.nJ)(e))return{redirect:ti(e),redirectType:ta(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,d.jsx)(nC,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}}function nP({children:e}){let t=nR();return(0,d.jsx)(nT,{router:t,children:e})}var nA=r("./dist/esm/client/components/router-reducer/create-router-cache-key.js");let nO={then:()=>{}},nj=process.env.__NEXT_ROUTER_BASEPATH||"",n$=process.env.__NEXT_ROUTER_BASEPATH||"";r("./dist/esm/client/components/router-reducer/reducers/navigate-reducer.js"),r("./dist/esm/client/components/router-reducer/fetch-server-response.js"),r("./dist/esm/client/components/router-reducer/ppr-navigations.js");var nI=r("./dist/esm/client/components/segment-cache.js");r("./dist/esm/client/app-call-server.js"),r("./dist/esm/client/app-find-source-map-url.js"),r("./dist/compiled/react-server-dom-turbopack-experimental/client.node.js");var nD=r("./dist/esm/client/add-base-path.js"),nN=r("./dist/esm/client/components/app-router-utils.js"),nM=r("./dist/esm/client/components/links.js");function nL(e,t){null!==e.pending?(e.pending=e.pending.next,null!==e.pending&&nF({actionQueue:e,action:e.pending,setState:t})):e.needsRefresh&&(e.needsRefresh=!1,e.dispatch({type:ng.z8,origin:window.location.origin},t))}async function nF({actionQueue:e,action:t,setState:r}){let n=e.state;e.pending=t;let i=t.payload,a=e.action(n,i);function o(n){if(t.discarded){t.payload.type===ng.s8&&t.payload.didRevalidate&&(e.needsRefresh=!0),nL(e,r);return}e.state=n,nL(e,r),t.resolve(n)}(0,eL.Q)(a)?a.then(o,n=>{nL(e,r),t.reject(n)}):o(a)}function nU(e,t){let r={state:e,dispatch:(e,t)=>(function(e,t,r){let n={resolve:r,reject:()=>{}};if(t.type!==ng.IU){let e=new Promise((e,t)=>{n={resolve:e,reject:t}});(0,p.startTransition)(()=>{r(e)})}let i={payload:t,next:null,resolve:n.resolve,reject:n.reject};null===e.pending?(e.last=i,nF({actionQueue:e,action:i,setState:r})):t.type===ng.Zb||t.type===ng.IU?(e.pending.discarded=!0,i.next=e.pending.next,nF({actionQueue:e,action:i,setState:r})):(null!==e.last&&(e.last.next=i),e.last=i)})(r,e,t),action:async(e,t)=>e,pending:null,last:null,onRouterTransitionStart:null!==t&&"function"==typeof t.onRouterTransitionStart?t.onRouterTransitionStart:null};return r}function nH(e,t,r,n){let i=new URL((0,nD.O)(e),location.href);process.env.__NEXT_APP_NAV_FAIL_HANDLING&&(window.next.__pendingUrl=i),(0,nM.DZ)(n);(0,nk.D)({type:ng.Zb,url:i,isExternalUrl:(0,nN.P)(i),locationSearch:location.search,shouldScroll:r,navigateType:t})}let nB={back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{let r,n=function(){throw Object.defineProperty(Error("Internal Next.js error: Router action dispatched before initialization."),"__NEXT_ERROR_CODE",{value:"E668",enumerable:!1,configurable:!0})}();switch(t?.kind??ng.ob.AUTO){case ng.ob.AUTO:r=nI.Am.PPR;break;case ng.ob.FULL:r=nI.Am.Full;break;case ng.ob.TEMPORARY:return;default:r=nI.Am.PPR}(0,nI.yj)(e,n.state.nextUrl,n.state.tree,r,t?.onInvalidate??null)},replace:(e,t)=>{(0,p.startTransition)(()=>{nH(e,"replace",t?.scroll??!0,null)})},push:(e,t)=>{(0,p.startTransition)(()=>{nH(e,"push",t?.scroll??!0,null)})},refresh:()=>{(0,p.startTransition)(()=>{(0,nk.D)({type:ng.z8,origin:window.location.origin})})},hmrRefresh:()=>{throw Object.defineProperty(Error("hmrRefresh can only be used in development mode. Please use refresh instead."),"__NEXT_ERROR_CODE",{value:"E485",enumerable:!1,configurable:!0})}};p.Component;let nz=r("../../app-render/work-async-storage.external").workAsyncStorage;function nq({error:e}){if(nz){let t=nz.getStore();if(t?.isStaticGeneration)throw e&&console.error(e),e}return null}r("./dist/esm/shared/lib/router/utils/is-bot.js");class nW extends p.Component{constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}static getDerivedStateFromError(e){if((0,ty.p)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){let{error:r}=t;return(process.env.__NEXT_APP_NAV_FAIL_HANDLING&&r,e.pathname!==t.previousPathname&&t.error)?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error&&1?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(nq,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,d.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}}function nG({errorComponent:e,errorStyles:t,errorScripts:n,children:i}){let a=!function(){{let{workUnitAsyncStorage:e}=r("../../app-render/work-unit-async-storage.external"),t=e.getStore();if(!t)return!1;switch(t.type){case"prerender":case"prerender-client":case"prerender-ppr":let n=t.fallbackRouteParams;return!!n&&n.size>0}return!1}}()?(0,p.useContext)(nb):null;return e?(0,d.jsx)(nW,{pathname:a,errorComponent:e,errorStyles:t,errorScripts:n,children:i}):(0,d.jsx)(d.Fragment,{children:i})}function nV({children:e,errorComponent:t,errorStyles:r,errorScripts:n}){return(0,d.jsx)(nG,{errorComponent:t,errorStyles:r,errorScripts:n,children:e})}let nX={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}},nJ=function({error:e}){let t=e?.digest;return(0,d.jsxs)("html",{id:"__next_error__",children:[(0,d.jsx)("head",{}),(0,d.jsxs)("body",{children:[(0,d.jsx)(nq,{error:e}),(0,d.jsx)("div",{style:nX.error,children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("h2",{style:nX.text,children:["Application error: a ",t?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",t?"server logs":"browser console"," for more information)."]}),t?(0,d.jsx)("p",{style:nX.text,children:`Digest: ${t}`}):null]})})]})]})};var nK=r("./dist/esm/lib/framework/boundary-constants.js");let nY={[nK.NJ]:function({children:e}){return e},[nK.A$]:function({children:e}){return e},[nK.DQ]:function({children:e}){return e},[nK.ri]:function({children:e}){return e}};nY[nK.NJ.slice(0)],nY[nK.A$.slice(0)],nY[nK.DQ.slice(0)];let nQ=nY[nK.ri.slice(0)],nZ={};function n0({appRouterState:e}){return(0,p.useInsertionEffect)(()=>{process.env.__NEXT_APP_NAV_FAIL_HANDLING&&(window.next.__pendingUrl=void 0);let{tree:t,pushRef:r,canonicalUrl:n,renderedSearch:i}=e,a={...r.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:{tree:t,renderedSearch:i}};r.pendingPush&&(0,ny.F)(new URL(window.location.href))!==n?(r.pendingPush=!1,window.history.pushState(a,"",n)):window.history.replaceState(a,"",n)},[e]),(0,p.useEffect)(()=>{process.env.__NEXT_CLIENT_SEGMENT_CACHE&&(0,nM.eP)(e.nextUrl,e.tree)},[e.nextUrl,e.tree]),null}function n1(e){null==e&&(e={});let t=window.history.state,r=t?.__NA;r&&(e.__NA=r);let n=t?.__PRIVATE_NEXTJS_INTERNALS_TREE;return n&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=n),e}function n2({headCacheNode:e}){let t=null!==e?e.head:null,r=null!==e?e.prefetchHead:null,n=null!==r?r:t;return(0,p.useDeferredValue)(t,n)}function n4({actionQueue:e,globalError:t,webSocket:r,staticIndicatorState:n}){let i,a=(0,nk.n)(e),{canonicalUrl:o}=a,{searchParams:s,pathname:l}=(0,p.useMemo)(()=>{var e;let t=new URL(o,"http://n");return{searchParams:t.searchParams,pathname:er(t.pathname,nj)?(e=t.pathname,process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!er(e,nj)||0===n$.length||(e=e.slice(n$.length)).startsWith("/")||(e=`/${e}`),e):t.pathname}},[o]);(0,p.useEffect)(()=>{function e(e){e.persisted&&window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE&&(nZ.pendingMpaPath=void 0,(0,nk.D)({type:ng.IU,url:new URL(window.location.href),historyState:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[]),(0,p.useEffect)(()=>{function e(e){let t="reason"in e?e.reason:e.error;if((0,tn.nJ)(t)){e.preventDefault();let r=ti(t);ta(t)===tn.zB.push?nB.push(r,{}):nB.replace(r,{})}}return window.addEventListener("error",e),window.addEventListener("unhandledrejection",e),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",e)}},[]);let{pushRef:u}=a;if(u.mpaNavigation){if(nZ.pendingMpaPath!==o){let e=window.location;u.pendingPush?e.assign(o):e.replace(o),nZ.pendingMpaPath=o}throw nO}(0,p.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),r=e=>{let t=window.location.href,r=window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,p.startTransition)(()=>{(0,nk.D)({type:ng.IU,url:new URL(e??t,t),historyState:r})})};window.history.pushState=function(t,n,i){return t?.__NA||t?._N||(t=n1(t),i&&r(i)),e(t,n,i)},window.history.replaceState=function(e,n,i){return e?.__NA||e?._N||(e=n1(e),i&&r(i)),t(e,n,i)};let n=e=>{if(e.state){if(!e.state.__NA)return void window.location.reload();(0,p.startTransition)(()=>{var t,r;t=window.location.href,r=e.state.__PRIVATE_NEXTJS_INTERNALS_TREE,(0,nk.D)({type:ng.IU,url:new URL(t),historyState:r})})}};return window.addEventListener("popstate",n),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",n)}},[]);let{cache:c,tree:f,nextUrl:h,focusAndScrollRef:m,previousNextUrl:g}=a,y=(0,p.useMemo)(()=>(function e(t,r,n,i){if(0===Object.keys(r).length)return[t,n,i];let a=Object.keys(r).filter(e=>"children"!==e);for(let i of("children"in r&&a.unshift("children"),a)){let[a,o]=r[i];if(a===e5.WO)continue;let s=t.parallelRoutes.get(i);if(!s)continue;let l=(0,nA.p)(a),u=(0,nA.p)(a,!0),c=s.get(l);if(!c)continue;let d=e(c,o,n+"/"+l,n+"/"+u);if(d)return d}return null})(c,f[1],"",""),[c,f]),v=(0,p.useMemo)(()=>(function e(t,r={}){for(let n of Object.values(t[1])){let t=n[0],i=Array.isArray(t),a=i?t[1]:t;!a||a.startsWith(e5.OG)||(i&&("c"===t[2]||"oc"===t[2])?r[t[0]]=t[1].split("/"):i&&(r[t[0]]=t[1]),r=e(n,r))}return r})(f),[f]),b=(0,p.useMemo)(()=>({parentTree:f,parentCacheNode:c,parentSegmentPath:null,parentParams:{},debugNameContext:"/",url:o,isActive:!0}),[f,c,o]),w=(0,p.useMemo)(()=>({tree:f,focusAndScrollRef:m,nextUrl:h,previousNextUrl:g}),[f,m,h,g]);if(null!==y){let[e,t,r]=y;i=(0,d.jsx)(n2,{headCacheNode:e},r)}else i=null;let S=(0,d.jsxs)(nP,{children:[i,(0,d.jsx)(nQ,{children:c.rsc}),(0,d.jsx)(nx,{tree:f})]});return S=(0,d.jsx)(nV,{errorComponent:t[0],errorStyles:t[1],children:S}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n0,{appRouterState:a}),(0,d.jsx)(n9,{}),(0,d.jsx)(nS.Provider,{value:null,children:(0,d.jsx)(nw.Provider,{value:v,children:(0,d.jsx)(nb.Provider,{value:l,children:(0,d.jsx)(nv.Provider,{value:s,children:(0,d.jsx)(np.Provider,{value:w,children:(0,d.jsx)(nd.Provider,{value:nB,children:(0,d.jsx)(nf.Provider,{value:b,children:S})})})})})})})]})}function n3({actionQueue:e,globalErrorState:t,webSocket:r,staticIndicatorState:n}){process.env.__NEXT_APP_NAV_FAIL_HANDLING&&(0,p.useEffect)(()=>{let e=e=>{"reason"in e?e.reason:e.error};return window.addEventListener("unhandledrejection",e),window.addEventListener("error",e),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",e)}},[]);let i=(0,d.jsx)(n4,{actionQueue:e,globalError:t,webSocket:r,staticIndicatorState:n});return(0,d.jsx)(nV,{errorComponent:nJ,children:i})}let n6=new Set,n8=new Set;function n9(){let[,e]=p.useState(0),t=n6.size;(0,p.useEffect)(()=>{let r=()=>e(e=>e+1);return n8.add(r),t!==n6.size&&r(),()=>{n8.delete(r)}},[t,e]);let r=process.env.NEXT_DEPLOYMENT_ID?`?dpl=${process.env.NEXT_DEPLOYMENT_ID}`:"";return[...n6].map((e,t)=>(0,d.jsx)("link",{rel:"stylesheet",href:`${e}${r}`,precedence:"next"},t))}globalThis._N_E_STYLE_LOAD=function(e){let t=n6.size;return n6.add(e),n6.size!==t&&n8.forEach(e=>e()),Promise.resolve()};var n5=r("./dist/esm/client/flight-data-helpers.js");function n7({navigatedAt:e,initialFlightData:t,initialCanonicalUrlParts:r,initialRenderedSearch:n,initialParallelRoutes:i,location:a}){let o=r.join("/"),{tree:s,seedData:l,head:u}=(0,n5.GN)(t[0]),c={lazyData:null,rsc:l?.[0],prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:i,loading:l?.[2]??null,navigatedAt:e},d=a?(0,ny.F)(a):o;return!function e(t,r){let[n,i,,a]=t;for(let o in n.includes(e5.OG)&&"refresh"!==a&&(t[2]=r,t[3]="refresh"),i)e(i[o],r)}(s,d),(null===i||0===i.size)&&function e(t,r,n,i,a,o){if(0===Object.keys(i[1]).length){r.head=o;return}for(let s in i[1]){let l,u=i[1][s],c=u[0],d=(0,nA.p)(c),f=null!==a&&void 0!==a[1][s]?a[1][s]:null;if(n){let i=n.parallelRoutes.get(s);if(i){let n,a=new Map(i),l=a.get(d);n=null!==f?{lazyData:null,rsc:f[0],prefetchRsc:null,head:null,prefetchHead:null,loading:f[2],parallelRoutes:new Map(l?.parallelRoutes),navigatedAt:t}:{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map(l?.parallelRoutes),loading:null,navigatedAt:t},a.set(d,n),e(t,n,l,u,f||null,o),r.parallelRoutes.set(s,a);continue}}if(null!==f){let e=f[0],r=f[2];l={lazyData:null,rsc:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:r,navigatedAt:t}}else l={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:null,navigatedAt:t};let p=r.parallelRoutes.get(s);p?p.set(d,l):r.parallelRoutes.set(s,new Map([[d,l]])),e(t,l,void 0,u,f,o)}}(e,c,void 0,s,l,u),{tree:s,cache:c,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:d,renderedSearch:n,nextUrl:(function e(t){var r;let n=Array.isArray(t[0])?t[0][1]:t[0];if(n===e5.WO||tA.some(e=>n.startsWith(e)))return;if(n.startsWith(e5.OG))return"";let i=["string"==typeof(r=n)?"children"===r?"":r:r[1]],a=t[1]??{},o=a.children?e(a.children):void 0;if(void 0!==o)i.push(o);else for(let[t,r]of Object.entries(a)){if("children"===t)continue;let n=e(r);void 0!==n&&i.push(n)}return i.reduce((e,t)=>{let r;return""===(t="/"===(r=t)[0]?r.slice(1):r)||(0,e5.V)(t)?e:`${e}/${t}`},"")||"/"}(s)||a?.pathname)??null,previousNextUrl:null,debugInfo:null}}function ie(e,t){return new Promise((r,n)=>{let i;setTimeout(()=>{try{(i=e()).catch(()=>{})}catch(e){n(e)}},0),setTimeout(()=>{t(),r(i)},0)})}class it{constructor(e){this._stream=e}tee(){if(null===this._stream)throw Object.defineProperty(Error("Cannot tee a ReactServerResult that has already been consumed"),"__NEXT_ERROR_CODE",{value:"E106",enumerable:!1,configurable:!0});let e=this._stream.tee();return this._stream=e[0],e[1]}consume(){if(null===this._stream)throw Object.defineProperty(Error("Cannot consume a ReactServerResult that has already been consumed"),"__NEXT_ERROR_CODE",{value:"E470",enumerable:!1,configurable:!0});let e=this._stream;return this._stream=null,e}}async function ir(e){let t=[],{prelude:r}=await e,n=r.getReader();for(;;){let{done:e,value:r}=await n.read();if(e)return new ia(t);t.push(r)}}async function ii(e){let t=[],r=e.getReader();for(;;){let{done:e,value:n}=await r.read();if(e)break;t.push(n)}return new ia(t)}class ia{assertChunks(e){if(null===this._chunks)throw Object.defineProperty(new ew.z(`Cannot \`${e}\` on a ReactServerPrerenderResult that has already been consumed.`),"__NEXT_ERROR_CODE",{value:"E593",enumerable:!1,configurable:!0});return this._chunks}consumeChunks(e){let t=this.assertChunks(e);return this.consume(),t}consume(){this._chunks=null}constructor(e){this._chunks=e}asUnclosingStream(){return io(this.assertChunks("asUnclosingStream()"))}consumeAsUnclosingStream(){return io(this.consumeChunks("consumeAsUnclosingStream()"))}asStream(){return is(this.assertChunks("asStream()"))}consumeAsStream(){return is(this.consumeChunks("consumeAsStream()"))}}function io(e){let t=0;return new ReadableStream({async pull(r){t-1){let e=Object.defineProperty(Error(`Route ${t} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. + +Original Error: ${r}`),"__NEXT_ERROR_CODE",{value:"E362",enumerable:!1,configurable:!0});e.stack="Error: "+e.message+n.slice(i),console.error(e);return}}}else"string"==typeof e&&(r=e);if(r)return void console.error(`Route ${t} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. No stack was provided. + +Original Message: ${r}`);console.error(`Route ${t} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. The thrown value is logged just following this message`),console.error(e)}}require("next/dist/server/app-render/console-async-storage.external.js");class ic{constructor(){this.count=0,this.earlyListeners=[],this.listeners=[],this.tickPending=!1,this.pendingTimeoutCleanup=null,this.subscribedSignals=null,this.invokeListenersIfNoPendingReads=()=>{if(this.pendingTimeoutCleanup=null,0===this.count){for(let e=0;eprocess.nextTick(()=>{if(this.tickPending=!1,0===this.count){for(let e=0;e{t=clearTimeout.bind(null,setTimeout(e,0))});return t=clearImmediate.bind(null,r),()=>t()}(this.invokeListenersIfNoPendingReads)}inputReady(){return new Promise(e=>{this.earlyListeners.push(e),0===this.count&&this.noMorePendingCaches()})}cacheReady(){return new Promise(e=>{this.listeners.push(e),0===this.count&&this.noMorePendingCaches()})}beginRead(){if(this.count++,this.pendingTimeoutCleanup&&(this.pendingTimeoutCleanup(),this.pendingTimeoutCleanup=null),null!==this.subscribedSignals)for(let e of this.subscribedSignals)e.beginRead()}endRead(){if(0===this.count)throw Object.defineProperty(new ew.z("CacheSignal got more endRead() calls than beginRead() calls"),"__NEXT_ERROR_CODE",{value:"E678",enumerable:!1,configurable:!0});if(this.count--,0===this.count&&this.noMorePendingCaches(),null!==this.subscribedSignals)for(let e of this.subscribedSignals)e.endRead()}hasPendingReads(){return this.count>0}trackRead(e){this.beginRead();let t=this.endRead.bind(this);return e.then(t,t),e}subscribeToReads(e){if(e===this)throw Object.defineProperty(new ew.z("A CacheSignal cannot subscribe to itself"),"__NEXT_ERROR_CODE",{value:"E679",enumerable:!1,configurable:!0});null===this.subscribedSignals&&(this.subscribedSignals=new Set),this.subscribedSignals.add(e);for(let t=0;tt.includes(e))}function ip(e){let t=!1;return async function(){return t?"":(t=!0,``)}}var ih=r("./dist/compiled/path-to-regexp/index.js");let im=/[|\\{}()[\]^$+*?.-]/,ig=/[|\\{}()[\]^$+*?.-]/g;function iy(e){return im.test(e)?e.replace(ig,"\\$&"):e}function iv(e,{includeSuffix:t=!1,includePrefix:r=!1,excludeOptionalTrailingSlash:n=!1}={}){let{parameterizedRoute:i,groups:a}=function(e,t,r){let n={},i=1,a=[];for(let o of(0,Q.U)(e).slice(1).split("/")){let e=tA.find(e=>o.startsWith(e)),s=o.match(r0);if(e&&s&&s[2]){let{key:t,optional:r,repeat:o}=r1(s[2]);n[t]={pos:i++,repeat:o,optional:r},a.push(`/${iy(e)}([^/]+?)`)}else if(s&&s[2]){let{key:e,repeat:t,optional:o}=r1(s[2]);n[e]={pos:i++,repeat:t,optional:o},r&&s[1]&&a.push(`/${iy(s[1])}`);let l=t?o?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";r&&s[1]&&(l=l.substring(1)),a.push(l)}else a.push(`/${iy(o)}`);t&&s&&s[3]&&a.push(iy(s[3]))}return{parameterizedRoute:a.join(""),groups:n}}(e,t,r),o=i;return n||(o+="(?:/)?"),{re:RegExp(`^${o}$`),groups:a}}function ib({interceptionMarker:e,getSafeRouteKey:t,segment:r,routeKeys:n,keyPrefix:i,backreferenceDuplicateKeys:a}){let o,{key:s,optional:l,repeat:u}=r1(r),c=s.replace(/\W/g,"");i&&(c=`${i}${c}`);let d=!1;(0===c.length||c.length>30)&&(d=!0),isNaN(parseInt(c.slice(0,1)))||(d=!0),d&&(c=t());let f=c in n;i?n[c]=`${i}${s}`:n[c]=s;let p=e?iy(e):"";return o=f&&a?`\\k<${c}>`:u?`(?<${c}>.+?)`:`(?<${c}>[^/]+?)`,{key:s,pattern:l?`(?:/${p}${o})?`:`/${p}${o}`,cleanedKey:c,optional:l,repeat:u}}let iw="_NEXTSEP_";function iS(e){return"string"==typeof e&&!!(/\/\(\.{1,3}\):[^/\s]+/.test(e)||/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(e))}function i_(e){let t=e;return(t=t.replace(/(\([^)]*\)):([^/\s]+)/g,`$1${iw}:$2`)).replace(/:([^:/\s)]+)(?=:)/g,`:$1${iw}`)}function ik(e){return e.replace(RegExp(`\\)${iw}`,"g"),")")}function iE(e,t,r){if("string"!=typeof e)return(0,ih.pathToRegexp)(e,t,r);let n=iS(e),i=n?i_(e):e;try{return(0,ih.pathToRegexp)(i,t,r)}catch(i){if(!n)try{let n=i_(e);return(0,ih.pathToRegexp)(n,t,r)}catch(e){}throw i}}function ix(e,t){let r=iS(e),n=r?i_(e):e;try{let e=(0,ih.compile)(n,t);if(r)return t=>ik(e(t));return e}catch(n){if(!r)try{let r=i_(e),n=(0,ih.compile)(r,t);return e=>ik(n(e))}catch(e){}throw n}}function iR({re:e,groups:t}){var r;return r=r=>{let n=e.exec(r);if(!n)return!1;let i=e=>{try{return decodeURIComponent(e)}catch{throw Object.defineProperty(new no("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},a={};for(let[e,r]of Object.entries(t)){let t=n[r.pos];void 0!==t&&(r.repeat?a[e]=t.split("/").map(e=>i(e)):a[e]=i(t))}return a},e=>{let t=r(e);if(!t)return!1;let n={};for(let[e,r]of Object.entries(t))"string"==typeof r?n[e]=r.replace(RegExp(`^${iw}`),""):Array.isArray(r)?n[e]=r.map(e=>"string"==typeof e?e.replace(RegExp(`^${iw}`),""):e):n[e]=r;return n}}function iC(e){return e.replace(/__ESC_COLON_/gi,":")}function iT(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(`:${r}`)&&(e=e.replace(RegExp(`:${r}\\*`,"g"),`:${r}--ESCAPED_PARAM_ASTERISKS`).replace(RegExp(`:${r}\\?`,"g"),`:${r}--ESCAPED_PARAM_QUESTION`).replace(RegExp(`:${r}\\+`,"g"),`:${r}--ESCAPED_PARAM_PLUS`).replace(RegExp(`:${r}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${r}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),ix(`/${e}`,{validate:!1})(t).slice(1)}function iP(e){try{return decodeURIComponent(e)}catch{return e}}function iA(e){let t=function(e){let t;try{t=new URL(e,"http://n")}catch{}return t}(e);if(!t)return;let r={};for(let e of t.searchParams.keys()){let n=t.searchParams.getAll(e);r[e]=n.length>1?n:n[0]}return{query:r,hash:t.hash,search:t.search,path:t.pathname,pathname:t.pathname,href:`${t.pathname}${t.search}${t.hash}`,host:"",hostname:"",auth:"",protocol:"",slashes:null,port:""}}let iO=/https?|ftp|gopher|file/;function ij(e,t){for(let r in delete e.nextInternalLocale,e){let n=r!==J.AA&&r.startsWith(J.AA),i=r!==J.h&&r.startsWith(J.h);(n||i||t.includes(r))&&delete e[r]}}function i$(e,t){return"string"==typeof e[J.vS]&&e[J.c1]===t?e[J.vS].split(","):[]}let iI=require("next/dist/server/app-render/module-loading/track-module-loading.external.js");var iD=r("./dist/esm/shared/lib/promise-with-resolvers.js");let iN={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1},iM=p.createContext(iN),iL=void 0;function iF({createElement:e,pagePath:t,statusCode:r,isPossibleServerAction:n}){return!n&&("/404"===t||"number"==typeof r&&r>400)?e("meta",{name:"robots",content:"noindex"}):null}async function iU(e,t){let r="",{componentMod:{routeModule:{userland:{loaderTree:n}},createElement:i,createMetadataComponents:a,Fragment:o},getDynamicParamFromSegment:s,query:l,requestId:u,flightRouterState:c,workStore:d,url:f}=e,p=!!e.renderOpts.serveStreamingMetadata;if(!(null==t?void 0:t.skipFlight)){let{Viewport:t,Metadata:h,MetadataOutlet:m}=a({tree:n,parsedQuery:l,pathname:f.pathname,metadataContext:ek(e.renderOpts),getDynamicParamFromSegment:s,workStore:d,serveStreamingMetadata:p});r=(await rJ({ctx:e,loaderTreeToFilter:n,parentParams:{},flightRouterState:c,rscHead:i(o,{key:"h"},i(iF,{createElement:i,pagePath:e.pagePath,statusCode:e.res.statusCode,isPossibleServerAction:e.isPossibleServerAction}),i(t,{key:u+"v"}),i(h,{key:u+"m"})),injectedCSS:new Set,injectedJS:new Set,injectedFontPreloadTags:new Set,rootLayoutIncluded:!1,preloadCallbacks:[],MetadataOutlet:m})).map(e=>e.slice(1))}return(null==t?void 0:t.actionResult)?{a:t.actionResult,f:r,b:e.sharedContext.buildId}:{b:e.sharedContext.buildId,f:r,S:d.isStaticGeneration}}function iH(e,t){var r;return{routerKind:"App Router",routePath:e.pagePath,routeType:e.isPossibleServerAction?"action":"render",renderSource:t,revalidateReason:(r=e.workStore).isOnDemandRevalidate?"on-demand":r.isStaticGeneration?"stale":void 0}}async function iB(e,t,r,n){let{clientReferenceManifest:i,componentMod:{renderToReadableStream:a},htmlRequestId:o,renderOpts:s,requestId:l,workStore:u}=t,{dev:c=!1,onInstrumentationRequestError:d,setReactDebugChannel:f}=s,p=tR(c,function(r){return null==d?void 0:d(r,e,iH(t,"react-server-components-payload"))}),h=f&&i3();h&&f(h.clientSide,o,l);let m=await e4.workUnitAsyncStorage.run(r,iU,t,n);return new tl(e4.workUnitAsyncStorage.run(r,a,m,i.clientModules,{onError:p,temporaryReferences:null==n?void 0:n.temporaryReferences,filterStackFrame:iL,debugChannel:null==h?void 0:h.serverSide}),{fetchMetrics:u.fetchMetrics})}async function iz(e,t,r,n){let{workStore:i}=r,a=r.renderOpts,o=tR(!1,function(t){return null==a.onInstrumentationRequestError?void 0:a.onInstrumentationRequestError.call(a,t,e,iH(r,"react-server-components-payload"))}),s={},l=()=>iU(r,void 0),{componentMod:{routeModule:{userland:{loaderTree:u}}},getDynamicParamFromSegment:c}=r,d=rV({},u,c),f=r3();await iq(r,l,f,null,d,n.headers,n.cookies,n.draftMode);let p=await iW(r,l,f,null,d,n.headers,n.cookies,n.draftMode,o);return i2(p,s,i),s.fetchMetrics=r.workStore.fetchMetrics,p.isPartial&&t.setHeader(x.jc,"1"),new tl(p.result.prelude,s)}async function iq(e,t,r,n,i,a,o,s){let{implicitTags:l,renderOpts:u,workStore:c}=e,{clientReferenceManifest:d,ComponentMod:f}=u;iY(d);let p=new AbortController,h=new AbortController,m=new ic,g={type:"prerender-runtime",phase:"render",rootParams:i,implicitTags:l,renderSignal:h.signal,controller:p,cacheSignal:m,dynamicTracking:null,revalidate:1,expire:0,stale:J.AR,tags:[...l.tags],renderResumeDataCache:n,prerenderResumeDataCache:r,hmrRefreshHash:void 0,captureOwnerStack:void 0,runtimeStagePromise:null,headers:a,cookies:o,draftMode:s},y=await e4.workUnitAsyncStorage.run(g,t),v=e4.workUnitAsyncStorage.run(g,f.prerender,y,d.clientModules,{filterStackFrame:iL,onError:e=>{let t=tx(e);if(t)return t;!p.signal.aborted&&(process.env.NEXT_DEBUG_BUILD||process.env.__NEXT_VERBOSE_LOGGING)&&iu(e,c.route)},onPostpone:void 0,signal:h.signal});if((0,iI.trackPendingModules)(m),await m.cacheReady(),h.abort(),p.abort(),c.invalidDynamicUsageError)throw c.invalidDynamicUsageError;try{return await ir(v)}catch(e){return h.signal.aborted||p.signal.aborted||(process.env.NEXT_DEBUG_BUILD||process.env.__NEXT_VERBOSE_LOGGING)&&iu(e,c.route),null}}async function iW(e,t,r,n,i,a,o,s,l){var u,c,d;let{implicitTags:f,renderOpts:p}=e,{clientReferenceManifest:h,ComponentMod:m,experimental:g,isDebugDynamicAccesses:y}=p;iY(h);let v=i5(g),b=!1,w=new AbortController,S=(0,tv.uO)(y),{promise:_,resolve:k}=(0,iD.b)(),E={type:"prerender-runtime",phase:"render",rootParams:i,implicitTags:f,renderSignal:w.signal,controller:w,cacheSignal:null,dynamicTracking:S,revalidate:1,expire:0,stale:J.AR,tags:[...f.tags],prerenderResumeDataCache:r,renderResumeDataCache:n,hmrRefreshHash:void 0,captureOwnerStack:void 0,runtimeStagePromise:_,headers:a,cookies:o,draftMode:s},x=await e4.workUnitAsyncStorage.run(E,t),R=!0;return{result:await (u=async()=>{let e=await e4.workUnitAsyncStorage.run(E,m.prerender,x,h.clientModules,{filterStackFrame:iL,onError:l,signal:w.signal});return R=!1,e},c=()=>{k()},d=()=>{if(w.signal.aborted){b=!0;return}R&&(b=!0),w.abort()},new Promise((e,t)=>{let r;setTimeout(()=>{try{(r=u()).catch(()=>{})}catch(e){t(e)}},0),setTimeout(()=>{c()},0),setTimeout(()=>{d(),e(r)},0)})),dynamicAccess:S,isPartial:b,collectedRevalidate:E.revalidate,collectedExpire:E.expire,collectedStale:v(E.stale),collectedTags:E.tags}}function iG(e){return(e.pathname+e.search).split("/")}function iV(e){let t=[];for(let r in e){let n=e[r];if(null!=n)if(Array.isArray(n))for(let e of n)t.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(e))}`);else t.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`)}return 0===t.length?"":"?"+t.join("&")}async function iX(e,t,r){let n,i=new Set,a=new Set,o=new Set,{getDynamicParamFromSegment:s,query:l,appUsingSizeAdjustment:u,componentMod:{createMetadataComponents:c,createElement:d,Fragment:f},url:p,workStore:h}=t,m=tz(e,s,l),g=!!t.renderOpts.serveStreamingMetadata,y=!!e[2]["global-not-found"],{Viewport:v,Metadata:b,MetadataOutlet:w}=c({tree:e,errorType:r&&!y?"not-found":void 0,parsedQuery:l,pathname:p.pathname,metadataContext:ek(t.renderOpts),getDynamicParamFromSegment:s,workStore:h,serveStreamingMetadata:g}),S=[],_=await rz({ctx:t,loaderTree:e,parentParams:{},injectedCSS:i,injectedJS:a,injectedFontPreloadTags:o,rootLayoutIncluded:!1,missingSlots:n,preloadCallbacks:S,authInterrupts:t.renderOpts.experimental.authInterrupts,MetadataOutlet:w}),k=t.res.getHeader("vary"),E="string"==typeof k&&k.includes(x.kO),R=d(f,{key:"h"},d(iF,{createElement:d,pagePath:t.pagePath,statusCode:t.res.statusCode,isPossibleServerAction:t.isPossibleServerAction}),d(v,null),d(b,null),u?d("meta",{name:"next-size-adjust",content:""}):null),{GlobalError:C,styles:T}=await i9(e,t),P=h.isStaticGeneration&&!0===t.renderOpts.experimental.isRoutePPREnabled;return{P:d(iJ,{preloadCallbacks:S}),b:t.sharedContext.buildId,c:iG(p),q:iV(l),i:!!E,f:[[m,_,R,P]],m:n,G:[C,T],s:"string"==typeof t.renderOpts.postponed,S:h.isStaticGeneration}}function iJ({preloadCallbacks:e}){return e.forEach(e=>e()),null}async function iK(e,t,r,n){let{getDynamicParamFromSegment:i,query:a,componentMod:{createMetadataComponents:o,createElement:s,Fragment:l},url:u,workStore:c}=t,d=!!t.renderOpts.serveStreamingMetadata,{Viewport:f,Metadata:p}=o({tree:e,parsedQuery:a,pathname:u.pathname,metadataContext:ek(t.renderOpts),errorType:n,getDynamicParamFromSegment:i,workStore:c,serveStreamingMetadata:d}),h=s(l,{key:"h"},s(iF,{createElement:s,pagePath:t.pagePath,statusCode:t.res.statusCode,isPossibleServerAction:t.isPossibleServerAction}),s(f,null),!1,s(p,null)),m=tz(e,i,a);r&&(tS(r)||Object.defineProperty(Error(r+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}));let g=[s("html",{id:"__next_error__"},s("head",null),s("body",null,null)),{},null,!1,!1],{GlobalError:y,styles:v}=await i9(e,t),b=c.isStaticGeneration&&!0===t.renderOpts.experimental.isRoutePPREnabled;return{b:t.sharedContext.buildId,c:iG(u),q:iV(a),m:void 0,i:!1,f:[[m,g,h,b]],G:[y,v],s:"string"==typeof t.renderOpts.postponed,S:c.isStaticGeneration}}function iY(e){if(!e)throw Object.defineProperty(new ew.z("Expected clientReferenceManifest to be defined."),"__NEXT_ERROR_CODE",{value:"E692",enumerable:!1,configurable:!0})}function iQ({reactServerStream:e,reactDebugStream:t,preinitScripts:n,clientReferenceManifest:i,ServerInsertedHTMLProvider:a,nonce:o,images:s}){n();let l=p.use(nn(e,t,i,o)),u=nU(n7({navigatedAt:-1,initialFlightData:l.f,initialCanonicalUrlParts:l.c,initialRenderedSearch:l.q,initialParallelRoutes:new Map,location:null}),null),{HeadManagerContext:c}=r("./dist/esm/shared/lib/head-manager-context.shared-runtime.js");return(0,d.jsx)(c.Provider,{value:{appDir:!0,nonce:o},children:(0,d.jsx)(iM.Provider,{value:s??iN,children:(0,d.jsx)(a,{children:(0,d.jsx)(n3,{actionQueue:u,globalErrorState:l.G})})})})}function iZ({reactServerStream:e,reactDebugStream:t,preinitScripts:r,clientReferenceManifest:n,ServerInsertedHTMLProvider:i,nonce:a,images:o}){r();let s=p.use(nn(e,t,n,a)),l=nU(n7({navigatedAt:-1,initialFlightData:s.f,initialCanonicalUrlParts:s.c,initialRenderedSearch:s.q,initialParallelRoutes:new Map,location:null}),null);return(0,d.jsx)(iM.Provider,{value:o??iN,children:(0,d.jsx)(i,{children:(0,d.jsx)(n3,{actionQueue:l,globalErrorState:s.G})})})}async function i0(e,t,n,i,a,o,s,l,u,c,d,p,g){let y,v,b="/404"===i;b&&(t.statusCode=404);let w=Date.now(),{clientReferenceManifest:S,serverActionsManifest:_,ComponentMod:k,nextFontManifest:E,serverActions:x,assetPrefix:R="",enableTainting:C,cacheComponents:T}=o;if(k.__next_app__){let e="performance"in globalThis?{require:(...e)=>{let t=performance.now();0===eh&&(eh=t);try{return eg+=1,k.__next_app__.require(...e)}finally{em+=performance.now()-t}},loadChunk:(...e)=>{let t=performance.now(),r=k.__next_app__.loadChunk(...e);return r.finally(()=>{em+=performance.now()-t}),r}}:k.__next_app__,t=()=>{if(!T)return!1;if(o.dev)return!0;let e=e4.workUnitAsyncStorage.getStore();if(!e)return!1;switch(e.type){case"prerender":case"prerender-client":case"prerender-runtime":case"cache":case"private-cache":return!0;case"prerender-ppr":case"prerender-legacy":case"request":case"unstable-cache":return!1}};globalThis.__next_require__=(...r)=>{let n=e.require(...r);return t()&&(0,iI.trackPendingImport)(n),n},globalThis.__next_chunk_load__=(...r)=>{let n=e.loadChunk(...r);return t()&&(0,iI.trackPendingChunkLoad)(n),n}}t.onClose(()=>{s.shouldTrackFetchMetrics=!1}),e.originalRequest.on("end",()=>{if("performance"in globalThis){let e=ey({reset:!0});e&&(0,h.getTracer)().startSpan(m.Fx.clientComponentLoading,{startTime:e.clientComponentLoadStart,attributes:{"next.clientComponentLoadCount":e.clientComponentLoadCount,"next.span_type":m.Fx.clientComponentLoading}}).end(e.clientComponentLoadStart+e.clientComponentLoadTimes)}});let P={statusCode:b?404:void 0},A=!!(null==E?void 0:E.appUsingSizeAdjust);iY(S);let O=function({serverActionsManifest:e}){return new Proxy({},{get:(t,r)=>{var n,i;let a,o=null==(i=e.node)||null==(n=i[r])?void 0:n.workers;if(!o)return;let s=f.workAsyncStorage.getStore();if(!(a=s?o[t7(s.page)]:Object.values(o).at(0)))return;let{moduleId:l,async:u}=a;return{id:l,name:r,chunks:[],async:u}}})}({serverActionsManifest:_});!function({page:e,clientReferenceManifest:t,serverActionsManifest:r,serverModuleMap:n}){var i;let a=null==(i=globalThis[rY])?void 0:i.clientReferenceManifestsPerPage;globalThis[rY]={clientReferenceManifestsPerPage:{...a,[e7(e)]:t},serverActionsManifest:r,serverModuleMap:n}}({page:s.page,clientReferenceManifest:S,serverActionsManifest:_,serverModuleMap:O}),k.patchFetch();let{routeModule:{userland:{loaderTree:j}},taintObjectReference:I}=k;C&&I("Do not pass process.env to Client Components since it will leak sensitive data",process.env),s.fetchMetrics=[],P.fetchMetrics=s.fetchMetrics;var D=a={...a};for(let e of e_)delete D[e];let{isStaticGeneration:N}=s,{flightRouterState:M,isPrefetchRequest:L,isRuntimePrefetchRequest:F,isRSCRequest:U,isHmrRefresh:H,nonce:B}=l;l.requestId?y=l.requestId:N?y=Buffer.from(await crypto.subtle.digest("SHA-1",Buffer.from(e.url))).toString("hex"):y=r("./dist/compiled/nanoid/index.cjs").nanoid(),v=l.htmlRequestId||y;let z=function(e){let t=tj(e);return t?rZ(p,t.param,tP[t.type],g):null},q=tG(e).isPossibleServerAction,W=await ts(s.page,n,g),G={componentMod:k,url:n,renderOpts:o,workStore:s,parsedRequestHeaders:l,getDynamicParamFromSegment:z,query:a,isPrefetch:L,isPossibleServerAction:q,requestTimestamp:w,appUsingSizeAdjustment:A,flightRouterState:M,requestId:y,htmlRequestId:v,pagePath:i,clientReferenceManifest:S,assetPrefix:R,isNotFoundPath:b,nonce:B,res:t,sharedContext:d,implicitTags:W};if((0,h.getTracer)().setRootSpanAttribute("next.route",i),N){let r=(0,h.getTracer)().wrap(m.Wc.getBodyResult,{spanName:`prerender route (app) ${i}`,attributes:{"next.route":i}},i8),a=await r(e,t,G,P,j,g);if(a.dynamicAccess&&(0,tv.Lu)(a.dynamicAccess)&&o.isDebugDynamicAccesses)for(let e of(t5("The following dynamic usage was detected:"),(0,tv.JL)(a.dynamicAccess)))t5(e);if(s.invalidDynamicUsageError)throw(0,tv.gR)(s,s.invalidDynamicUsageError),new rM.f;if(a.digestErrorsMap.size){let e=a.digestErrorsMap.values().next().value;if(e)throw e}if(a.ssrErrors.length){let e=a.ssrErrors.find(e=>!ev(e)&&!(0,tm.C)(e)&&!(0,ty.p)(e));if(e)throw e}let l={metadata:P,contentType:J.j9};if(s.pendingRevalidates||s.pendingRevalidateWrites||s.pendingRevalidatedTags){let e=eZ(s).finally(()=>{process.env.NEXT_PRIVATE_DEBUG_CACHE&&console.log("pending revalidates promise finished for:",n)});o.waitUntil?o.waitUntil(e):l.waitUntil=e}return i2(a,P,s),a.renderResumeDataCache&&(P.renderResumeDataCache=a.renderResumeDataCache),new eS(await $(a.stream),l)}{let r=o.renderResumeDataCache??(null==u?void 0:u.renderResumeDataCache)??null,a=rV({},j,G.getDynamicParamFromSegment),l=X(e,"devValidatingFallbackParams")||null,d=eD.bind(null,e,t,n,a,W,o.onUpdateCookies,o.previewProps,H,c,r,l),f=d();if(U)if(F)return iz(e,t,G,f);else return iB(e,G,f);let p=(0,h.getTracer)().wrap(m.Wc.getBodyResult,{spanName:`render route (app) ${i}`,attributes:{"next.route":i}},i4),g=!1,y=null;if(q){f.renderResumeDataCache=null;let n=await rs({req:e,res:t,ComponentMod:k,serverModuleMap:O,generateFlight:iB,workStore:s,requestStore:f,serverActions:x,ctx:G,metadata:P});if(n){if("not-found"===n.type){let r=function(e){let t=e[2],r=!!t["global-not-found"],n=r?{layout:t["global-not-found"],page:[()=>null,"next/dist/client/components/builtin/empty-stub"]}:{page:t["not-found"]};return["",{children:[e5.OG,{},n]},r?t:{}]}(j);return t.statusCode=404,P.statusCode=404,new eS(await p(f,e,t,G,r,y,u,P,void 0,l),{metadata:P,contentType:J.j9})}else if("done"===n.type)if(n.result)return n.result.assignMetadata(P),n.result;else n.formState&&(y=n.formState)}g=!0,f.renderResumeDataCache=r}let v={metadata:P,contentType:J.j9},b=await p(f,e,t,G,j,y,u,P,g?void 0:d,l);if(s.invalidDynamicUsageError&&s.dev)throw s.invalidDynamicUsageError;if(s.pendingRevalidates||s.pendingRevalidateWrites||s.pendingRevalidatedTags){let e=eZ(s).finally(()=>{process.env.NEXT_PRIVATE_DEBUG_CACHE&&console.log("pending revalidates promise finished for:",n)});o.waitUntil?o.waitUntil(e):v.waitUntil=e}return new eS(b,v)}}let i1=(e,t,r,n,i,a,o,s)=>{var l;let u;if(!e.url)throw Object.defineProperty(Error("Invalid URL"),"__NEXT_ERROR_CODE",{value:"E182",enumerable:!1,configurable:!0});let c=nc(e.url,void 0,!1),d=function(e,t){let r,n,i="1"===e[x._V],a="2"===e[x._V],o=void 0!==e[x.sX],s=void 0!==e[x.hY],l=!s||i&&t.isRoutePPREnabled?void 0:function(e){if(void 0!==e){if(Array.isArray(e))throw Object.defineProperty(Error("Multiple router state headers were sent. This is not allowed."),"__NEXT_ERROR_CODE",{value:"E418",enumerable:!1,configurable:!0});if(e.length>4e4)throw Object.defineProperty(Error("The router state header was too large."),"__NEXT_ERROR_CODE",{value:"E142",enumerable:!1,configurable:!0});try{let t=JSON.parse(decodeURIComponent(e));return(0,tN.assert)(t,tU),t}catch{throw Object.defineProperty(Error("The router state header was sent but could not be parsed."),"__NEXT_ERROR_CODE",{value:"E10",enumerable:!1,configurable:!0})}}}(e[x.B]),u="/_tree"===e[x.qm],c=e["content-security-policy"]||e["content-security-policy-report-only"],d="string"==typeof c?function(e){var t;let r=e.split(";").map(e=>e.trim()),n=r.find(e=>e.startsWith("script-src"))||r.find(e=>e.startsWith("default-src"));if(!n)return;let i=null==(t=n.split(" ").slice(1).map(e=>e.trim()).find(e=>e.startsWith("'nonce-")&&e.length>8&&e.endsWith("'")))?void 0:t.slice(7,-1);if(i){if(tI.test(i))throw Object.defineProperty(Error("Nonce value from Content-Security-Policy contained HTML escape characters.\nLearn more: https://nextjs.org/docs/messages/nonce-contained-invalid-characters"),"__NEXT_ERROR_CODE",{value:"E440",enumerable:!1,configurable:!0});return i}}(c):void 0;return{flightRouterState:l,isPrefetchRequest:i,isRuntimePrefetchRequest:a,isRouteTreePrefetchRequest:u,isHmrRefresh:o,isRSCRequest:s,nonce:d,previouslyRevalidatedTags:i$(e,t.previewModeId),requestId:r,htmlRequestId:n}}(e.headers,{isRoutePPREnabled:!0===a.experimental.isRoutePPREnabled,previewModeId:null==(l=a.previewProps)?void 0:l.previewModeId}),{isPrefetchRequest:p,previouslyRevalidatedTags:h,nonce:m}=d,g=null;if("string"==typeof a.postponed){if(i)throw Object.defineProperty(new ew.z("postponed state should not be provided when fallback params are provided"),"__NEXT_ERROR_CODE",{value:"E592",enumerable:!1,configurable:!0});u=rQ(a.ComponentMod.routeModule.userland.loaderTree,a.params??{},r,i),g=function(e,t){try{var r,n;let i=null==(r=e.match(/^([0-9]*):/))?void 0:r[1];if(!i)throw Object.defineProperty(Error(`Invariant: invalid postponed state ${e}`),"__NEXT_ERROR_CODE",{value:"E314",enumerable:!1,configurable:!0});let a=parseInt(i),o=e.slice(i.length+1,i.length+a+1),s=r6(e.slice(i.length+a+1));try{if("null"===o)return{type:1,renderResumeDataCache:s};if(/^[0-9]/.test(o)){let e=null==(n=o.match(/^([0-9]*)/))?void 0:n[1];if(!e)throw Object.defineProperty(Error(`Invariant: invalid postponed state ${JSON.stringify(o)}`),"__NEXT_ERROR_CODE",{value:"E314",enumerable:!1,configurable:!0});let r=parseInt(e),i=JSON.parse(o.slice(e.length,e.length+r)),a=o.slice(e.length+r);for(let[e,[r,n]]of i){let{treeSegment:[,i]}=rZ(t,e,n,null);a=a.replaceAll(r,i)}return{type:2,data:JSON.parse(a),renderResumeDataCache:s}}return{type:2,data:JSON.parse(o),renderResumeDataCache:s}}catch(e){return console.error("Failed to parse postponed state",e),{type:1,renderResumeDataCache:s}}}catch(e){return console.error("Failed to parse postponed state",e),{type:1,renderResumeDataCache:r3()}}}(a.postponed,u)}else u=rQ(a.ComponentMod.routeModule.userland.loaderTree,a.params??{},r,i);if((null==g?void 0:g.renderResumeDataCache)&&a.renderResumeDataCache)throw Object.defineProperty(new ew.z("postponed state and dev warmup immutable resume data cache should not be provided together"),"__NEXT_ERROR_CODE",{value:"E589",enumerable:!1,configurable:!0});let y=function({page:e,renderOpts:t,isPrefetchRequest:r,buildId:n,previouslyRevalidatedTags:i,nonce:a}){let o=!t.shouldWaitOnAllReady&&!t.supportsDynamicResponse&&!t.isDraftMode&&!t.isPossibleServerAction,s=t.dev??!1,l=s||o&&(!!process.env.NEXT_DEBUG_BUILD||"1"===process.env.NEXT_SSG_FETCH_METRICS),u={isStaticGeneration:o,page:e,route:e7(e),incrementalCache:t.incrementalCache||globalThis.__incrementalCache,cacheLifeProfiles:t.cacheLifeProfiles,isBuildTimePrerendering:t.nextExport,hasReadableErrorStacks:t.hasReadableErrorStacks,fetchCache:t.fetchCache,isOnDemandRevalidate:t.isOnDemandRevalidate,isDraftMode:t.isDraftMode,isPrefetchRequest:r,buildId:n,reactLoadableManifest:(null==t?void 0:t.reactLoadableManifest)||{},assetPrefix:(null==t?void 0:t.assetPrefix)||"",nonce:a,afterContext:function(e){let{waitUntil:t,onClose:r,onAfterTaskError:n}=e;return new e6({waitUntil:t,onClose:r,onTaskError:n})}(t),cacheComponentsEnabled:t.cacheComponents,dev:s,previouslyRevalidatedTags:i,refreshTagsByCacheKind:function(){let e=new Map,t=eJ();if(t)for(let[r,n]of t)"refreshTags"in n&&e.set(r,tt(async()=>n.refreshTags()));return e}(),runInCleanSnapshot:e2?e2.snapshot():function(e,...t){return e(...t)},shouldTrackFetchMetrics:l};return t.store=u,u}({page:a.routeModule.definition.page,renderOpts:a,isPrefetchRequest:p,buildId:s.buildId,previouslyRevalidatedTags:h,nonce:m});return f.workAsyncStorage.run(y,i0,e,t,c,r,n,a,y,d,g,o,s,u,i)};function i2(e,t,r){e.collectedTags&&(t.fetchTags=e.collectedTags.join(","));let n=String(e.collectedStale);t.headers??={},t.headers[x.UK]=n,!1===r.forceStatic||0===e.collectedRevalidate?t.cacheControl={revalidate:0,expire:void 0}:t.cacheControl={revalidate:!(e.collectedRevalidate>=J.AR)&&e.collectedRevalidate,expire:e.collectedExpire>=J.AR?void 0:e.collectedExpire},0===t.cacheControl.revalidate&&(t.staticBailoutInfo={description:r.dynamicUsageDescription,stack:r.dynamicUsageStack})}async function i4(e,t,n,i,a,o,s,l,u,c){let f,{assetPrefix:p,htmlRequestId:m,nonce:g,pagePath:y,renderOpts:v,requestId:b,workStore:w}=i,{basePath:S,buildManifest:_,clientReferenceManifest:k,ComponentMod:{createElement:E,renderToReadableStream:x},crossOrigin:R,dev:C=!1,experimental:T,nextExport:O=!1,onInstrumentationRequestError:j,page:$,reactMaxHeadersLength:I,setReactDebugChannel:D,shouldWaitOnAllReady:M,subresourceIntegrityManifest:L,supportsDynamicResponse:F,cacheComponents:H}=v;iY(k);let{ServerInsertedHTMLProvider:z,renderServerInsertedHTML:q}=rf(),W=ip(g),V=id((0,h.getTracer)().getTracePropagationData(),T.clientTraceMetadata),X=_.polyfillFiles.filter(e=>e.endsWith(".js")&&!e.endsWith(".module.js")).map(e=>({src:`${p}/_next/${e}${rR(i,!1)}`,integrity:null==L?void 0:L[e],crossOrigin:R,noModule:!0,nonce:g})),[J,K]=rm(_,p,R,L,rR(i,!0),g,$),Y=void 0,Q=new Map,ee=tC(C,O,Q,!1,function(e){return null==j?void 0:j(e,t,iH(i,"react-server-components"))}),et=[],er=tT(C,O,Q,et,!1,function(e){return null==j?void 0:j(e,t,iH(i,"server-rendering"))}),en=null,ei=n.setHeader.bind(n),ea=n.appendHeader.bind(n);try{{let t=await e4.workUnitAsyncStorage.run(e,iX,a,i,404===n.statusCode),r=D&&i3();if(r){let[e,t]=r.clientSide.readable.tee();f=e,D({readable:t},m,b)}en=new it(e4.workUnitAsyncStorage.run(e,x,t,k.clientModules,{filterStackFrame:iL,onError:ee,debugChannel:null==r?void 0:r.serverSide}))}if(await new Promise(e=>setImmediate(e)),"string"==typeof v.postponed){if((null==s?void 0:s.type)===r8.DATA){let e=ni(en.tee(),g,o);return P(e,A(U))}else if(s){let{postponed:t,preludeState:n}=function(e){let[t,r]=e.data;return{preludeState:t,postponed:r}}(s),a=r("./dist/build/webpack/alias/react-dom-server-experimental.js").resume,l=await e4.workUnitAsyncStorage.run(e,a,(0,d.jsx)(iQ,{reactServerStream:en.tee(),reactDebugStream:f,preinitScripts:J,clientReferenceManifest:k,ServerInsertedHTMLProvider:z,nonce:g,images:i.renderOpts.images}),t,{onError:er,nonce:g}),u=ry({polyfills:X,renderServerInsertedHTML:q,serverCapturedErrors:et,basePath:S,tracingMetadata:V});return await G(l,{delayDataUntilFirstHtmlChunk:n===r9.Empty,inlinedDataStream:ni(en.consume(),g,o),getServerInsertedHTML:u,getServerInsertedMetadata:W})}}let t=r("./dist/build/webpack/alias/react-dom-server-experimental.js").renderToReadableStream,l=await e4.workUnitAsyncStorage.run(e,t,(0,d.jsx)(iQ,{reactServerStream:en.tee(),reactDebugStream:f,preinitScripts:J,clientReferenceManifest:k,ServerInsertedHTMLProvider:z,nonce:g,images:i.renderOpts.images}),{onError:er,nonce:g,onHeaders:e=>{e.forEach((e,t)=>{ea(t,e)})},maxHeadersLength:I,bootstrapScriptContent:Y,bootstrapScripts:[K],formState:o}),u=ry({polyfills:X,renderServerInsertedHTML:q,serverCapturedErrors:et,basePath:S,tracingMetadata:V});return await B(l,{inlinedDataStream:ni(en.consume(),g,o),isStaticGeneration:!0!==F||!!M,isBuildTimePrerendering:!0===i.workStore.isBuildTimePrerendering,buildId:i.workStore.buildId,getServerInsertedHTML:u,getServerInsertedMetadata:W,validateRootLayout:C})}catch(m){let t;if((0,rM.l)(m)||"object"==typeof m&&null!==m&&"message"in m&&"string"==typeof m.message&&m.message.includes("https://nextjs.org/docs/advanced-features/static-html-export"))throw m;let s=(0,tm.C)(m);if(s){let e=tp(m);throw t9(`${m.reason} should be wrapped in a suspense boundary at page "${y}". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout +${e}`),m}if((0,tr.RM)(m))n.statusCode=(0,tr.jT)(m),l.statusCode=n.statusCode,t=(0,tr.qe)(n.statusCode);else if((0,tn.nJ)(m)){t="redirect",n.statusCode=to(m),l.statusCode=n.statusCode;let r=(0,Z.B)(ti(m),S),i=new Headers;(function(e,t){let r=eP(t);if(0===r.length)return!1;let n=new ed.VO(e),i=n.getAll();for(let e of r)n.set(e);for(let e of i)n.set(e);return!0})(i,e.mutableCookies)&&ei("set-cookie",Array.from(i.values())),ei("location",r)}else s||(n.statusCode=500,l.statusCode=n.statusCode);let[u,c]=rm(_,p,R,L,rR(i,!1),g,"/_not-found/page"),f=await e4.workUnitAsyncStorage.run(e,iK,a,i,Q.has(m.digest)?null:m,t),h=e4.workUnitAsyncStorage.run(e,x,f,k.clientModules,{filterStackFrame:iL,onError:ee});if(null===en)throw m;try{let t=await e4.workUnitAsyncStorage.run(e,N,{ReactDOMServer:r("./dist/build/webpack/alias/react-dom-server-experimental.js"),element:(0,d.jsx)(iZ,{reactServerStream:h,reactDebugStream:void 0,ServerInsertedHTMLProvider:z,preinitScripts:u,clientReferenceManifest:k,nonce:g,images:i.renderOpts.images}),streamOptions:{nonce:g,bootstrapScriptContent:Y,bootstrapScripts:[c],formState:o}});return await B(t,{inlinedDataStream:ni(en.consume(),g,o),isStaticGeneration:!0!==F||!!M,isBuildTimePrerendering:!0===i.workStore.isBuildTimePrerendering,buildId:i.workStore.buildId,getServerInsertedHTML:ry({polyfills:X,renderServerInsertedHTML:q,serverCapturedErrors:[],basePath:S,tracingMetadata:V}),getServerInsertedMetadata:W,validateRootLayout:C})}catch(e){throw e}}}function i3(){}function i6(e){let{isStaticGeneration:t}=e;return!!t}async function i8(e,t,n,i,a,o){let{assetPrefix:s,getDynamicParamFromSegment:l,implicitTags:u,nonce:c,pagePath:f,renderOpts:p,workStore:m}=n,{allowEmptyStaticShell:g=!1,basePath:y,buildManifest:v,clientReferenceManifest:b,ComponentMod:w,crossOrigin:S,dev:_=!1,experimental:k,isDebugDynamicAccesses:E,nextExport:x=!1,onInstrumentationRequestError:R,page:C,reactMaxHeadersLength:T,subresourceIntegrityManifest:A,cacheComponents:O}=p;iY(b);let $=rV({},a,l),{ServerInsertedHTMLProvider:I,renderServerInsertedHTML:D}=rf(),M=ip(c),L=id((0,h.getTracer)().getTracePropagationData(),k.clientTraceMetadata),F=v.polyfillFiles.filter(e=>e.endsWith(".js")&&!e.endsWith(".module.js")).map(e=>({src:`${s}/_next/${e}${rR(n,!1)}`,integrity:null==A?void 0:A[e],crossOrigin:S,noModule:!0,nonce:c})),[U,H]=rm(v,s,S,A,rR(n,!0),c,C),G=new Map,V=!!k.isRoutePPREnabled,X=tC(_,x,G,V,function(t){return null==R?void 0:R(t,e,iH(n,"react-server-components"))}),K=[],Y=tT(_,x,G,K,V,function(t){return null==R?void 0:R(t,e,iH(n,"server-rendering"))}),Q=null,ee=e=>{i.headers??={},i.headers[e]=t.getHeader(e)},et=(e,r)=>{Array.isArray(r)?r.forEach(r=>{t.appendHeader(e,r)}):t.appendHeader(e,r),ee(e)},er=i5(k),en=null;try{if(O){let e,s,l=new AbortController,f=new AbortController,h=new AbortController,v=new ic,S=null,_=null;e=p.renderResumeDataCache?S=p.renderResumeDataCache:_=r3();let k={type:"prerender",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,renderSignal:h.signal,controller:new AbortController,cacheSignal:v,dynamicTracking:null,allowEmptyStaticShell:g,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:_,renderResumeDataCache:S,hmrRefreshHash:void 0,captureOwnerStack:void 0},x=await e4.workUnitAsyncStorage.run(k,iX,a,n,404===t.statusCode),R=en={type:"prerender",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,renderSignal:h.signal,controller:l,cacheSignal:v,dynamicTracking:null,allowEmptyStaticShell:g,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:_,renderResumeDataCache:S,hmrRefreshHash:void 0,captureOwnerStack:void 0},C=e4.workUnitAsyncStorage.run(R,w.prerender,x,b.clientModules,{filterStackFrame:iL,onError:e=>{let t=tx(e);return t||(tE(e)?void console.error(e):l.signal.aborted?void 0:void((process.env.NEXT_DEBUG_BUILD||process.env.__NEXT_VERBOSE_LOGGING)&&iu(e,m.route)))},onPostpone:void 0,signal:f.signal});if(f.signal.addEventListener("abort",()=>{h.abort(),l.abort()},{once:!0}),(0,iI.trackPendingModules)(v),await v.cacheReady(),f.abort(),m.invalidDynamicUsageError)throw(0,tv.gR)(m,m.invalidDynamicUsageError),new rM.f;try{s=await ir(C)}catch(e){f.signal.aborted||l.signal.aborted||(process.env.NEXT_DEBUG_BUILD||process.env.__NEXT_VERBOSE_LOGGING)&&iu(e,m.route)}if(s){let e=new AbortController,t=new AbortController,i=new AbortController,a={type:"prerender-client",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,renderSignal:i.signal,controller:e,cacheSignal:null,dynamicTracking:null,allowEmptyStaticShell:g,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:_,renderResumeDataCache:S,hmrRefreshHash:void 0,captureOwnerStack:void 0},l=r("./dist/compiled/react-dom-experimental/static.node.js").prerender,f=e4.workUnitAsyncStorage.run(a,l,(0,d.jsx)(iQ,{reactServerStream:s.asUnclosingStream(),reactDebugStream:void 0,preinitScripts:U,clientReferenceManifest:b,ServerInsertedHTMLProvider:I,nonce:c,images:n.renderOpts.images}),{signal:t.signal,onError:e=>{let r=tx(e);return r||(tE(e)?void console.error(e):void(t.signal.aborted||(process.env.NEXT_DEBUG_BUILD||process.env.__NEXT_VERBOSE_LOGGING)&&iu(e,m.route)))},bootstrapScripts:[H]});t.signal.addEventListener("abort",()=>{i.abort()},{once:!0}),f.catch(e=>{t.signal.aborted||(0,tv.AA)(e)||(process.env.NEXT_DEBUG_BUILD||process.env.__NEXT_VERBOSE_LOGGING)&&iu(e,m.route)}),(0,iI.trackPendingModules)(v),await v.cacheReady(),t.abort()}let A=new AbortController,N=new AbortController,B={type:"prerender",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,renderSignal:N.signal,controller:new AbortController,cacheSignal:null,dynamicTracking:null,allowEmptyStaticShell:g,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:_,renderResumeDataCache:S,hmrRefreshHash:void 0,captureOwnerStack:void 0},V=await e4.workUnitAsyncStorage.run(B,iX,a,n,404===t.statusCode),Z=(0,tv.uO)(E),ee=!1,ei=en={type:"prerender",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,renderSignal:N.signal,controller:A,cacheSignal:null,dynamicTracking:Z,allowEmptyStaticShell:g,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:_,renderResumeDataCache:S,hmrRefreshHash:void 0,captureOwnerStack:void 0},ea=!0,eo=Q=await ir(ie(async()=>{let e=e4.workUnitAsyncStorage.run(ei,w.prerender,V,b.clientModules,{filterStackFrame:iL,onError:e=>X(e),signal:A.signal});A.signal.addEventListener("abort",()=>{N.abort()},{once:!0});let t=await e;return ea=!1,t},()=>{if(A.signal.aborted){ee=!0;return}ea&&(ee=!0),A.abort()})),es=(0,tv.uO)(E),el=new AbortController,eu=new AbortController,ec={type:"prerender-client",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,renderSignal:eu.signal,controller:el,cacheSignal:null,dynamicTracking:es,allowEmptyStaticShell:g,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:_,renderResumeDataCache:S,hmrRefreshHash:void 0,captureOwnerStack:void 0},ed=(0,tv.Wt)(),ef=r("./dist/compiled/react-dom-experimental/static.node.js").prerender,{prelude:ep,postponed:eh}=await ie(()=>{let e=e4.workUnitAsyncStorage.run(ec,ef,(0,d.jsx)(iQ,{reactServerStream:eo.asUnclosingStream(),reactDebugStream:void 0,preinitScripts:U,clientReferenceManifest:b,ServerInsertedHTMLProvider:I,nonce:c,images:n.renderOpts.images}),{signal:el.signal,onError:(e,t)=>{if((0,tv.AA)(e)||el.signal.aborted){let e=t.componentStack;"string"==typeof e&&(0,tv.Pe)(m,e,ed,es);return}return Y(e,t)},onHeaders:e=>{e.forEach((e,t)=>{et(t,e)})},maxHeadersLength:T,bootstrapScripts:[H]});return el.signal.addEventListener("abort",()=>{eu.abort()},{once:!0}),e},()=>{el.abort()}),{prelude:em,preludeIsEmpty:eg}=await il(ep);g||(0,tv.V2)(m,eg?tv.r0.Empty:tv.r0.Full,ed,Z);let ey=ry({polyfills:F,renderServerInsertedHTML:D,serverCapturedErrors:K,basePath:y,tracingMetadata:L}),ev=await j(eo.asStream());if(i.flightData=ev,i.segmentData=await i7(ev,ei,w,p),ee)return null!=eh?i.postponed=await r5(eh,eg?r9.Empty:r9.Full,o,e,O):i.postponed=await r7(e,O),eo.consume(),{digestErrorsMap:G,ssrErrors:K,stream:await z(em,{getServerInsertedHTML:ey,getServerInsertedMetadata:M}),dynamicAccess:(0,tv.yI)(Z,es),collectedRevalidate:ei.revalidate,collectedExpire:ei.expire,collectedStale:er(ei.stale),collectedTags:ei.tags,renderResumeDataCache:r6(e)};{let t;if(m.forceDynamic)throw Object.defineProperty(new rM.f('Invariant: a Page with `dynamic = "force-dynamic"` did not trigger the dynamic pathway. This is a bug in Next.js'),"__NEXT_ERROR_CODE",{value:"E598",enumerable:!1,configurable:!0});let i=em;if(null!=eh){let e=r("./dist/build/webpack/alias/react-dom-server-experimental.js").resume,t=new ReadableStream,a=await e((0,d.jsx)(iQ,{reactServerStream:t,reactDebugStream:void 0,preinitScripts:()=>{},clientReferenceManifest:b,ServerInsertedHTMLProvider:I,nonce:c,images:n.renderOpts.images}),JSON.parse(JSON.stringify(eh)),{signal:(0,tv.kb)(),onError:Y,nonce:c});i=P(em,a)}if(o&&o.size>0){let e=await ii(w.renderToReadableStream([],b.clientModules,{filterStackFrame:iL,onError:X}));t=await W(i,{inlinedDataStream:ni(e.consumeAsStream(),c,null),getServerInsertedHTML:ey,getServerInsertedMetadata:M,isBuildTimePrerendering:!0===n.workStore.isBuildTimePrerendering,buildId:n.workStore.buildId})}else t=await q(i,{inlinedDataStream:ni(eo.consumeAsStream(),c,null),getServerInsertedHTML:ey,getServerInsertedMetadata:M,isBuildTimePrerendering:!0===n.workStore.isBuildTimePrerendering,buildId:n.workStore.buildId});return{digestErrorsMap:G,ssrErrors:K,stream:t,dynamicAccess:(0,tv.yI)(Z,es),collectedRevalidate:ei.revalidate,collectedExpire:ei.expire,collectedStale:er(ei.stale),collectedTags:ei.tags,renderResumeDataCache:r6(e)}}}if(k.isRoutePPREnabled){let e=(0,tv.uO)(E),s=r3(),l=en={type:"prerender-ppr",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,dynamicTracking:e,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:s},f=await e4.workUnitAsyncStorage.run(l,iX,a,n,404===t.statusCode),h=Q=await ii(e4.workUnitAsyncStorage.run(l,w.renderToReadableStream,f,b.clientModules,{filterStackFrame:iL,onError:X})),g={type:"prerender-ppr",phase:"render",rootParams:$,fallbackRouteParams:o,implicitTags:u,dynamicTracking:e,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags],prerenderResumeDataCache:s},v=r("./dist/compiled/react-dom-experimental/static.node.js").prerender,{prelude:S,postponed:_}=await e4.workUnitAsyncStorage.run(g,v,(0,d.jsx)(iQ,{reactServerStream:h.asUnclosingStream(),reactDebugStream:void 0,preinitScripts:U,clientReferenceManifest:b,ServerInsertedHTMLProvider:I,nonce:c,images:n.renderOpts.images}),{onError:Y,onHeaders:e=>{e.forEach((e,t)=>{et(t,e)})},maxHeadersLength:T,bootstrapScripts:[H]}),k=ry({polyfills:F,renderServerInsertedHTML:D,serverCapturedErrors:K,basePath:y,tracingMetadata:L}),x=await j(h.asStream());i6(m)&&(i.flightData=x,i.segmentData=await i7(x,g,w,p));let{prelude:R,preludeIsEmpty:C}=await il(S);if((0,tv.Lu)(e.dynamicAccesses))return null!=_?i.postponed=await r5(_,C?r9.Empty:r9.Full,o,s,O):i.postponed=await r7(s,O),h.consume(),{digestErrorsMap:G,ssrErrors:K,stream:await z(R,{getServerInsertedHTML:k,getServerInsertedMetadata:M}),dynamicAccess:e.dynamicAccesses,collectedRevalidate:l.revalidate,collectedExpire:l.expire,collectedStale:er(l.stale),collectedTags:l.tags};if(o&&o.size>0)return i.postponed=await r7(s,O),{digestErrorsMap:G,ssrErrors:K,stream:await z(R,{getServerInsertedHTML:k,getServerInsertedMetadata:M}),dynamicAccess:e.dynamicAccesses,collectedRevalidate:l.revalidate,collectedExpire:l.expire,collectedStale:er(l.stale),collectedTags:l.tags};{if(m.forceDynamic)throw Object.defineProperty(new rM.f('Invariant: a Page with `dynamic = "force-dynamic"` did not trigger the dynamic pathway. This is a bug in Next.js'),"__NEXT_ERROR_CODE",{value:"E598",enumerable:!1,configurable:!0});let t=R;if(null!=_){let e=r("./dist/build/webpack/alias/react-dom-server-experimental.js").resume,i=new ReadableStream,a=await e((0,d.jsx)(iQ,{reactServerStream:i,reactDebugStream:void 0,preinitScripts:()=>{},clientReferenceManifest:b,ServerInsertedHTMLProvider:I,nonce:c,images:n.renderOpts.images}),JSON.parse(JSON.stringify(_)),{signal:(0,tv.kb)(),onError:Y,nonce:c});t=P(R,a)}return{digestErrorsMap:G,ssrErrors:K,stream:await q(t,{inlinedDataStream:ni(h.consumeAsStream(),c,null),getServerInsertedHTML:k,getServerInsertedMetadata:M,isBuildTimePrerendering:!0===n.workStore.isBuildTimePrerendering,buildId:n.workStore.buildId}),dynamicAccess:e.dynamicAccesses,collectedRevalidate:l.revalidate,collectedExpire:l.expire,collectedStale:er(l.stale),collectedTags:l.tags}}}{let e=en={type:"prerender-legacy",phase:"render",rootParams:$,implicitTags:u,revalidate:J.AR,expire:J.AR,stale:J.AR,tags:[...u.tags]},o=await e4.workUnitAsyncStorage.run(e,iX,a,n,404===t.statusCode),s=Q=await ii(e4.workUnitAsyncStorage.run(e,w.renderToReadableStream,o,b.clientModules,{filterStackFrame:iL,onError:X})),l=r("./dist/build/webpack/alias/react-dom-server-experimental.js").renderToReadableStream,f=await e4.workUnitAsyncStorage.run(e,l,(0,d.jsx)(iQ,{reactServerStream:s.asUnclosingStream(),reactDebugStream:void 0,preinitScripts:U,clientReferenceManifest:b,ServerInsertedHTMLProvider:I,nonce:c,images:n.renderOpts.images}),{onError:Y,nonce:c,bootstrapScripts:[H]});if(i6(m)){let t=await j(s.asStream());i.flightData=t,i.segmentData=await i7(t,e,w,p)}let h=ry({polyfills:F,renderServerInsertedHTML:D,serverCapturedErrors:K,basePath:y,tracingMetadata:L});return{digestErrorsMap:G,ssrErrors:K,stream:await B(f,{inlinedDataStream:ni(s.consumeAsStream(),c,null),isStaticGeneration:!0,isBuildTimePrerendering:!0===n.workStore.isBuildTimePrerendering,buildId:n.workStore.buildId,getServerInsertedHTML:h,getServerInsertedMetadata:M}),collectedRevalidate:e.revalidate,collectedExpire:e.expire,collectedStale:er(e.stale),collectedTags:e.tags}}}catch(x){let e;if((0,rM.l)(x)||"object"==typeof x&&null!==x&&"message"in x&&"string"==typeof x.message&&x.message.includes("https://nextjs.org/docs/advanced-features/static-html-export")||(0,tg.isDynamicServerError)(x))throw x;let o=(0,tm.C)(x);if(o){let e=tp(x);throw t9(`${x.reason} should be wrapped in a suspense boundary at page "${f}". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout +${e}`),x}if(null===Q)throw x;if((0,tr.RM)(x))t.statusCode=(0,tr.jT)(x),i.statusCode=t.statusCode,e=(0,tr.qe)(t.statusCode);else if((0,tn.nJ)(x)){var ei;e="redirect",t.statusCode=to(x),i.statusCode=t.statusCode,ei=(0,Z.B)(ti(x),y),t.setHeader("location",ei),ee("location")}else o||(t.statusCode=500,i.statusCode=t.statusCode);let[l,h]=rm(v,s,S,A,rR(n,!1),c,"/_not-found/page"),g=en={type:"prerender-legacy",phase:"render",rootParams:$,implicitTags:u,revalidate:void 0!==(null==en?void 0:en.revalidate)?en.revalidate:J.AR,expire:void 0!==(null==en?void 0:en.expire)?en.expire:J.AR,stale:void 0!==(null==en?void 0:en.stale)?en.stale:J.AR,tags:[...(null==en?void 0:en.tags)||u.tags]},k=await e4.workUnitAsyncStorage.run(g,iK,a,n,G.has(x.digest)?void 0:x,e),E=e4.workUnitAsyncStorage.run(g,w.renderToReadableStream,k,b.clientModules,{filterStackFrame:iL,onError:X});try{let e=await e4.workUnitAsyncStorage.run(g,N,{ReactDOMServer:r("./dist/build/webpack/alias/react-dom-server-experimental.js"),element:(0,d.jsx)(iZ,{reactServerStream:E,reactDebugStream:void 0,ServerInsertedHTMLProvider:I,preinitScripts:l,clientReferenceManifest:b,nonce:c,images:n.renderOpts.images}),streamOptions:{nonce:c,bootstrapScripts:[h],formState:null}});if(i6(m)){let e=await j(Q.asStream());i.flightData=e,i.segmentData=await i7(e,g,w,p)}let t=Q.consumeAsStream();return{digestErrorsMap:G,ssrErrors:K,stream:await B(e,{inlinedDataStream:ni(t,c,null),isStaticGeneration:!0,isBuildTimePrerendering:!0===n.workStore.isBuildTimePrerendering,buildId:n.workStore.buildId,getServerInsertedHTML:ry({polyfills:F,renderServerInsertedHTML:D,serverCapturedErrors:[],basePath:y,tracingMetadata:L}),getServerInsertedMetadata:M,validateRootLayout:_}),dynamicAccess:null,collectedRevalidate:null!==en?en.revalidate:J.AR,collectedExpire:null!==en?en.expire:J.AR,collectedStale:er(null!==en?en.stale:J.AR),collectedTags:null!==en?en.tags:null}}catch(e){throw e}}}let i9=async(e,t)=>{let r,{modules:{"global-error":n}}=rx(e),{componentMod:{createElement:i}}=t,a=t.componentMod.GlobalError;if(n){let[,e]=await rT({ctx:t,filePath:n[1],getComponent:n[0],injectedCSS:new Set,injectedJS:new Set});r=e}if(t.renderOpts.dev){let e=rU(t.renderOpts.dir||"",null==n?void 0:n[1]);e&&(r=i(t.componentMod.SegmentViewNode,{key:"ge-svn",type:"global-error",pagePath:e},r))}return{GlobalError:a,styles:r}};function i5(e){return t=>{var r;return t===J.AR&&"number"==typeof(null==(r=e.staleTimes)?void 0:r.static)?e.staleTimes.static:t}}async function i7(e,t,r,n){let i=n.clientReferenceManifest;if(!i||!0!==n.experimental.clientSegmentCache)return;let a={moduleLoading:null,moduleMap:i.rscModuleMapping,serverModuleMap:function(){let e=globalThis[rY];if(!e)throw Object.defineProperty(new ew.z("Missing manifest for Server Actions."),"__NEXT_ERROR_CODE",{value:"E606",enumerable:!1,configurable:!0});return e.serverModuleMap}()},o=i5(n.experimental)(t.stale);return await r.collectSegmentData(n.cacheComponents,e,o,i.clientModules,a)}r("./dist/esm/shared/lib/modern-browserslist-target.js");let ae={client:"client",server:"server",edgeServer:"edge-server"};ae.client,ae.server,ae.edgeServer;let at="build-manifest.json";[...process?.features?.typescript?["next.config.mts"]:[]],Symbol("polyfills");let ar=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,an=/\/\[[^/]+\](?=\/|$)/;function ai(e,t=!0){return(tO(e)&&(e=function(e){let t,r,n;for(let i of e.split("/"))if(r=tA.find(e=>i.startsWith(e))){[t,n]=e.split(r,2);break}if(!t||!r||!n)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(t=e7(t),r){case"(.)":n="/"===t?`/${n}`:t+"/"+n;break;case"(..)":if("/"===t)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});n=t.split("/").slice(0,-1).concat(n).join("/");break;case"(...)":n="/"+n;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});n=i.slice(0,-2).concat(n).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:t,interceptedRoute:n}}(e).interceptedRoute),t)?an.test(e):ar.test(e)}function aa(e){return er(e||"/","/_next/data")&&"/index"===(e=e.replace(/\/_next\/data\/[^/]{1,}/,"").replace(/\.json$/,""))?"/":e}function ao(e){let t=/^\/index(\/|$)/.test(e)&&!ai(e)?`/index${e}`:"/"===e?"/index":e9(e);{let{posix:e}=r("path"),n=e.normalize(t);if(n!==t)throw new ns(`Requested and resolved page mismatch: ${t} ${n}`)}return t}let as={icon:{filename:"icon",extensions:["ico","jpg","jpeg","png","svg"]},apple:{filename:"apple-icon",extensions:["jpg","jpeg","png"]},openGraph:{filename:"opengraph-image",extensions:["jpg","jpeg","png","gif"]},twitter:{filename:"twitter-image",extensions:["jpg","jpeg","png","gif"]}},al=(e,t)=>t&&0!==t.length?`(?:\\.(${e.join("|")})|(\\.(${t.join("|")})))`:`(\\.(?:${e.join("|")}))`,au=/^[\\/]favicon\.ico$/,ac=/^[\\/]robots\.txt$/,ad=/^[\\/]manifest\.json$/,af=/^[\\/]manifest\.webmanifest$/,ap=/[\\/]sitemap\.xml$/,ah=new Map;var am=r("./dist/esm/shared/lib/isomorphic/path.js"),ag=r.n(am);class ay{constructor(e){this.fs=e,this.tasks=[]}findOrCreateTask(e){for(let t of this.tasks)if(t[0]===e)return t;let t=this.fs.mkdir(e);t.catch(()=>{});let r=[e,t,[]];return this.tasks.push(r),r}append(e,t){let r=this.findOrCreateTask(ag().dirname(e)),n=r[1].then(()=>this.fs.writeFile(e,t));n.catch(()=>{}),r[2].push(n)}wait(){return Promise.all(this.tasks.flatMap(e=>e[2]))}}let av=require("next/dist/server/lib/incremental-cache/memory-cache.external.js");class ab{static #e=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor(e){this.fs=e.fs,this.flushToDisk=e.flushToDisk,this.serverDistDir=e.serverDistDir,this.revalidatedTags=e.revalidatedTags,e.maxMemoryCacheSize?ab.memoryCache?ab.debug&&console.log("FileSystemCache: memory store already initialized"):(ab.debug&&console.log("FileSystemCache: using memory store for fetch cache"),ab.memoryCache=(0,av.getMemoryCache)(e.maxMemoryCacheSize)):ab.debug&&console.log("FileSystemCache: not using memory store for fetch cache")}resetRequestCache(){}async revalidateTag(e,t){if(e="string"==typeof e?[e]:e,ab.debug&&console.log("FileSystemCache: revalidateTag",e,t),0===e.length)return;let r=Date.now();for(let n of e){let e=eB.tagsManifest.get(n)||{};if(t){let i={...e};i.stale=r,void 0!==t.expire&&(i.expired=r+1e3*t.expire),eB.tagsManifest.set(n,i)}else eB.tagsManifest.set(n,{...e,expired:r})}}async get(...e){var t,r,n,i,a,o,s,l,u;let[c,d]=e,{kind:f}=d,p=null==(t=ab.memoryCache)?void 0:t.get(c);if(ab.debug&&(f===rj.FETCH?console.log("FileSystemCache: get",c,d.tags,f,!!p):console.log("FileSystemCache: get",c,f,!!p)),!p)try{if(f===rj.APP_ROUTE){let e=this.getFilePath(`${c}.body`,rj.APP_ROUTE),t=await this.fs.readFile(e),{mtime:r}=await this.fs.stat(e),n=JSON.parse(await this.fs.readFile(e.replace(/\.body$/,J.EP),"utf8"));p={lastModified:r.getTime(),value:{kind:rO.APP_ROUTE,body:t,headers:n.headers,status:n.status}}}else{let e=this.getFilePath(f===rj.FETCH?c:`${c}.html`,f),t=await this.fs.readFile(e,"utf8"),{mtime:r}=await this.fs.stat(e);if(f===rj.FETCH){let{tags:e,fetchIdx:n,fetchUrl:i}=d;if(!this.flushToDisk)return null;let a=r.getTime(),l=JSON.parse(t);if(p={lastModified:a,value:l},(null==(o=p.value)?void 0:o.kind)===rO.FETCH){let t=null==(s=p.value)?void 0:s.tags;(null==e?void 0:e.every(e=>null==t?void 0:t.includes(e)))||(ab.debug&&console.log("FileSystemCache: tags vs storedTags mismatch",e,t),await this.set(c,p.value,{fetchCache:!0,tags:e,fetchIdx:n,fetchUrl:i}))}}else if(f===rj.APP_PAGE){let n,i,a;try{n=JSON.parse(await this.fs.readFile(e.replace(/\.html$/,J.EP),"utf8"))}catch{}if(null==n?void 0:n.segmentPaths){let e=new Map;i=e;let t=c+J.mH;await Promise.all(n.segmentPaths.map(async r=>{let n=this.getFilePath(t+r+J.tz,rj.APP_PAGE);try{e.set(r,await this.fs.readFile(n))}catch{}}))}d.isFallback||(a=await this.fs.readFile(this.getFilePath(`${c}${d.isRoutePPREnabled?J.pu:J.RM}`,rj.APP_PAGE))),p={lastModified:r.getTime(),value:{kind:rO.APP_PAGE,html:t,rscData:a,postponed:null==n?void 0:n.postponed,headers:null==n?void 0:n.headers,status:null==n?void 0:n.status,segmentData:i}}}else if(f===rj.PAGES){let e,n={};d.isFallback||(n=JSON.parse(await this.fs.readFile(this.getFilePath(`${c}${J.x3}`,rj.PAGES),"utf8"))),p={lastModified:r.getTime(),value:{kind:rO.PAGES,html:t,pageData:n,headers:null==e?void 0:e.headers,status:null==e?void 0:e.status}}}else throw Object.defineProperty(Error(`Invariant: Unexpected route kind ${f} in file system cache.`),"__NEXT_ERROR_CODE",{value:"E445",enumerable:!1,configurable:!0})}p&&(null==(l=ab.memoryCache)||l.set(c,p))}catch{return null}if((null==p||null==(r=p.value)?void 0:r.kind)===rO.APP_PAGE||(null==p||null==(n=p.value)?void 0:n.kind)===rO.APP_ROUTE||(null==p||null==(i=p.value)?void 0:i.kind)===rO.PAGES){let e=null==(u=p.value.headers)?void 0:u[J.VC];if("string"==typeof e){let t=e.split(",");if(t.length>0&&(0,eB.areTagsExpired)(t,p.lastModified))return ab.debug&&console.log("FileSystemCache: expired tags",t),null}}else if((null==p||null==(a=p.value)?void 0:a.kind)===rO.FETCH){let e=d.kind===rj.FETCH?[...d.tags||[],...d.softTags||[]]:[];if(e.some(e=>this.revalidatedTags.includes(e)))return ab.debug&&console.log("FileSystemCache: was revalidated",e),null;if((0,eB.areTagsExpired)(e,p.lastModified))return ab.debug&&console.log("FileSystemCache: expired tags",e),null}return p??null}async set(e,t,r){var n;if(null==(n=ab.memoryCache)||n.set(e,{value:t,lastModified:Date.now()}),ab.debug&&console.log("FileSystemCache: set",e),!this.flushToDisk||!t)return;let i=new ay(this.fs);if(t.kind===rO.APP_ROUTE){let r=this.getFilePath(`${e}.body`,rj.APP_ROUTE);i.append(r,t.body);let n={headers:t.headers,status:t.status,postponed:void 0,segmentPaths:void 0};i.append(r.replace(/\.body$/,J.EP),JSON.stringify(n,null,2))}else if(t.kind===rO.PAGES||t.kind===rO.APP_PAGE){let n=t.kind===rO.APP_PAGE,a=this.getFilePath(`${e}.html`,n?rj.APP_PAGE:rj.PAGES);if(i.append(a,t.html),r.fetchCache||r.isFallback||i.append(this.getFilePath(`${e}${n?r.isRoutePPREnabled?J.pu:J.RM:J.x3}`,n?rj.APP_PAGE:rj.PAGES),n?t.rscData:JSON.stringify(t.pageData)),(null==t?void 0:t.kind)===rO.APP_PAGE){let e;if(t.segmentData){e=[];let r=a.replace(/\.html$/,J.mH);for(let[n,a]of t.segmentData){e.push(n);let t=r+n+J.tz;i.append(t,a)}}let r={headers:t.headers,status:t.status,postponed:t.postponed,segmentPaths:e};i.append(a.replace(/\.html$/,J.EP),JSON.stringify(r))}}else if(t.kind===rO.FETCH){let n=this.getFilePath(e,rj.FETCH);i.append(n,JSON.stringify({...t,tags:r.fetchCache?r.tags:[]}))}await i.wait()}getFilePath(e,t){switch(t){case rj.FETCH:return ag().join(this.serverDistDir,"..","cache","fetch-cache",e);case rj.PAGES:return ag().join(this.serverDistDir,"pages",e);case rj.IMAGE:case rj.APP_PAGE:case rj.APP_ROUTE:return ag().join(this.serverDistDir,"app",e);default:throw Object.defineProperty(Error(`Unexpected file path kind: ${t}`),"__NEXT_ERROR_CODE",{value:"E479",enumerable:!1,configurable:!0})}}}function aw(e){return e.replace(/(?:\/index)?\/?$/,"")||"/"}let aS=require("next/dist/server/lib/incremental-cache/shared-cache-controls.external.js");class a_{static #e=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor({fs:e,dev:t,flushToDisk:r,minimalMode:n,serverDistDir:i,requestHeaders:a,maxMemoryCacheSize:o,getPrerenderManifest:s,fetchCacheKeyPrefix:l,CurCacheHandler:u,allowedRevalidateHeaderKeys:c}){var d,f,p,h;this.locks=new Map,this.hasCustomCacheHandler=!!u;let m=Symbol.for("@next/cache-handlers"),g=globalThis;if(u)a_.debug&&console.log("IncrementalCache: using custom cache handler",u.name);else{let t=g[m];(null==t?void 0:t.FetchCache)?(u=t.FetchCache,a_.debug&&console.log("IncrementalCache: using global FetchCache cache handler")):e&&i&&(a_.debug&&console.log("IncrementalCache: using filesystem cache handler"),u=ab)}process.env.__NEXT_TEST_MAX_ISR_CACHE&&(o=parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE,10)),this.dev=t,this.disableForTestmode="true"===process.env.NEXT_PRIVATE_TEST_PROXY,this.minimalMode=n,this.requestHeaders=a,this.allowedRevalidateHeaderKeys=c,this.prerenderManifest=s(),this.cacheControls=new aS.SharedCacheControls(this.prerenderManifest),this.fetchCacheKeyPrefix=l;let y=[];a[J.kz]===(null==(f=this.prerenderManifest)||null==(d=f.preview)?void 0:d.previewModeId)&&(this.isOnDemandRevalidate=!0),n&&(y=this.revalidatedTags=i$(a,null==(h=this.prerenderManifest)||null==(p=h.preview)?void 0:p.previewModeId)),u&&(this.cacheHandler=new u({dev:t,fs:e,flushToDisk:r,serverDistDir:i,revalidatedTags:y,maxMemoryCacheSize:o,_requestHeaders:a,fetchCacheKeyPrefix:l}))}calculateRevalidate(e,t,r,n){if(r)return Math.floor(performance.timeOrigin+performance.now()-1e3);let i=this.cacheControls.get(aw(e)),a=i?i.revalidate:!n&&1;return"number"==typeof a?1e3*a+t:a}_getPathname(e,t){return t?e:ao(e)}resetRequestCache(){var e,t;null==(t=this.cacheHandler)||null==(e=t.resetRequestCache)||e.call(t)}async lock(e){for(;;){let t=this.locks.get(e);if(a_.debug&&console.log("IncrementalCache: lock get",e,!!t),!t)break;await t}let{resolve:t,promise:r}=new g;return a_.debug&&console.log("IncrementalCache: successfully locked",e),this.locks.set(e,r),()=>{t(),this.locks.delete(e)}}async revalidateTag(e,t){var r;return null==(r=this.cacheHandler)?void 0:r.revalidateTag(e,t)}async generateCacheKey(e,t={}){let n=[],i=new TextEncoder,a=new TextDecoder;if(t.body)if(t.body instanceof Uint8Array)n.push(a.decode(t.body)),t._ogBody=t.body;else if("function"==typeof t.body.getReader){let e=t.body,r=[];try{await e.pipeTo(new WritableStream({write(e){"string"==typeof e?(r.push(i.encode(e)),n.push(e)):(r.push(e),n.push(a.decode(e,{stream:!0})))}})),n.push(a.decode());let o=r.reduce((e,t)=>e+t.length,0),s=new Uint8Array(o),l=0;for(let e of r)s.set(e,l),l+=e.length;t._ogBody=s}catch(e){console.error("Problem reading body",e)}}else if("function"==typeof t.body.keys){let e=t.body;for(let r of(t._ogBody=t.body,new Set([...e.keys()]))){let t=e.getAll(r);n.push(`${r}=${(await Promise.all(t.map(async e=>"string"==typeof e?e:await e.text()))).join(",")}`)}}else if("function"==typeof t.body.arrayBuffer){let e=t.body,r=await e.arrayBuffer();n.push(await e.text()),t._ogBody=new Blob([r],{type:e.type})}else"string"==typeof t.body&&(n.push(t.body),t._ogBody=t.body);let o="function"==typeof(t.headers||{}).keys?Object.fromEntries(t.headers):Object.assign({},t.headers);"traceparent"in o&&delete o.traceparent,"tracestate"in o&&delete o.tracestate;let s=JSON.stringify(["v3",this.fetchCacheKeyPrefix||"",e,t.method,o,t.mode,t.redirect,t.credentials,t.referrer,t.referrerPolicy,t.integrity,t.cache,n]);return r("crypto").createHash("sha256").update(s).digest("hex")}async get(e,t){var r,n,i,a,o,s,l;let u,c;if(t.kind===rj.FETCH){let t=e4.workUnitAsyncStorage.getStore(),r=t?(0,e4.getRenderResumeDataCache)(t):null;if(r){let t=r.fetch.get(e);if((null==t?void 0:t.kind)===rO.FETCH)return a_.debug&&console.log("IncrementalCache: rdc:hit",e),{isStale:!1,value:t};a_.debug&&console.log("IncrementalCache: rdc:miss",e)}else a_.debug&&console.log("IncrementalCache: rdc:no-resume-data")}if(this.disableForTestmode||this.dev&&(t.kind!==rj.FETCH||"no-cache"===this.requestHeaders["cache-control"]))return null;e=this._getPathname(e,t.kind===rj.FETCH);let d=await (null==(r=this.cacheHandler)?void 0:r.get(e,t));if(t.kind===rj.FETCH){if(!d)return null;if((null==(i=d.value)?void 0:i.kind)!==rO.FETCH)throw Object.defineProperty(new ew.z(`Expected cached value for cache key ${JSON.stringify(e)} to be a "FETCH" kind, got ${JSON.stringify(null==(a=d.value)?void 0:a.kind)} instead.`),"__NEXT_ERROR_CODE",{value:"E653",enumerable:!1,configurable:!0});let r=f.workAsyncStorage.getStore(),n=[...t.tags||[],...t.softTags||[]];if(n.some(e=>{var t,n;return(null==(t=this.revalidatedTags)?void 0:t.includes(e))||(null==r||null==(n=r.pendingRevalidatedTags)?void 0:n.some(t=>t.tag===e))}))return a_.debug&&console.log("IncrementalCache: expired tag",e),null;let o=e4.workUnitAsyncStorage.getStore();if(o){let t=(0,e4.getPrerenderResumeDataCache)(o);t&&(a_.debug&&console.log("IncrementalCache: rdc:set",e),t.fetch.set(e,d.value))}let s=t.revalidate||d.value.revalidate,l=(performance.timeOrigin+performance.now()-(d.lastModified||0))/1e3>s,u=d.value.data;return(0,eB.areTagsExpired)(n,d.lastModified)?null:((0,eB.areTagsStale)(n,d.lastModified)&&(l=!0),{isStale:l,value:{kind:rO.FETCH,data:u,revalidate:s}})}if((null==d||null==(n=d.value)?void 0:n.kind)===rO.FETCH)throw Object.defineProperty(new ew.z(`Expected cached value for cache key ${JSON.stringify(e)} not to be a ${JSON.stringify(t.kind)} kind, got "FETCH" instead.`),"__NEXT_ERROR_CODE",{value:"E652",enumerable:!1,configurable:!0});let p=null,h=this.cacheControls.get(aw(e));if((null==d?void 0:d.lastModified)===-1)u=-1,c=-1*J.qF;else{let r=performance.timeOrigin+performance.now(),n=(null==d?void 0:d.lastModified)||r;if(void 0===(u=!1!==(c=this.calculateRevalidate(e,n,this.dev??!1,t.isFallback))&&c0&&((0,eB.areTagsExpired)(t,n)?u=-1:(0,eB.areTagsStale)(t,n)&&(u=!0))}}}return d&&(p={isStale:u,cacheControl:h,revalidateAfter:c,value:d.value}),!d&&this.prerenderManifest.notFoundRoutes.includes(e)&&(p={isStale:u,value:null,cacheControl:h,revalidateAfter:c},this.set(e,p.value,{...t,cacheControl:h})),p}async set(e,t,r){if((null==t?void 0:t.kind)===rO.FETCH){let r=e4.workUnitAsyncStorage.getStore(),n=r?(0,e4.getPrerenderResumeDataCache)(r):null;n&&(a_.debug&&console.log("IncrementalCache: rdc:set",e),n.fetch.set(e,t))}if(this.disableForTestmode||this.dev&&!r.fetchCache)return;e=this._getPathname(e,r.fetchCache);let n=JSON.stringify(t).length;if(r.fetchCache&&n>2097152&&!this.hasCustomCacheHandler&&!r.isImplicitBuildTimeCache){let t=`Failed to set Next.js data cache for ${r.fetchUrl||e}, items over 2MB can not be cached (${n} bytes)`;if(this.dev)throw Object.defineProperty(Error(t),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});console.warn(t);return}try{var i;!r.fetchCache&&r.cacheControl&&this.cacheControls.set(aw(e),r.cacheControl),await (null==(i=this.cacheHandler)?void 0:i.set(e,t,r))}catch(t){console.warn("Failed to update prerender cache for",e,t)}}}let ak=Symbol.for("@next/router-server-methods"),aE=globalThis;function ax(e){var t,r;return(null==(r=e.has)||null==(t=r[0])?void 0:t.key)===x.kO}let aR=e=>import(e).then(e=>e.default||e);class aC{constructor({userland:e,definition:t,distDir:r,relativeProjectDir:n}){this.userland=e,this.definition=t,this.isDev=!1,this.distDir=r,this.relativeProjectDir=n}async instrumentationOnRequestError(e,...t){{let{join:n}=r("node:path"),i=n(process.cwd(),X(e,"relativeProjectDir")||this.relativeProjectDir),{instrumentationOnRequestError:a}=await Promise.resolve().then(r.t.bind(r,"../lib/router-utils/instrumentation-globals.external.js",23));return a(i,this.distDir,...t)}}loadManifests(e,t){{var n;if(!t)throw Object.defineProperty(Error("Invariant: projectDir is required for node runtime"),"__NEXT_ERROR_CODE",{value:"E718",enumerable:!1,configurable:!0});let{loadManifestFromRelativePath:i}=r("../load-manifest.external"),a=ao(e),o=this.definition.kind===r$.PAGES||this.definition.kind===r$.PAGES_API?"pages":"app",[s,l,u,c,d,f,p,h,m,g,y,v]=[i({projectDir:t,distDir:this.distDir,manifest:"routes-manifest.json",shouldCache:!this.isDev}),i({projectDir:t,distDir:this.distDir,manifest:"prerender-manifest.json",shouldCache:!this.isDev}),i({projectDir:t,distDir:this.distDir,manifest:at,shouldCache:!this.isDev}),"/_error"===e?i({projectDir:t,distDir:this.distDir,manifest:`fallback-${at}`,shouldCache:!this.isDev,handleMissing:!0}):{},i({projectDir:t,distDir:this.distDir,manifest:`server/${"app"===o?"app":"pages"}${a}/react-loadable-manifest.json`,handleMissing:!0,shouldCache:!this.isDev}),i({projectDir:t,distDir:this.distDir,manifest:"server/next-font-manifest.json",shouldCache:!this.isDev}),"app"!==o||function(e){let t=e.replace(/\/route$/,"");return e.endsWith("/route")&&function(e,t,r){if(!e||e.length<2)return!1;let n=e.replace(/\\/g,"/"),i=!!(au.test(n)||ac.test(n)||ad.test(n)||af.test(n)||ap.test(n))||(!!n.includes("robots")||!!n.includes("manifest")||!!n.includes("sitemap")||!!n.includes("icon")||!!n.includes("apple-icon")||!!n.includes("opengraph-image")||!!n.includes("twitter-image")||!!n.includes("favicon"))&&null;if(null!==i)return i;let a=function(e,t){let r=`${e.join(",")}|${t}`,n=ah.get(r);if(n)return n;let i=t?"$":"?$",a="\\d?"+(t?"":"(-\\w{6})?"),o=e.length>0?[...e,"txt"]:["txt"],s=e.length>0?[...e,"webmanifest","json"]:["webmanifest","json"],l=[RegExp(`^[\\\\/]robots${al(o,null)}${i}`),RegExp(`^[\\\\/]manifest${al(s,null)}${i}`),RegExp(`[\\\\/]sitemap${al(["xml"],e)}${i}`),RegExp(`[\\\\/]icon${a}${al(as.icon.extensions,e)}${i}`),RegExp(`[\\\\/]apple-icon${a}${al(as.apple.extensions,e)}${i}`),RegExp(`[\\\\/]opengraph-image${a}${al(as.openGraph.extensions,e)}${i}`),RegExp(`[\\\\/]twitter-image${a}${al(as.twitter.extensions,e)}${i}`)];return ah.set(r,l),l}(t,r);for(let e=0;enew RegExp(e.regex))}}}async loadCustomCacheHandlers(e,t){{let{cacheMaxMemorySize:i,cacheHandlers:a}=t;if(!a||!function(e){if(eX[eG])return null==eq||eq("cache handlers already initialized"),!1;if(null==eq||eq("initializing cache handlers"),eX[eG]=new Map,eX[eW]){let t;eX[eW].DefaultCache?(null==eq||eq('setting "default" cache handler from symbol'),t=eX[eW].DefaultCache):(null==eq||eq('setting "default" cache handler from default'),t=ez(e)),eX[eG].set("default",t),eX[eW].RemoteCache?(null==eq||eq('setting "remote" cache handler from symbol'),eX[eG].set("remote",eX[eW].RemoteCache)):(null==eq||eq('setting "remote" cache handler from default'),eX[eG].set("remote",t))}else{let t=ez(e);null==eq||eq('setting "default" cache handler from default'),eX[eG].set("default",t),null==eq||eq('setting "remote" cache handler from default'),eX[eG].set("remote",t)}return eX[eV]=new Set(eX[eG].values()),!0}(i))return;for(let[t,i]of Object.entries(a)){if(!i)continue;let{formatDynamicImportPath:a}=r("./dist/esm/lib/format-dynamic-import-path.js"),{join:o}=r("node:path"),s=o(process.cwd(),X(e,"relativeProjectDir")||this.relativeProjectDir);var n=rE(await aR(a(`${s}/${this.distDir}`,i)));if(!eX[eG]||!eX[eV])throw Object.defineProperty(Error("Cache handlers not initialized"),"__NEXT_ERROR_CODE",{value:"E649",enumerable:!1,configurable:!0});null==eq||eq('setting cache handler for "%s"',t),eX[eG].set(t,n),eX[eV].add(n)}}}async getIncrementalCache(e,t,n,i){{let a,{cacheHandler:o}=t;if(o){let{formatDynamicImportPath:e}=r("./dist/esm/lib/format-dynamic-import-path.js");a=rE(await aR(e(this.distDir,o)))}let{join:s}=r("node:path"),l=s(process.cwd(),X(e,"relativeProjectDir")||this.relativeProjectDir);await this.loadCustomCacheHandlers(e,t);let u=new a_({fs:r("./dist/esm/server/lib/node-fs-methods.js").e,dev:this.isDev,requestHeaders:e.headers,allowedRevalidateHeaderKeys:t.experimental.allowedRevalidateHeaderKeys,minimalMode:i,serverDistDir:`${l}/${this.distDir}/server`,fetchCacheKeyPrefix:t.experimental.fetchCacheKeyPrefix,maxMemoryCacheSize:t.cacheMaxMemorySize,flushToDisk:!i&&t.experimental.isrFlushToDisk,getPrerenderManifest:()=>n,CurCacheHandler:a});return globalThis.__incrementalCache=u,u}}async onRequestError(e,t,r,n){(null==n?void 0:n.logErrorWithOriginalStack)?n.logErrorWithOriginalStack(t,"app-dir"):console.error(t),await this.instrumentationOnRequestError(e,t,{path:e.url||"/",headers:e.headers,method:e.method||"GET"},r)}async prepare(e,t,{srcPage:n,multiZoneDraftMode:i}){var a;let o,s,l,u;{let{join:t,relative:n}=r("node:path");o=t(process.cwd(),X(e,"relativeProjectDir")||this.relativeProjectDir);let i=X(e,"distDir");i&&(this.distDir=n(o,i));let{ensureInstrumentationRegistered:a}=await Promise.resolve().then(r.t.bind(r,"../lib/router-utils/instrumentation-globals.external.js",23));a(o,this.distDir)}let c=await this.loadManifests(n,o),{routesManifest:d,prerenderManifest:f,serverFilesManifest:p}=c,{basePath:h,i18n:m,rewrites:g}=d;h&&(e.url=eo(e.url||"/",h));let y=iA(e.url||"/");if(!y)return;let v=!1;er(y.pathname||"/","/_next/data")&&(v=!0,y.pathname=aa(y.pathname||"/"));let b=y.pathname||"/",w={...y.query},S=ai(n);m&&(s=ea(y.pathname||"/",m.locales)).detectedLocale&&(e.url=`${s.pathname}${y.search}`,b=s.pathname,l||(l=s.detectedLocale));let _=e7(n),k=function({page:e,i18n:t,basePath:n,rewrites:i,pageIsDynamic:a,trailingSlash:o,caseSensitive:s}){let l,u,c;return a&&(c=(u=iR(l=function(e,t){let r=function(e,t,r,n,i,a={names:{},intercepted:{}}){let o,s=(o=0,()=>{let e="",t=++o;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={},u=[],c=[];for(let o of(a=structuredClone(a),(0,Q.U)(e).slice(1).split("/"))){let e,d=tA.some(e=>o.startsWith(e)),f=o.match(r0),p=d?f?.[1]:void 0;if(p&&f?.[2]?(e=t?J.h:void 0,a.intercepted[f[2]]=p):e=f?.[2]&&a.intercepted[f[2]]?t?J.h:void 0:t?J.AA:void 0,p&&f&&f[2]){let{key:t,pattern:r,cleanedKey:n,repeat:o,optional:d}=ib({getSafeRouteKey:s,interceptionMarker:p,segment:f[2],routeKeys:l,keyPrefix:e,backreferenceDuplicateKeys:i});u.push(r),c.push(`/${f[1]}:${a.names[t]??n}${o?d?"*":"+":""}`),a.names[t]??=n}else if(f&&f[2]){n&&f[1]&&(u.push(`/${iy(f[1])}`),c.push(`/${f[1]}`));let{key:t,pattern:r,cleanedKey:o,repeat:d,optional:p}=ib({getSafeRouteKey:s,segment:f[2],routeKeys:l,keyPrefix:e,backreferenceDuplicateKeys:i}),h=r;n&&f[1]&&(h=h.substring(1)),u.push(h),c.push(`/:${a.names[t]??o}${d?p?"*":"+":""}`),a.names[t]??=o}else u.push(`/${iy(o)}`),c.push(`/${o}`);r&&f&&f[3]&&(u.push(iy(f[3])),c.push(f[3]))}return{namedParameterizedRoute:u.join(""),routeKeys:l,pathToRegexpPattern:c.join(""),reference:a}}(e,t.prefixRouteKeys,t.includeSuffix??!1,t.includePrefix??!1,t.backreferenceDuplicateKeys??!1,t.reference),n=r.namedParameterizedRoute;return t.excludeOptionalTrailingSlash||(n+="(?:/)?"),{...iv(e,t),namedRegex:`^${n}$`,routeKeys:r.routeKeys,pathToRegexpPattern:r.pathToRegexpPattern,reference:r.reference}}(e,{prefixRouteKeys:!1})))(e)),{handleRewrites:function(l,c){let d=structuredClone(c),f={},p=d.pathname,h=i=>{let c=function(e,t){let r=[],n=(0,ih.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof t?.sensitive&&t.sensitive,strict:t?.strict}),i=(0,ih.regexpToFunction)(t?.regexModifier?new RegExp(t.regexModifier(n.source),n.flags):n,r);return(e,n)=>{if("string"!=typeof e)return!1;let a=i(e);if(!a)return!1;if(t?.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete a.params[e.name];return{...n,...a.params}}}(i.source+(o?"(/)?":""),{removeUnnamedParams:!0,strict:!0,sensitive:!!s});if(!d.pathname)return!1;let h=c(d.pathname);if((i.has||i.missing)&&h){let e=function(e,t,n=[],i=[]){let a={},o=n=>{let i,o=n.key;switch(n.type){case"header":o=o.toLowerCase(),i=e.headers[o];break;case"cookie":if("cookies"in e)i=e.cookies[n.key];else{var s;i=(s=e.headers,function(){let{cookie:e}=s;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)})()[n.key]}break;case"query":i=t[o];break;case"host":{let{host:t}=e?.headers||{};i=t?.split(":",1)[0].toLowerCase()}}if(!n.value&&i)return a[function(e){let t="";for(let r=0;r64&&n<91||n>96&&n<123)&&(t+=e[r])}return t}(o)]=i,!0;if(i){let e=RegExp(`^${n.value}$`),t=Array.isArray(i)?i.slice(-1)[0].match(e):i.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{a[e]=t.groups[e]}):"host"===n.type&&t[0]&&(a.host=t[0])),!0}return!1};return!(!n.every(e=>o(e))||i.some(e=>o(e)))&&a}(l,d.query,i.has,i.missing);e?Object.assign(h,e):h=!1}if(h){let{parsedDestination:r,destQuery:o}=function(e){let t,r,n=function(e){let t=e.destination;for(let r of Object.keys({...e.params,...e.query}))r&&(t=t.replace(RegExp(`:${iy(r)}`,"g"),`__ESC_COLON_${r}`));let r=function(e){if(e.startsWith("/"))return nc(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:nl(t.searchParams),search:t.search,origin:t.origin,slashes:"//"===t.href.slice(t.protocol.length,t.protocol.length+2)}}(t),n=r.pathname;n&&(n=iC(n));let i=r.href;i&&(i=iC(i));let a=r.hostname;a&&(a=iC(a));let o=r.hash;o&&(o=iC(o));let s=r.search;s&&(s=iC(s));let l=r.origin;return l&&(l=iC(l)),{...r,pathname:n,hostname:a,href:i,hash:o,search:s,origin:l}}(e),{hostname:i,query:a,search:o}=n,s=n.pathname;n.hash&&(s=`${s}${n.hash}`);let l=[],u=[];for(let e of(iE(s,u),u))l.push(e.name);if(i){let e=[];for(let t of(iE(i,e),e))l.push(t.name)}let c=ix(s,{validate:!1});for(let[r,n]of(i&&(t=ix(i,{validate:!1})),Object.entries(a)))Array.isArray(n)?a[r]=n.map(t=>iT(iC(t),e.params)):"string"==typeof n&&(a[r]=iT(iC(n),e.params));let d=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!d.some(e=>l.includes(e)))for(let t of d)t in a||(a[t]=e.params[t]);if(tO(s))for(let t of s.split("/")){let r=tA.find(e=>t.startsWith(e));if(r){"(..)(..)"===r?(e.params["0"]="(..)",e.params["1"]="(..)"):e.params["0"]=r;break}}try{let[i,a]=(r=c(e.params)).split("#",2);t&&(n.hostname=t(e.params)),n.pathname=i,n.hash=`${a?"#":""}${a||""}`,n.search=o?iT(o,e.params):""}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Object.defineProperty(Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match"),"__NEXT_ERROR_CODE",{value:"E329",enumerable:!1,configurable:!0});throw e}return n.query={...e.query,...n.query},{newUrl:r,destQuery:a,parsedDestination:n}}({appendParamsToQuery:!0,destination:i.destination,params:h,query:d.query});if(r.protocol)return!0;if(Object.assign(f,o,h),Object.assign(d.query,r.query),delete r.query,Object.assign(d,r),!(p=d.pathname))return!1;if(n&&(p=p.replace(RegExp(`^${n}`),"")||"/"),t){let e=ea(p,t.locales);p=e.pathname,d.query.nextInternalLocale=e.detectedLocale||h.nextInternalLocale}if(p===e)return!0;if(a&&u){let e=u(p);if(e)return d.query={...d.query,...e},!0}}return!1};for(let e of i.beforeFiles||[])h(e);if(p!==e){let t=!1;for(let e of i.afterFiles||[])if(t=h(e))break;if(!t&&!(()=>{let t=(0,Q.U)(p||"");return t===(0,Q.U)(e)||(null==u?void 0:u(t))})()){for(let e of i.fallback||[])if(t=h(e))break}}return{rewriteParams:f,rewrittenParsedUrl:d}},defaultRouteRegex:l,dynamicRouteMatcher:u,defaultRouteMatches:c,normalizeQueryParams:function(e,t){for(let[r,n]of(delete e.nextInternalLocale,Object.entries(e))){let i=K(r);i&&(delete e[r],t.add(i),void 0!==n&&(e[i]=Array.isArray(n)?n.map(e=>iP(e)):iP(n)))}},getParamsFromRouteMatches:function(e){if(!l)return null;let{groups:t,routeKeys:r}=l,n=iR({re:{exec:e=>{let n=Object.fromEntries(new URLSearchParams(e));for(let[e,t]of Object.entries(n)){let r=K(e);r&&(n[r]=t,delete n[e])}let i={};for(let e of Object.keys(r)){let a=r[e];if(!a)continue;let o=t[a],s=n[e];if(!o.optional&&!s)return null;i[o.pos]=s}return i}},groups:t})(e);return n||null},normalizeDynamicRouteParams:(e,t)=>{if(!l||!c)return{params:{},hasValidParams:!1};var r=l,n=c;let i={};for(let a of Object.keys(r.groups)){let o=e[a];"string"==typeof o?o=te(o):Array.isArray(o)&&(o=o.map(te));let s=n[a],l=r.groups[a].optional;if((Array.isArray(s)?s.some(e=>Array.isArray(o)?o.some(t=>t.includes(e)):null==o?void 0:o.includes(e)):null==o?void 0:o.includes(s))||void 0===o&&!(l&&t))return{params:{},hasValidParams:!1};l&&(!o||Array.isArray(o)&&1===o.length&&("index"===o[0]||o[0]===`[[...${a}]]`)||"index"===o||o===`[[...${a}]]`)&&(o=void 0,delete e[a]),o&&"string"==typeof o&&r.groups[a].repeat&&(o=o.split("/")),o&&(i[a]=o)}return{params:i,hasValidParams:!0}},normalizeCdnUrl:(e,t)=>(function(e,t){let r=iA(e.url);if(!r)return e.url;delete r.search,ij(r.query,t),e.url=function(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",a=e.hash||"",o=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(s+=":"+e.port)),o&&"object"==typeof o&&(o=String(function(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,nu(e));else t.set(r,nu(n));return t}(o)));let l=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||iO.test(n))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),a&&"#"!==a[0]&&(a="#"+a),l&&"?"!==l[0]&&(l="?"+l),i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),`${n}${s}${i}${l}${a}`}(r)})(e,t),interpolateDynamicPath:(e,t)=>(function(e,t,r){if(!r)return e;for(let n of Object.keys(r.groups)){let i,{optional:a,repeat:o}=r.groups[n],s=`[${o?"...":""}${n}]`;a&&(s=`[${s}]`);let l=t[n];((i=Array.isArray(l)?l.map(e=>e&&encodeURIComponent(e)).join("/"):l?encodeURIComponent(l):"")||a)&&(e=e.replaceAll(s,i))}return e})(e,t,l),filterInternalQuery:(e,t)=>ij(e,t)}}({page:_,i18n:m,basePath:h,rewrites:g,pageIsDynamic:S,trailingSlash:process.env.__NEXT_TRAILING_SLASH,caseSensitive:!!d.caseSensitive}),E=Y(null==m?void 0:m.domains,en(y,e.headers),l);!function(e,t,r){let n=X(e);n[t]=r,e[V]=n}(e,"isLocaleDomain",!!E);let x=(null==E?void 0:E.defaultLocale)||(null==m?void 0:m.defaultLocale);x&&!l&&(y.pathname=`/${x}${"/"===y.pathname?"":y.pathname}`);let R=X(e,"locale")||l||x,{rewriteParams:C,rewrittenParsedUrl:T}=k.handleRewrites(e,y),P=Object.keys(C);Object.assign(y.query,T.query),m&&(y.pathname=ea(y.pathname||"/",m.locales).pathname,T.pathname=ea(T.pathname||"/",m.locales).pathname);let A=X(e,"params");if(!A&&k.dynamicRouteMatcher){let e=k.dynamicRouteMatcher(aa((null==T?void 0:T.pathname)||y.pathname||"/")),t=k.normalizeDynamicRouteParams(e||{},!0);t.hasValidParams&&(A=t.params)}let O=X(e,"query")||{...y.query},j=new Set,$=[];if(this.definition.kind===r$.PAGES||this.definition.kind===r$.PAGES_API)for(let e of[...P,...Object.keys(k.defaultRouteMatches||{})]){let t=Array.isArray(w[e])?w[e].join(""):w[e],r=Array.isArray(O[e])?O[e].join(""):O[e];e in w&&t!==r||$.push(e)}if(k.normalizeCdnUrl(e,$),k.normalizeQueryParams(O,j),k.filterInternalQuery(w,$),S){let t,r=k.normalizeDynamicRouteParams(O,!0),n=k.normalizeDynamicRouteParams(A||{},!0);if(O&&A&&n.hasValidParams&&r.hasValidParams&&Object.keys(n.params).length{try{var t;t=decodeURIComponent(e),e=t.replace(RegExp("([/#?]|%(2f|23|3f|5c))","gi"),e=>encodeURIComponent(e))}catch(e){throw Object.defineProperty(new no("Failed to decode path param(s)."),"__NEXT_ERROR_CODE",{value:"E539",enumerable:!1,configurable:!0})}return e}).join("/")}catch(e){}return U=(0,Q.U)(U),{query:O,originalQuery:w,originalPathname:b,params:A,parsedUrl:y,locale:R,isNextDataRequest:v,locales:null==m?void 0:m.locales,defaultLocale:x,isDraftMode:N,previewData:u,pageIsDynamic:S,resolvedPathname:U,encodedResolvedPathname:H,isOnDemandRevalidate:I,revalidateOnlyGenerated:D,...c,serverActionsManifest:c.serverActionsManifest,clientReferenceManifest:c.clientReferenceManifest,nextConfig:F,routerServerContext:L}}getResponseCache(e){if(!this.responseCache){let t=(!!process.env.MINIMAL_MODE||X(e,"minimalMode"))??!1;this.responseCache=new rN(t)}return this.responseCache}async handleResponse({req:e,nextConfig:t,cacheKey:r,routeKind:n,isFallback:i,prerenderManifest:a,isRoutePPREnabled:o,isOnDemandRevalidate:s,revalidateOnlyGenerated:l,responseGenerator:u,waitUntil:c,isMinimalMode:d}){let f=this.getResponseCache(e),p=await f.get(r,u,{routeKind:n,isFallback:i,isRoutePPREnabled:o,isOnDemandRevalidate:s,isPrefetch:"prefetch"===e.headers.purpose,incrementalCache:await this.getIncrementalCache(e,t,a,d),waitUntil:c});if(!p&&r&&!(s&&l))throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return p}}var aT=r("./dist/esm/shared/lib/head-manager-context.shared-runtime.js");let aP=p.createContext(null);class aA{constructor(e,t){this.matchers=Object.entries(t.dynamicRoutes).filter(([t,r])=>r.fallbackSourceRoute===e||t===e).map(([e,t])=>({source:e,route:t}))}match(e){for(let t of this.matchers)if(t.matcher||(t.matcher=iR(iv(t.source))),t.matcher(e))return t.route;return null}}{e=r("(react-server)/./dist/esm/server/route-modules/app-page/vendored/rsc/entrypoints.js"),t=r("./dist/esm/server/route-modules/app-page/vendored/ssr/entrypoints.js");let{registerGetCacheSignal:n}=r("../../node-environment-extensions/console-dim.external");n(e.React.cacheSignal),n(t.React.cacheSignal)}class aO extends aC{match(e,t){let r=this.matchers.get(t);return r||(r=new aA(this.definition.pathname,t),this.matchers.set(t,r)),r.match(e)}render(e,t,r){return i1(e,t,r.page,r.query,r.fallbackRouteParams,r.renderOpts,r.serverComponentsHmrCache,r.sharedContext)}pathCouldBeIntercepted(e,t){return tO(e)||t.some(t=>t.test(e))}getVaryHeader(e,t){let r=`${x.hY}, ${x.B}, ${x._V}, ${x.qm}`;return this.pathCouldBeIntercepted(e,t)?`${r}, ${x.kO}`:r}constructor(...e){super(...e),this.matchers=new WeakMap}}let aj={"react-rsc":e,"react-ssr":t,contexts:c},a$=aO})(),module.exports=n})(); +//# sourceMappingURL=app-page-turbo-experimental.runtime.prod.js.map \ No newline at end of file diff --git a/.socket/blob/273408f8f8dc041ae605ae600565ad4a7c03874fb6941b54a69a876292ce9221 b/.socket/blob/273408f8f8dc041ae605ae600565ad4a7c03874fb6941b54a69a876292ce9221 new file mode 100644 index 0000000..40bb15b --- /dev/null +++ b/.socket/blob/273408f8f8dc041ae605ae600565ad4a7c03874fb6941b54a69a876292ce9221 @@ -0,0 +1,5195 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-client.node.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function resolveClientReference(bundlerConfig, metadata) { + if (bundlerConfig) { + var moduleExports = bundlerConfig[metadata[0]]; + if ((bundlerConfig = moduleExports && (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0))) + moduleExports = bundlerConfig.name; + else { + bundlerConfig = moduleExports && moduleExports["*"]; + if (!bundlerConfig) + throw Error( + 'Could not find the module "' + + metadata[0] + + '" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.' + ); + moduleExports = metadata[2]; + } + return 4 === metadata.length + ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1] + : [bundlerConfig.id, bundlerConfig.chunks, moduleExports]; + } + return metadata; + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = globalThis.__next_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + i++ + ) { + var thenable = globalThis.__next_chunk_load__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = globalThis.__next_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function prepareDestinationWithChunks( + moduleLoading, + chunks, + nonce$jscomp$0 + ) { + if (null !== moduleLoading) + for (var i = 0; i < chunks.length; i++) { + var nonce = nonce$jscomp$0, + JSCompiler_temp_const = ReactDOMSharedInternals.d, + JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X, + JSCompiler_temp_const$jscomp$1 = moduleLoading.prefix + chunks[i]; + var JSCompiler_inline_result = moduleLoading.crossOrigin; + JSCompiler_inline_result = + "string" === typeof JSCompiler_inline_result + ? "use-credentials" === JSCompiler_inline_result + ? JSCompiler_inline_result + : "" + : void 0; + JSCompiler_temp_const$jscomp$0.call( + JSCompiler_temp_const, + JSCompiler_temp_const$jscomp$1, + { crossOrigin: JSCompiler_inline_result, nonce: nonce } + ); + } + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function processReply( + root, + formFieldPrefix, + temporaryReferences, + resolve, + reject + ) { + function serializeTypedArray(tag, typedArray) { + typedArray = new Blob([ + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ]); + var blobId = nextPartId++; + null === formData && (formData = new FormData()); + formData.append(formFieldPrefix + blobId, typedArray); + return "$" + tag + blobId.toString(16); + } + function serializeBinaryReader(reader) { + function progress(entry) { + entry.done + ? ((entry = nextPartId++), + data.append(formFieldPrefix + entry, new Blob(buffer)), + data.append( + formFieldPrefix + streamId, + '"$o' + entry.toString(16) + '"' + ), + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data)) + : (buffer.push(entry.value), + reader.read(new Uint8Array(1024)).then(progress, reject)); + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++, + buffer = []; + reader.read(new Uint8Array(1024)).then(progress, reject); + return "$r" + streamId.toString(16); + } + function serializeReader(reader) { + function progress(entry) { + if (entry.done) + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON); + reader.read().then(progress, reject); + } catch (x) { + reject(x); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + reader.read().then(progress, reject); + return "$R" + streamId.toString(16); + } + function serializeReadableStream(stream) { + try { + var binaryReader = stream.getReader({ mode: "byob" }); + } catch (x) { + return serializeReader(stream.getReader()); + } + return serializeBinaryReader(binaryReader); + } + function serializeAsyncIterable(iterable, iterator) { + function progress(entry) { + if (entry.done) { + if (void 0 === entry.value) + data.append(formFieldPrefix + streamId, "C"); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, "C" + partJSON); + } catch (x) { + reject(x); + return; + } + pendingParts--; + 0 === pendingParts && resolve(data); + } else + try { + var _partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, _partJSON); + iterator.next().then(progress, reject); + } catch (x$0) { + reject(x$0); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + iterable = iterable === iterator; + iterator.next().then(progress, reject); + return "$" + (iterable ? "x" : "X") + streamId.toString(16); + } + function resolveToJSON(key, value) { + var originalValue = this[key]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + ("Object" !== objectName(originalValue) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(this, key) + ) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(this, key) + )); + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) { + var parentReference = writtenObjects.get(this); + if (void 0 !== parentReference) + return ( + temporaryReferences.set(parentReference + ":" + key, value), + "$T" + ); + } + throw Error( + "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + case REACT_LAZY_TYPE: + originalValue = value._payload; + var init = value._init; + null === formData && (formData = new FormData()); + pendingParts++; + try { + parentReference = init(originalValue); + var lazyId = nextPartId++, + partJSON = serializeModel(parentReference, lazyId); + formData.append(formFieldPrefix + lazyId, partJSON); + return "$" + lazyId.toString(16); + } catch (x) { + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + pendingParts++; + var _lazyId = nextPartId++; + parentReference = function () { + try { + var _partJSON2 = serializeModel(value, _lazyId), + _data = formData; + _data.append(formFieldPrefix + _lazyId, _partJSON2); + pendingParts--; + 0 === pendingParts && resolve(_data); + } catch (reason) { + reject(reason); + } + }; + x.then(parentReference, parentReference); + return "$" + _lazyId.toString(16); + } + reject(x); + return null; + } finally { + pendingParts--; + } + } + if ("function" === typeof value.then) { + null === formData && (formData = new FormData()); + pendingParts++; + var promiseId = nextPartId++; + value.then(function (partValue) { + try { + var _partJSON3 = serializeModel(partValue, promiseId); + partValue = formData; + partValue.append(formFieldPrefix + promiseId, _partJSON3); + pendingParts--; + 0 === pendingParts && resolve(partValue); + } catch (reason) { + reject(reason); + } + }, reject); + return "$@" + promiseId.toString(16); + } + parentReference = writtenObjects.get(value); + if (void 0 !== parentReference) + if (modelRoot === value) modelRoot = null; + else return parentReference; + else + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference && + ((parentReference = parentReference + ":" + key), + writtenObjects.set(value, parentReference), + void 0 !== temporaryReferences && + temporaryReferences.set(parentReference, value))); + if (isArrayImpl(value)) return value; + if (value instanceof FormData) { + null === formData && (formData = new FormData()); + var _data3 = formData; + key = nextPartId++; + var prefix = formFieldPrefix + key + "_"; + value.forEach(function (originalValue, originalKey) { + _data3.append(prefix + originalKey, originalValue); + }); + return "$K" + key.toString(16); + } + if (value instanceof Map) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$Q" + key.toString(16) + ); + if (value instanceof Set) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$W" + key.toString(16) + ); + if (value instanceof ArrayBuffer) + return ( + (key = new Blob([value])), + (parentReference = nextPartId++), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + parentReference, key), + "$A" + parentReference.toString(16) + ); + if (value instanceof Int8Array) + return serializeTypedArray("O", value); + if (value instanceof Uint8Array) + return serializeTypedArray("o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray("U", value); + if (value instanceof Int16Array) + return serializeTypedArray("S", value); + if (value instanceof Uint16Array) + return serializeTypedArray("s", value); + if (value instanceof Int32Array) + return serializeTypedArray("L", value); + if (value instanceof Uint32Array) + return serializeTypedArray("l", value); + if (value instanceof Float32Array) + return serializeTypedArray("G", value); + if (value instanceof Float64Array) + return serializeTypedArray("g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray("M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray("m", value); + if (value instanceof DataView) return serializeTypedArray("V", value); + if ("function" === typeof Blob && value instanceof Blob) + return ( + null === formData && (formData = new FormData()), + (key = nextPartId++), + formData.append(formFieldPrefix + key, value), + "$B" + key.toString(16) + ); + if ((parentReference = getIteratorFn(value))) + return ( + (parentReference = parentReference.call(value)), + parentReference === value + ? ((key = nextPartId++), + (parentReference = serializeModel( + Array.from(parentReference), + key + )), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$i" + key.toString(16)) + : Array.from(parentReference) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(value); + parentReference = value[ASYNC_ITERATOR]; + if ("function" === typeof parentReference) + return serializeAsyncIterable(value, parentReference.call(value)); + parentReference = getPrototypeOf(value); + if ( + parentReference !== ObjectPrototype && + (null === parentReference || + null !== getPrototypeOf(parentReference)) + ) { + if (void 0 === temporaryReferences) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(this, key) + ); + return "$T"; + } + value.$$typeof === REACT_CONTEXT_TYPE + ? console.error( + "React Context Providers cannot be passed to Server Functions from the Client.%s", + describeObjectForErrorMessage(this, key) + ) + : "Object" !== objectName(value) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(this, key) + ) + : isSimpleObject(value) + ? Object.getOwnPropertySymbols && + ((parentReference = Object.getOwnPropertySymbols(value)), + 0 < parentReference.length && + console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s", + parentReference[0].description, + describeObjectForErrorMessage(this, key) + )) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(this, key) + ); + return value; + } + if ("string" === typeof value) { + if ("Z" === value[value.length - 1] && this[key] instanceof Date) + return "$D" + value; + key = "$" === value[0] ? "$" + value : value; + return key; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + parentReference = knownServerReferences.get(value); + if (void 0 !== parentReference) + return ( + (key = JSON.stringify( + { id: parentReference.id, bound: parentReference.bound }, + resolveToJSON + )), + null === formData && (formData = new FormData()), + (parentReference = nextPartId++), + formData.set(formFieldPrefix + parentReference, key), + "$F" + parentReference.toString(16) + ); + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again." + ); + } + if ("symbol" === typeof value) { + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported as an argument to a Server Function." + ); + } + function serializeModel(model, id) { + "object" === typeof model && + null !== model && + ((id = "$" + id.toString(16)), + writtenObjects.set(model, id), + void 0 !== temporaryReferences && temporaryReferences.set(id, model)); + modelRoot = model; + return JSON.stringify(model, resolveToJSON); + } + var nextPartId = 1, + pendingParts = 0, + formData = null, + writtenObjects = new WeakMap(), + modelRoot = root, + json = serializeModel(root, 0); + null === formData + ? resolve(json) + : (formData.set(formFieldPrefix + "0", json), + 0 === pendingParts && resolve(formData)); + return function () { + 0 < pendingParts && + ((pendingParts = 0), + null === formData ? resolve(json) : resolve(formData)); + }; + } + function encodeFormData(reference) { + var resolve, + reject, + thenable = new Promise(function (res, rej) { + resolve = res; + reject = rej; + }); + processReply( + reference, + "", + void 0, + function (body) { + if ("string" === typeof body) { + var data = new FormData(); + data.append("0", body); + body = data; + } + thenable.status = "fulfilled"; + thenable.value = body; + resolve(body); + }, + function (e) { + thenable.status = "rejected"; + thenable.reason = e; + reject(e); + } + ); + return thenable; + } + function defaultEncodeFormAction(identifierPrefix) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var data = null; + if (null !== referenceClosure.bound) { + data = boundCache.get(referenceClosure); + data || + ((data = encodeFormData({ + id: referenceClosure.id, + bound: referenceClosure.bound + })), + boundCache.set(referenceClosure, data)); + if ("rejected" === data.status) throw data.reason; + if ("fulfilled" !== data.status) throw data; + referenceClosure = data.value; + var prefixedData = new FormData(); + referenceClosure.forEach(function (value, key) { + prefixedData.append("$ACTION_" + identifierPrefix + ":" + key, value); + }); + data = prefixedData; + referenceClosure = "$ACTION_REF_" + identifierPrefix; + } else referenceClosure = "$ACTION_ID_" + referenceClosure.id; + return { + name: referenceClosure, + method: "POST", + encType: "multipart/form-data", + data: data + }; + } + function isSignatureEqual(referenceId, numberOfBoundArgs) { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + if (referenceClosure.id !== referenceId) return !1; + var boundPromise = referenceClosure.bound; + if (null === boundPromise) return 0 === numberOfBoundArgs; + switch (boundPromise.status) { + case "fulfilled": + return boundPromise.value.length === numberOfBoundArgs; + case "pending": + throw boundPromise; + case "rejected": + throw boundPromise.reason; + default: + throw ( + ("string" !== typeof boundPromise.status && + ((boundPromise.status = "pending"), + boundPromise.then( + function (boundArgs) { + boundPromise.status = "fulfilled"; + boundPromise.value = boundArgs; + }, + function (error) { + boundPromise.status = "rejected"; + boundPromise.reason = error; + } + )), + boundPromise) + ); + } + } + function createFakeServerFunction( + name, + filename, + sourceMap, + line, + col, + environmentName, + innerFunction + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 >= line + ? ((line = encodedName.length + 7), + (col = + "s=>({" + + encodedName + + " ".repeat(col < line ? 0 : col - line) + + ":(...args) => s(...args)})\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */")) + : (col = + "/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */" + + "\n".repeat(line - 2) + + "server=>({" + + encodedName + + ":\n" + + " ".repeat(1 > col ? 0 : col - 1) + + "(...args) => server(...args)})"); + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((col += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?s" + + fakeServerFunctionIdx++), + (col += "\n//# sourceMappingURL=" + sourceMap)) + : filename && (col += "\n//# sourceURL=" + filename); + try { + return (0, eval)(col)(innerFunction)[name]; + } catch (x) { + return innerFunction; + } + } + function registerBoundServerReference( + reference, + id, + bound, + encodeFormAction + ) { + knownServerReferences.has(reference) || + (knownServerReferences.set(reference, { + id: id, + originalBind: reference.bind, + bound: bound + }), + Object.defineProperties(reference, { + $$FORM_ACTION: { + value: + void 0 === encodeFormAction + ? defaultEncodeFormAction + : function () { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) + throw Error( + "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React." + ); + var boundPromise = referenceClosure.bound; + null === boundPromise && + (boundPromise = Promise.resolve([])); + return encodeFormAction(referenceClosure.id, boundPromise); + } + }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + })); + } + function bind() { + var referenceClosure = knownServerReferences.get(this); + if (!referenceClosure) return FunctionBind.apply(this, arguments); + var newFn = referenceClosure.originalBind.apply(this, arguments); + null != arguments[0] && + console.error( + 'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().' + ); + var args = ArraySlice.call(arguments, 1), + boundPromise = null; + boundPromise = + null !== referenceClosure.bound + ? Promise.resolve(referenceClosure.bound).then(function (boundArgs) { + return boundArgs.concat(args); + }) + : Promise.resolve(args); + knownServerReferences.set(newFn, { + id: referenceClosure.id, + originalBind: newFn.bind, + bound: boundPromise + }); + Object.defineProperties(newFn, { + $$FORM_ACTION: { value: this.$$FORM_ACTION }, + $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual }, + bind: { value: bind } + }); + return newFn; + } + function createBoundServerReference( + metaData, + callServer, + encodeFormAction, + findSourceMapURL + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return bound + ? "fulfilled" === bound.status + ? callServer(id, bound.value.concat(args)) + : Promise.resolve(bound).then(function (boundArgs) { + return callServer(id, boundArgs.concat(args)); + }) + : callServer(id, args); + } + var id = metaData.id, + bound = metaData.bound, + location = metaData.location; + if (location) { + var functionName = metaData.name || "", + filename = location[1], + line = location[2]; + location = location[3]; + metaData = metaData.env || "Server"; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, metaData); + action = createFakeServerFunction( + functionName, + filename, + findSourceMapURL, + line, + location, + metaData, + action + ); + } + registerBoundServerReference(action, id, bound, encodeFormAction); + return action; + } + function parseStackLocation(error) { + error = error.stack; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + var endOfFirst = error.indexOf("\n"); + if (-1 !== endOfFirst) { + var endOfSecond = error.indexOf("\n", endOfFirst + 1); + endOfFirst = + -1 === endOfSecond + ? error.slice(endOfFirst + 1) + : error.slice(endOfFirst + 1, endOfSecond); + } else endOfFirst = error; + error = v8FrameRegExp.exec(endOfFirst); + if ( + !error && + ((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error) + ) + return null; + endOfFirst = error[1] || ""; + "" === endOfFirst && (endOfFirst = ""); + endOfSecond = error[2] || error[5] || ""; + "" === endOfSecond && (endOfSecond = ""); + return [ + endOfFirst, + endOfSecond, + +(error[3] || error[6]), + +(error[4] || error[7]) + ]; + } + function createServerReference$1( + id, + callServer, + encodeFormAction, + findSourceMapURL, + functionName + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return callServer(id, args); + } + var location = parseStackLocation(Error("react-stack-top-frame")); + if (null !== location) { + var filename = location[1], + line = location[2]; + location = location[3]; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, "Client"); + action = createFakeServerFunction( + functionName || "", + filename, + findSourceMapURL, + line, + location, + "Client", + action + ); + } + registerBoundServerReference(action, id, null, encodeFormAction); + return action; + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE + ? null + : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + 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"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ( + ("number" === typeof type.tag && + console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), + type.$$typeof) + ) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: + return ( + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" + ); + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) {} + } + return null; + } + function getArrayKind(array) { + for (var kind = 0, i = 0; i < array.length && 100 > i; i++) { + var value = array[i]; + if ("object" === typeof value && null !== value) + if ( + isArrayImpl(value) && + 2 === value.length && + "string" === typeof value[0] + ) { + if (0 !== kind && 3 !== kind) return 1; + kind = 3; + } else return 1; + else { + if ( + "function" === typeof value || + ("string" === typeof value && 50 < value.length) || + (0 !== kind && 2 !== kind) + ) + return 1; + kind = 2; + } + } + return kind; + } + function addObjectToProperties(object, properties, indent, prefix) { + var addedProperties = 0, + key; + for (key in object) + if ( + hasOwnProperty.call(object, key) && + "_" !== key[0] && + (addedProperties++, + addValueToProperties(key, object[key], properties, indent, prefix), + 100 <= addedProperties) + ) { + properties.push([ + prefix + + "\u00a0\u00a0".repeat(indent) + + "Only 100 properties are shown. React will not log more properties of this object.", + "" + ]); + break; + } + } + function addValueToProperties( + propertyName, + value, + properties, + indent, + prefix + ) { + switch (typeof value) { + case "object": + if (null === value) { + value = "null"; + break; + } else { + if (value.$$typeof === REACT_ELEMENT_TYPE) { + var typeName = getComponentNameFromType(value.type) || "\u2026", + key = value.key; + value = value.props; + var propsKeys = Object.keys(value), + propsLength = propsKeys.length; + if (null == key && 0 === propsLength) { + value = "<" + typeName + " />"; + break; + } + if ( + 3 > indent || + (1 === propsLength && + "children" === propsKeys[0] && + null == key) + ) { + value = "<" + typeName + " \u2026 />"; + break; + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "<" + typeName + ]); + null !== key && + addValueToProperties( + "key", + key, + properties, + indent + 1, + prefix + ); + propertyName = !1; + key = 0; + for (var propKey in value) + if ( + (key++, + "children" === propKey + ? null != value.children && + (!isArrayImpl(value.children) || + 0 < value.children.length) && + (propertyName = !0) + : hasOwnProperty.call(value, propKey) && + "_" !== propKey[0] && + addValueToProperties( + propKey, + value[propKey], + properties, + indent + 1, + prefix + ), + 100 <= key) + ) + break; + properties.push([ + "", + propertyName ? ">\u2026" : "/>" + ]); + return; + } + typeName = Object.prototype.toString.call(value); + propKey = typeName.slice(8, typeName.length - 1); + if ("Array" === propKey) + if ( + ((typeName = 100 < value.length), + (key = getArrayKind(value)), + 2 === key || 0 === key) + ) { + value = JSON.stringify( + typeName ? value.slice(0, 100).concat("\u2026") : value + ); + break; + } else if (3 === key) { + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "" + ]); + for ( + propertyName = 0; + propertyName < value.length && 100 > propertyName; + propertyName++ + ) + (propKey = value[propertyName]), + addValueToProperties( + propKey[0], + propKey[1], + properties, + indent + 1, + prefix + ); + typeName && + addValueToProperties( + (100).toString(), + "\u2026", + properties, + indent + 1, + prefix + ); + return; + } + if ("Promise" === propKey) { + if ("fulfilled" === value.status) { + if ( + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.value, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = + "Promise<" + (properties[1] || "Object") + ">"; + return; + } + } else if ( + "rejected" === value.status && + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.reason, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = "Rejected Promise<" + properties[1] + ">"; + return; + } + properties.push([ + "\u00a0\u00a0".repeat(indent) + propertyName, + "Promise" + ]); + return; + } + "Object" === propKey && + (typeName = Object.getPrototypeOf(value)) && + "function" === typeof typeName.constructor && + (propKey = typeName.constructor.name); + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "Object" === propKey ? (3 > indent ? "" : "\u2026") : propKey + ]); + 3 > indent && + addObjectToProperties(value, properties, indent + 1, prefix); + return; + } + case "function": + value = "" === value.name ? "() => {}" : value.name + "() {}"; + break; + case "string": + value = + "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects." === + value + ? "\u2026" + : JSON.stringify(value); + break; + case "undefined": + value = "undefined"; + break; + case "boolean": + value = value ? "true" : "false"; + break; + default: + value = String(value); + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + value + ]); + } + function getIODescription(value) { + try { + switch (typeof value) { + case "function": + return value.name || ""; + case "object": + if (null === value) return ""; + if (value instanceof Error) return String(value.message); + if ("string" === typeof value.url) return value.url; + if ("string" === typeof value.href) return value.href; + if ("string" === typeof value.src) return value.src; + if ("string" === typeof value.currentSrc) return value.currentSrc; + if ("string" === typeof value.command) return value.command; + if ( + "object" === typeof value.request && + null !== value.request && + "string" === typeof value.request.url + ) + return value.request.url; + if ( + "object" === typeof value.response && + null !== value.response && + "string" === typeof value.response.url + ) + return value.response.url; + if ( + "string" === typeof value.id || + "number" === typeof value.id || + "bigint" === typeof value.id + ) + return String(value.id); + if ("string" === typeof value.name) return value.name; + var str = value.toString(); + return str.startsWith("[object ") || + 5 > str.length || + 500 < str.length + ? "" + : str; + case "string": + return 5 > value.length || 500 < value.length ? "" : value; + case "number": + case "bigint": + return String(value); + default: + return ""; + } + } catch (x) { + return ""; + } + } + function markAllTracksInOrder() { + supportsUserTiming && + (console.timeStamp( + "Server Requests Track", + 0.001, + 0.001, + "Server Requests \u269b", + void 0, + "primary-light" + ), + console.timeStamp( + "Server Components Track", + 0.001, + 0.001, + "Primary", + "Server Components \u269b", + "primary-light" + )); + } + function getIOColor(functionName) { + switch (functionName.charCodeAt(0) % 3) { + case 0: + return "tertiary-light"; + case 1: + return "tertiary"; + default: + return "tertiary-dark"; + } + } + function getIOLongName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + description = + "" === description ? ioInfo : ioInfo + " (" + description + ")"; + return env === rootEnv || void 0 === env + ? description + : description + " [" + env + "]"; + } + function getIOShortName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + env = env === rootEnv || void 0 === env ? "" : " [" + env + "]"; + var desc = ""; + rootEnv = 30 - ioInfo.length - env.length; + if (1 < rootEnv) { + var l = description.length; + if (0 < l && l <= rootEnv) desc = " (" + description + ")"; + else if ( + description.startsWith("http://") || + description.startsWith("https://") || + description.startsWith("/") + ) { + var queryIdx = description.indexOf("?"); + -1 === queryIdx && (queryIdx = description.length); + 47 === description.charCodeAt(queryIdx - 1) && queryIdx--; + desc = description.lastIndexOf("/", queryIdx - 1); + queryIdx - desc < rootEnv + ? (desc = " (\u2026" + description.slice(desc, queryIdx) + ")") + : ((l = description.slice(desc, desc + rootEnv / 2)), + (description = description.slice( + queryIdx - rootEnv / 2, + queryIdx + )), + (desc = + " (" + + (0 < desc ? "\u2026" : "") + + l + + "\u2026" + + description + + ")")); + } + } + return ioInfo + desc + env; + } + function logComponentAwait( + asyncInfo, + trackIdx, + startTime, + endTime, + rootEnv, + value + ) { + if (supportsUserTiming && 0 < endTime) { + var description = getIODescription(value), + name = getIOShortName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ), + entryName = "await " + name; + name = getIOColor(name); + var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("awaited value", value, properties, 0, ""); + asyncInfo = getIOLongName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: name, + track: trackNames[trackIdx], + trackGroup: "Server Components \u269b", + properties: properties, + tooltipText: asyncInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + trackNames[trackIdx], + "Server Components \u269b", + name + ); + } + } + function logIOInfoErrored(ioInfo, rootEnv, error) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(error), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + debugTask + ? ((error = [ + [ + "rejected with", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]), + (ioInfo = + getIOLongName(ioInfo, description, ioInfo.env, rootEnv) + + " Rejected"), + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: "Server Requests \u269b", + properties: error, + tooltipText: ioInfo + } + } + }) + ), + performance.clearMeasures(entryName)) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + "error" + ); + } + } + function logIOInfo(ioInfo, rootEnv, value) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(value), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + color = getIOColor(entryName), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("Resolved", value, properties, 0, ""); + ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: color, + track: "Server Requests \u269b", + properties: properties, + tooltipText: ioInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + color + ); + } + } + function prepareStackTrace(error, structuredStackTrace) { + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function ReactPromise(status, value, reason) { + this.status = status; + this.value = value; + this.reason = reason; + this._children = []; + this._debugChunk = null; + this._debugInfo = []; + } + function unwrapWeakResponse(weakResponse) { + weakResponse = weakResponse.weak.deref(); + if (void 0 === weakResponse) + throw Error( + "We did not expect to receive new data after GC:ing the response." + ); + return weakResponse; + } + function closeDebugChannel(debugChannel) { + debugChannel.callback && debugChannel.callback(""); + } + function readChunk(chunk) { + switch (chunk.status) { + case "resolved_model": + initializeModelChunk(chunk); + break; + case "resolved_module": + initializeModuleChunk(chunk); + } + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "pending": + case "blocked": + case "halted": + throw chunk; + default: + throw chunk.reason; + } + } + function getRoot(weakResponse) { + weakResponse = unwrapWeakResponse(weakResponse); + return getChunk(weakResponse, 0); + } + function createPendingChunk(response) { + 0 === response._pendingChunks++ && + ((response._weakResponse.response = response), + null !== response._pendingInitialRender && + (clearTimeout(response._pendingInitialRender), + (response._pendingInitialRender = null))); + return new ReactPromise("pending", null, null); + } + function releasePendingChunk(response, chunk) { + "pending" === chunk.status && + 0 === --response._pendingChunks && + ((response._weakResponse.response = null), + (response._pendingInitialRender = setTimeout( + flushInitialRenderPerformance.bind(null, response), + 100 + ))); + } + function moveDebugInfoFromChunkToInnerValue(chunk, value) { + value = resolveLazy(value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) || + ((chunk = chunk._debugInfo.splice(0)), + isArrayImpl(value._debugInfo) + ? value._debugInfo.unshift.apply(value._debugInfo, chunk) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: chunk + })); + } + function wakeChunk(listeners, value, chunk) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + moveDebugInfoFromChunkToInnerValue(chunk, value); + } + function rejectChunk(listeners, error) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(error) + : rejectReference(listener, error); + } + } + function resolveBlockedCycle(resolvedChunk, reference) { + var referencedChunk = reference.handler.chunk; + if (null === referencedChunk) return null; + if (referencedChunk === resolvedChunk) return reference.handler; + reference = referencedChunk.value; + if (null !== reference) + for ( + referencedChunk = 0; + referencedChunk < reference.length; + referencedChunk++ + ) { + var listener = reference[referencedChunk]; + if ( + "function" !== typeof listener && + ((listener = resolveBlockedCycle(resolvedChunk, listener)), + null !== listener) + ) + return listener; + } + return null; + } + function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) { + switch (chunk.status) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + break; + case "blocked": + for (var i = 0; i < resolveListeners.length; i++) { + var listener = resolveListeners[i]; + if ("function" !== typeof listener) { + var cyclicHandler = resolveBlockedCycle(chunk, listener); + if (null !== cyclicHandler) + switch ( + (fulfillReference(listener, cyclicHandler.value, chunk), + resolveListeners.splice(i, 1), + i--, + null !== rejectListeners && + ((listener = rejectListeners.indexOf(listener)), + -1 !== listener && rejectListeners.splice(listener, 1)), + chunk.status) + ) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + return; + case "rejected": + null !== rejectListeners && + rejectChunk(rejectListeners, chunk.reason); + return; + } + } + } + case "pending": + if (chunk.value) + for (i = 0; i < resolveListeners.length; i++) + chunk.value.push(resolveListeners[i]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for ( + resolveListeners = 0; + resolveListeners < rejectListeners.length; + resolveListeners++ + ) + chunk.reason.push(rejectListeners[resolveListeners]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && rejectChunk(rejectListeners, chunk.reason); + } + } + function triggerErrorOnChunk(response, chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + releasePendingChunk(response, chunk); + var listeners = chunk.reason; + if ("pending" === chunk.status && null != chunk._debugChunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + initializeDebugChunk(response, chunk); + } finally { + (initializingHandler = prevHandler), + (initializingChunk = prevChunk); + } + } + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && rejectChunk(listeners, error); + } + } + function createResolvedModelChunk(response, value) { + return new ReactPromise("resolved_model", value, response); + } + function createResolvedIteratorResultChunk(response, value, done) { + return new ReactPromise( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + response + ); + } + function resolveIteratorResultChunk(response, chunk, value, done) { + resolveModelChunk( + response, + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}" + ); + } + function resolveModelChunk(response, chunk, value) { + if ("pending" !== chunk.status) chunk.reason.enqueueModel(value); + else { + releasePendingChunk(response, chunk); + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = response; + null !== resolveListeners && + (initializeModelChunk(chunk), + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners)); + } + } + function resolveModuleChunk(response, chunk, value) { + if ("pending" === chunk.status || "blocked" === chunk.status) { + releasePendingChunk(response, chunk); + response = chunk.value; + var rejectListeners = chunk.reason; + chunk.status = "resolved_module"; + chunk.value = value; + value = []; + null !== value && chunk._debugInfo.push.apply(chunk._debugInfo, value); + null !== response && + (initializeModuleChunk(chunk), + wakeChunkIfInitialized(chunk, response, rejectListeners)); + } + } + function initializeDebugChunk(response, chunk) { + var debugChunk = chunk._debugChunk; + if (null !== debugChunk) { + var debugInfo = chunk._debugInfo; + try { + if ("resolved_model" === debugChunk.status) { + for ( + var idx = debugInfo.length, c = debugChunk._debugChunk; + null !== c; + + ) + "fulfilled" !== c.status && idx++, (c = c._debugChunk); + initializeModelChunk(debugChunk); + switch (debugChunk.status) { + case "fulfilled": + debugInfo[idx] = initializeDebugInfo( + response, + debugChunk.value + ); + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + debugInfo, + "" + idx, + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } else + switch (debugChunk.status) { + case "fulfilled": + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + {}, + "debug", + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } catch (error) { + triggerErrorOnChunk(response, chunk, error); + } + } + } + function initializeModelChunk(chunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + var resolvedModel = chunk.value, + response = chunk.reason; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + initializeDebugChunk(response, chunk); + try { + var value = JSON.parse(resolvedModel, response._fromJSON), + resolveListeners = chunk.value; + if (null !== resolveListeners) + for ( + chunk.value = null, chunk.reason = null, resolvedModel = 0; + resolvedModel < resolveListeners.length; + resolvedModel++ + ) { + var listener = resolveListeners[resolvedModel]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + if (null !== initializingHandler) { + if (initializingHandler.errored) throw initializingHandler.reason; + if (0 < initializingHandler.deps) { + initializingHandler.value = value; + initializingHandler.chunk = chunk; + return; + } + } + chunk.status = "fulfilled"; + chunk.value = value; + moveDebugInfoFromChunkToInnerValue(chunk, value); + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingHandler = prevHandler), (initializingChunk = prevChunk); + } + } + function initializeModuleChunk(chunk) { + try { + var value = requireModule(chunk.value); + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } + } + function reportGlobalError(weakResponse, error) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse); + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && + triggerErrorOnChunk(response, chunk, error); + }); + weakResponse = response._debugChannel; + void 0 !== weakResponse && + (closeDebugChannel(weakResponse), + (response._debugChannel = void 0), + null !== debugChannelRegistry && + debugChannelRegistry.unregister(response)); + } + } + function nullRefGetter() { + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("function" === typeof type) return '"use client"'; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return type._init === readChunk ? '"use client"' : "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function initializeElement(response, element, lazyNode) { + var stack = element._debugStack, + owner = element._owner; + null === owner && (element._owner = response._debugRootOwner); + var env = response._rootEnvironmentName; + null !== owner && null != owner.env && (env = owner.env); + var normalizedStackTrace = null; + null === owner && null != response._debugRootStack + ? (normalizedStackTrace = response._debugRootStack) + : null !== stack && + (normalizedStackTrace = createFakeJSXCallStackInDEV( + response, + stack, + env + )); + element._debugStack = normalizedStackTrace; + normalizedStackTrace = null; + supportsCreateTask && + null !== stack && + ((normalizedStackTrace = console.createTask.bind( + console, + getTaskName(element.type) + )), + (stack = buildFakeCallStack( + response, + stack, + env, + !1, + normalizedStackTrace + )), + (env = null === owner ? null : initializeFakeTask(response, owner)), + null === env + ? ((env = response._debugRootTask), + (normalizedStackTrace = null != env ? env.run(stack) : stack())) + : (normalizedStackTrace = env.run(stack))); + element._debugTask = normalizedStackTrace; + null !== owner && initializeFakeStack(response, owner); + null !== lazyNode && + (lazyNode._store && + lazyNode._store.validated && + !element._store.validated && + (element._store.validated = lazyNode._store.validated), + "fulfilled" === lazyNode._payload.status && + lazyNode._debugInfo && + ((response = lazyNode._debugInfo.splice(0)), + element._debugInfo + ? element._debugInfo.unshift.apply(element._debugInfo, response) + : Object.defineProperty(element, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: response + }))); + Object.freeze(element.props); + } + function createLazyChunkWrapper(chunk, validated) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: chunk, + _init: readChunk + }; + lazyType._debugInfo = chunk._debugInfo; + lazyType._store = { validated: validated }; + return lazyType; + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._closed + ? new ReactPromise("rejected", null, response._closedReason) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function fulfillReference(reference, value, fulfilledChunk) { + for ( + var response = reference.response, + handler = reference.handler, + parentObject = reference.parentObject, + key = reference.key, + map = reference.map, + path = reference.path, + i = 1; + i < path.length; + i++ + ) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((value = value._payload), value === handler.chunk)) + value = handler.value; + else { + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + continue; + case "blocked": + var cyclicHandler = resolveBlockedCycle(value, reference); + if (null !== cyclicHandler) { + value = cyclicHandler.value; + continue; + } + case "pending": + path.splice(0, i - 1); + null === value.value + ? (value.value = [reference]) + : value.value.push(reference); + null === value.reason + ? (value.reason = [reference]) + : value.reason.push(reference); + return; + case "halted": + return; + default: + rejectReference(reference, value.reason); + return; + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((path = value._payload), path === handler.chunk)) + value = handler.value; + else { + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + parentObject[key] = response; + "" === key && null === handler.value && (handler.value = response); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((reference = handler.value), key)) { + case "3": + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + reference.props = response; + break; + case "4": + reference._owner = response; + break; + case "5": + reference._debugStack = response; + break; + default: + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + } + else + reference.isDebug || + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + handler.deps--; + 0 === handler.deps && + ((fulfilledChunk = handler.chunk), + null !== fulfilledChunk && + "blocked" === fulfilledChunk.status && + ((key = fulfilledChunk.value), + (fulfilledChunk.status = "fulfilled"), + (fulfilledChunk.value = handler.value), + (fulfilledChunk.reason = handler.reason), + null !== key + ? wakeChunk(key, handler.value, fulfilledChunk) + : moveDebugInfoFromChunkToInnerValue( + fulfilledChunk, + handler.value + ))); + } + function rejectReference(reference, error) { + var handler = reference.handler; + reference = reference.response; + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + handler = handler.chunk; + if (null !== handler && "blocked" === handler.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + handler._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(reference, handler, error); + } + } + } + function waitForReference( + referencedChunk, + parentObject, + key, + response, + map, + path, + isAwaitingDebugInfo + ) { + if ( + !( + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + "pending" !== referencedChunk.status || + parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key) + ) + ) + return null; + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + parentObject = { + response: response, + handler: handler, + parentObject: parentObject, + key: key, + map: map, + path: path + }; + parentObject.isDebug = isAwaitingDebugInfo; + null === referencedChunk.value + ? (referencedChunk.value = [parentObject]) + : referencedChunk.value.push(parentObject); + null === referencedChunk.reason + ? (referencedChunk.reason = [parentObject]) + : referencedChunk.reason.push(parentObject); + return null; + } + function loadServerReference(response, metaData, parentObject, key) { + if (!response._serverReferenceConfig) + return createBoundServerReference( + metaData, + response._callServer, + response._encodeFormAction, + response._debugFindSourceMapURL + ); + var serverReference = resolveServerReference( + response._serverReferenceConfig, + metaData.id + ), + promise = preloadModule(serverReference); + if (promise) + metaData.bound && (promise = Promise.all([promise, metaData.bound])); + else if (metaData.bound) promise = Promise.resolve(metaData.bound); + else + return ( + (promise = requireModule(serverReference)), + registerBoundServerReference( + promise, + metaData.id, + metaData.bound, + response._encodeFormAction + ), + promise + ); + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + promise.then( + function () { + var resolvedValue = requireModule(serverReference); + if (metaData.bound) { + var boundArgs = metaData.bound.value.slice(0); + boundArgs.unshift(null); + resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs); + } + registerBoundServerReference( + resolvedValue, + metaData.id, + metaData.bound, + response._encodeFormAction + ); + parentObject[key] = resolvedValue; + "" === key && + null === handler.value && + (handler.value = resolvedValue); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((boundArgs = handler.value), key)) { + case "3": + boundArgs.props = resolvedValue; + break; + case "4": + boundArgs._owner = resolvedValue; + } + handler.deps--; + 0 === handler.deps && + ((resolvedValue = handler.chunk), + null !== resolvedValue && + "blocked" === resolvedValue.status && + ((boundArgs = resolvedValue.value), + (resolvedValue.status = "fulfilled"), + (resolvedValue.value = handler.value), + null !== boundArgs + ? wakeChunk(boundArgs, handler.value, resolvedValue) + : moveDebugInfoFromChunkToInnerValue( + resolvedValue, + handler.value + ))); + }, + function (error) { + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + var chunk = handler.chunk; + if (null !== chunk && "blocked" === chunk.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + chunk._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(response, chunk, error); + } + } + } + ); + return null; + } + function resolveLazy(value) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + var payload = value._payload; + if ("fulfilled" === payload.status) value = payload.value; + else break; + } + return value; + } + function transferReferencedDebugInfo(parentChunk, referencedChunk) { + if (null !== parentChunk) { + referencedChunk = referencedChunk._debugInfo; + parentChunk = parentChunk._debugInfo; + for (var i = 0; i < referencedChunk.length; ++i) { + var debugInfoEntry = referencedChunk[i]; + null == debugInfoEntry.name && parentChunk.push(debugInfoEntry); + } + } + } + function getOutlinedModel(response, reference, parentObject, key, map) { + var path = reference.split(":"); + reference = parseInt(path[0], 16); + reference = getChunk(response, reference); + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(reference); + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + for (var value = reference.value, i = 1; i < path.length; i++) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + value = value._payload; + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + break; + case "blocked": + case "pending": + return waitForReference( + value, + parentObject, + key, + response, + map, + path.slice(i - 1), + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), + parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = value.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: value.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + path = value._payload; + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + (parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key)) && + transferReferencedDebugInfo(initializingChunk, reference); + return response; + case "pending": + case "blocked": + return waitForReference( + reference, + parentObject, + key, + response, + map, + path, + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = reference.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: reference.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function createBlob(response, model) { + return new Blob(model.slice(1), { type: model[0] }); + } + function createFormData(response, model) { + response = new FormData(); + for (var i = 0; i < model.length; i++) + response.append(model[i][0], model[i][1]); + return response; + } + function applyConstructor(response, model, parentObject) { + Object.setPrototypeOf(parentObject, model.prototype); + } + function defineLazyGetter(response, chunk, parentObject, key) { + Object.defineProperty(parentObject, key, { + get: function () { + "resolved_model" === chunk.status && initializeModelChunk(chunk); + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "rejected": + throw chunk.reason; + } + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function getInferredFunctionApproximate(code) { + code = code.startsWith("Object.defineProperty(") + ? code.slice(22) + : code.startsWith("(") + ? code.slice(1) + : code; + if (code.startsWith("async function")) { + var idx = code.indexOf("(", 14); + if (-1 !== idx) + return ( + (code = code.slice(14, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":async function(){}})")[ + code + ] + ); + } else if (code.startsWith("function")) { + if (((idx = code.indexOf("(", 8)), -1 !== idx)) + return ( + (code = code.slice(8, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":function(){}})")[code] + ); + } else if ( + code.startsWith("class") && + ((idx = code.indexOf("{", 5)), -1 !== idx) + ) + return ( + (code = code.slice(5, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":class{}})")[code] + ); + return function () {}; + } + function parseModelString(response, parentObject, key, value) { + if ("$" === value[0]) { + if ("$" === value) + return ( + null !== initializingHandler && + "0" === key && + (initializingHandler = { + parent: initializingHandler, + chunk: null, + value: null, + reason: null, + deps: 0, + errored: !1 + }), + REACT_ELEMENT_TYPE + ); + switch (value[1]) { + case "$": + return value.slice(1); + case "L": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + createLazyChunkWrapper(response, 0) + ); + case "@": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + response + ); + case "S": + return Symbol.for(value.slice(2)); + case "F": + var ref = value.slice(2); + return getOutlinedModel( + response, + ref, + parentObject, + key, + loadServerReference + ); + case "T": + parentObject = "$" + value.slice(2); + response = response._tempRefs; + if (null == response) + throw Error( + "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply." + ); + return response.get(parentObject); + case "Q": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createMap) + ); + case "W": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createSet) + ); + case "B": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createBlob) + ); + case "K": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createFormData) + ); + case "Z": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + resolveErrorDev + ) + ); + case "i": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + extractIterator + ) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + case "P": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + applyConstructor + ) + ); + case "E": + response = value.slice(2); + try { + if (!mightHaveStaticConstructor.test(response)) + return (0, eval)(response); + } catch (x) {} + try { + if ( + ((ref = getInferredFunctionApproximate(response)), + response.startsWith("Object.defineProperty(")) + ) { + var idx = response.lastIndexOf(',"name",{value:"'); + if (-1 !== idx) { + var name = JSON.parse( + response.slice(idx + 16 - 1, response.length - 2) + ); + Object.defineProperty(ref, "name", { value: name }); + } + } + } catch (_) { + ref = function () {}; + } + return ref; + case "Y": + if ( + 2 < value.length && + (ref = response._debugChannel && response._debugChannel.callback) + ) { + if ("@" === value[2]) + return ( + (parentObject = value.slice(3)), + (key = parseInt(parentObject, 16)), + response._chunks.has(key) || ref("P:" + parentObject), + getChunk(response, key) + ); + value = value.slice(2); + idx = parseInt(value, 16); + response._chunks.has(idx) || ref("Q:" + value); + ref = getChunk(response, idx); + return "fulfilled" === ref.status + ? ref.value + : defineLazyGetter(response, ref, parentObject, key); + } + Object.defineProperty(parentObject, key, { + get: function () { + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + default: + return ( + (ref = value.slice(1)), + getOutlinedModel(response, ref, parentObject, key, createModel) + ); + } + } + return value; + } + function missingCall() { + throw Error( + 'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.' + ); + } + function markIOStarted() { + this._debugIOStarted = !0; + } + function ResponseInstance( + bundlerConfig, + serverReferenceConfig, + moduleLoading, + callServer, + encodeFormAction, + nonce, + temporaryReferences, + findSourceMapURL, + replayConsole, + environmentName, + debugStartTime, + debugChannel + ) { + var chunks = new Map(); + this._bundlerConfig = bundlerConfig; + this._serverReferenceConfig = serverReferenceConfig; + this._moduleLoading = moduleLoading; + this._callServer = void 0 !== callServer ? callServer : missingCall; + this._encodeFormAction = encodeFormAction; + this._nonce = nonce; + this._chunks = chunks; + this._stringDecoder = new util.TextDecoder(); + this._fromJSON = null; + this._closed = !1; + this._closedReason = null; + this._tempRefs = temporaryReferences; + this._timeOrigin = 0; + this._pendingInitialRender = null; + this._pendingChunks = 0; + this._weakResponse = { weak: new WeakRef(this), response: this }; + this._debugRootOwner = bundlerConfig = + void 0 === ReactSharedInteralsServer || + null === ReactSharedInteralsServer.A + ? null + : ReactSharedInteralsServer.A.getOwner(); + this._debugRootStack = + null !== bundlerConfig ? Error("react-stack-top-frame") : null; + environmentName = void 0 === environmentName ? "Server" : environmentName; + supportsCreateTask && + (this._debugRootTask = console.createTask( + '"use ' + environmentName.toLowerCase() + '"' + )); + this._debugStartTime = + null == debugStartTime ? performance.now() : debugStartTime; + this._debugIOStarted = !1; + setTimeout(markIOStarted.bind(this), 0); + this._debugFindSourceMapURL = findSourceMapURL; + this._debugChannel = debugChannel; + this._blockedConsole = null; + this._replayConsole = replayConsole; + this._rootEnvironmentName = environmentName; + debugChannel && + (null === debugChannelRegistry + ? (closeDebugChannel(debugChannel), (this._debugChannel = void 0)) + : debugChannelRegistry.register(this, debugChannel, this)); + replayConsole && markAllTracksInOrder(); + this._fromJSON = createFromJSONCallback(this); + } + function createStreamState(weakResponse, streamDebugValue) { + var streamState = { + _rowState: 0, + _rowID: 0, + _rowTag: 0, + _rowLength: 0, + _buffer: [] + }; + weakResponse = unwrapWeakResponse(weakResponse); + var debugValuePromise = Promise.resolve(streamDebugValue); + debugValuePromise.status = "fulfilled"; + debugValuePromise.value = streamDebugValue; + streamState._debugInfo = { + name: "rsc stream", + start: weakResponse._debugStartTime, + end: weakResponse._debugStartTime, + byteSize: 0, + value: debugValuePromise, + owner: weakResponse._debugRootOwner, + debugStack: weakResponse._debugRootStack, + debugTask: weakResponse._debugRootTask + }; + streamState._debugTargetChunkSize = MIN_CHUNK_SIZE; + return streamState; + } + function incrementChunkDebugInfo(streamState, chunkLength) { + var debugInfo = streamState._debugInfo, + endTime = performance.now(), + previousEndTime = debugInfo.end; + chunkLength = debugInfo.byteSize + chunkLength; + chunkLength > streamState._debugTargetChunkSize || + endTime > previousEndTime + 10 + ? ((streamState._debugInfo = { + name: debugInfo.name, + start: debugInfo.start, + end: endTime, + byteSize: chunkLength, + value: debugInfo.value, + owner: debugInfo.owner, + debugStack: debugInfo.debugStack, + debugTask: debugInfo.debugTask + }), + (streamState._debugTargetChunkSize = chunkLength + MIN_CHUNK_SIZE)) + : ((debugInfo.end = endTime), (debugInfo.byteSize = chunkLength)); + } + function addAsyncInfo(chunk, asyncInfo) { + var value = resolveLazy(chunk.value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) + ? chunk._debugInfo.push(asyncInfo) + : isArrayImpl(value._debugInfo) + ? value._debugInfo.push(asyncInfo) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: [asyncInfo] + }); + } + function resolveChunkDebugInfo(response, streamState, chunk) { + response._debugIOStarted && + ((response = { awaited: streamState._debugInfo }), + "pending" === chunk.status || "blocked" === chunk.status + ? ((response = addAsyncInfo.bind(null, chunk, response)), + chunk.then(response, response)) + : addAsyncInfo(chunk, response)); + } + function resolveBuffer(response, id, buffer, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : (chunk && releasePendingChunk(response, chunk), + (buffer = new ReactPromise("fulfilled", buffer, null)), + resolveChunkDebugInfo(response, streamState, buffer), + chunks.set(id, buffer)); + } + function resolveModule(response, id, model, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + model = JSON.parse(model, response._fromJSON); + var clientReference = resolveClientReference( + response._bundlerConfig, + model + ); + prepareDestinationWithChunks( + response._moduleLoading, + model[1], + response._nonce + ); + if ((model = preloadModule(clientReference))) { + if (chunk) { + releasePendingChunk(response, chunk); + var blockedChunk = chunk; + blockedChunk.status = "blocked"; + } else + (blockedChunk = new ReactPromise("blocked", null, null)), + chunks.set(id, blockedChunk); + resolveChunkDebugInfo(response, streamState, blockedChunk); + model.then( + function () { + return resolveModuleChunk(response, blockedChunk, clientReference); + }, + function (error) { + return triggerErrorOnChunk(response, blockedChunk, error); + } + ); + } else + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModuleChunk(response, chunk, clientReference)) + : ((chunk = new ReactPromise( + "resolved_module", + clientReference, + null + )), + resolveChunkDebugInfo(response, streamState, chunk), + chunks.set(id, chunk)); + } + function resolveStream(response, id, stream, controller, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + if (chunk) { + if ( + (resolveChunkDebugInfo(response, streamState, chunk), + "pending" === chunk.status) + ) { + releasePendingChunk(response, chunk); + id = chunk.value; + if (null != chunk._debugChunk) { + streamState = initializingHandler; + chunks = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + if ( + (initializeDebugChunk(response, chunk), + null !== initializingHandler && + !initializingHandler.errored && + 0 < initializingHandler.deps) + ) { + initializingHandler.value = stream; + initializingHandler.reason = controller; + initializingHandler.chunk = chunk; + return; + } + } finally { + (initializingHandler = streamState), (initializingChunk = chunks); + } + } + chunk.status = "fulfilled"; + chunk.value = stream; + chunk.reason = controller; + null !== id + ? wakeChunk(id, chunk.value, chunk) + : moveDebugInfoFromChunkToInnerValue(chunk, stream); + } + } else + (stream = new ReactPromise("fulfilled", stream, controller)), + resolveChunkDebugInfo(response, streamState, stream), + chunks.set(id, stream); + } + function startReadableStream(response, id, type, streamState) { + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream( + response, + id, + type, + { + enqueueValue: function (value) { + null === previousBlockedChunk + ? controller.enqueue(value) + : previousBlockedChunk.then(function () { + controller.enqueue(value); + }); + }, + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = createResolvedModelChunk(response, json); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk3 = createPendingChunk(response); + _chunk3.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk3; + chunk.then(function () { + previousBlockedChunk === _chunk3 && + (previousBlockedChunk = null); + resolveModelChunk(response, _chunk3, json); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }, + streamState + ); + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function startAsyncIterable(response, id, iterator, streamState) { + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = {}; + iterable[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new ReactPromise( + "fulfilled", + { done: !0, value: void 0 }, + null + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }; + resolveStream( + response, + id, + iterator ? iterable[ASYNC_ITERATOR]() : iterable, + { + enqueueValue: function (value) { + if (nextWriteIndex === buffer.length) + buffer[nextWriteIndex] = new ReactPromise( + "fulfilled", + { done: !1, value: value }, + null + ); + else { + var chunk = buffer[nextWriteIndex], + resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "fulfilled"; + chunk.value = { done: !1, value: value }; + null !== resolveListeners && + wakeChunkIfInitialized( + chunk, + resolveListeners, + rejectListeners + ); + } + nextWriteIndex++; + }, + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !1 + ); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !0 + ); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + response, + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(response, buffer[nextWriteIndex++], error); + } + }, + streamState + ); + } + function resolveErrorDev(response, errorInfo) { + var name = errorInfo.name, + env = errorInfo.env; + var error = buildFakeCallStack( + response, + errorInfo.stack, + env, + !1, + Error.bind( + null, + errorInfo.message || + "An error occurred in the Server Components render but no message was provided" + ) + ); + var ownerTask = null; + null != errorInfo.owner && + ((errorInfo = errorInfo.owner.slice(1)), + (errorInfo = getOutlinedModel( + response, + errorInfo, + {}, + "", + createModel + )), + null !== errorInfo && + (ownerTask = initializeFakeTask(response, errorInfo))); + null === ownerTask + ? ((response = getRootTask(response, env)), + (error = null != response ? response.run(error) : error())) + : (error = ownerTask.run(error)); + error.name = name; + error.environmentName = env; + return error; + } + function createFakeFunction( + name, + filename, + sourceMap, + line, + col, + enclosingLine, + enclosingCol, + environmentName + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--; + 1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--; + 1 > line ? (line = 0) : line--; + 1 > col ? (col = 0) : col--; + if ( + line < enclosingLine || + (line === enclosingLine && col < enclosingCol) + ) + enclosingCol = enclosingLine = 0; + 1 > line + ? ((line = encodedName.length + 3), + (enclosingCol -= line), + 0 > enclosingCol && (enclosingCol = 0), + (col = col - enclosingCol - line - 3), + 0 > col && (col = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : 1 > enclosingLine + ? ((enclosingCol -= encodedName.length + 3), + 0 > enclosingCol && (enclosingCol = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})")) + : enclosingLine === line + ? ((col = col - enclosingCol - 3), + 0 > col && (col = 0), + (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})"); + encodedName = + 1 > enclosingLine + ? encodedName + + "\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + : "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + + encodedName; + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((encodedName += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?" + + fakeFunctionIdx++), + (encodedName += "\n//# sourceMappingURL=" + sourceMap)) + : (encodedName = filename + ? encodedName + ("\n//# sourceURL=" + encodeURI(filename)) + : encodedName + "\n//# sourceURL="); + try { + var fn = (0, eval)(encodedName)[name]; + } catch (x) { + fn = function (_) { + return _(); + }; + } + return fn; + } + function buildFakeCallStack( + response, + stack, + environmentName, + useEnclosingLine, + innerCall + ) { + for (var i = 0; i < stack.length; i++) { + var frame = stack[i], + frameKey = + frame.join("-") + + "-" + + environmentName + + (useEnclosingLine ? "-e" : "-n"), + fn = fakeFunctionCache.get(frameKey); + if (void 0 === fn) { + fn = frame[0]; + var filename = frame[1], + line = frame[2], + col = frame[3], + enclosingLine = frame[4]; + frame = frame[5]; + var findSourceMapURL = response._debugFindSourceMapURL; + findSourceMapURL = findSourceMapURL + ? findSourceMapURL(filename, environmentName) + : null; + fn = createFakeFunction( + fn, + filename, + findSourceMapURL, + line, + col, + useEnclosingLine ? line : enclosingLine, + useEnclosingLine ? col : frame, + environmentName + ); + fakeFunctionCache.set(frameKey, fn); + } + innerCall = fn.bind(null, innerCall); + } + return innerCall; + } + function getRootTask(response, childEnvironmentName) { + var rootTask = response._debugRootTask; + return rootTask + ? response._rootEnvironmentName !== childEnvironmentName + ? ((response = console.createTask.bind( + console, + '"use ' + childEnvironmentName.toLowerCase() + '"' + )), + rootTask.run(response)) + : rootTask + : null; + } + function initializeFakeTask(response, debugInfo) { + if (!supportsCreateTask || null == debugInfo.stack) return null; + var cachedEntry = debugInfo.debugTask; + if (void 0 !== cachedEntry) return cachedEntry; + var useEnclosingLine = void 0 === debugInfo.key, + stack = debugInfo.stack, + env = + null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env; + cachedEntry = + null == debugInfo.owner || null == debugInfo.owner.env + ? response._rootEnvironmentName + : debugInfo.owner.env; + var ownerTask = + null == debugInfo.owner + ? null + : initializeFakeTask(response, debugInfo.owner); + env = + env !== cachedEntry + ? '"use ' + env.toLowerCase() + '"' + : void 0 !== debugInfo.key + ? "<" + (debugInfo.name || "...") + ">" + : void 0 !== debugInfo.name + ? debugInfo.name || "unknown" + : "await " + (debugInfo.awaited.name || "unknown"); + env = console.createTask.bind(console, env); + useEnclosingLine = buildFakeCallStack( + response, + stack, + cachedEntry, + useEnclosingLine, + env + ); + null === ownerTask + ? ((response = getRootTask(response, cachedEntry)), + (response = + null != response + ? response.run(useEnclosingLine) + : useEnclosingLine())) + : (response = ownerTask.run(useEnclosingLine)); + return (debugInfo.debugTask = response); + } + function fakeJSXCallSite() { + return Error("react-stack-top-frame"); + } + function initializeFakeStack(response, debugInfo) { + if (void 0 === debugInfo.debugStack) { + null != debugInfo.stack && + (debugInfo.debugStack = createFakeJSXCallStackInDEV( + response, + debugInfo.stack, + null == debugInfo.env ? "" : debugInfo.env + )); + var owner = debugInfo.owner; + null != owner && + (initializeFakeStack(response, owner), + void 0 === owner.debugLocation && + null != debugInfo.debugStack && + (owner.debugLocation = debugInfo.debugStack)); + } + } + function initializeDebugInfo(response, debugInfo) { + void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo); + if (null == debugInfo.owner && null != response._debugRootOwner) { + var _componentInfoOrAsyncInfo = debugInfo; + _componentInfoOrAsyncInfo.owner = response._debugRootOwner; + _componentInfoOrAsyncInfo.stack = null; + _componentInfoOrAsyncInfo.debugStack = response._debugRootStack; + _componentInfoOrAsyncInfo.debugTask = response._debugRootTask; + } else + void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo); + "number" === typeof debugInfo.time && + (debugInfo = { time: debugInfo.time + response._timeOrigin }); + return debugInfo; + } + function getCurrentStackInDEV() { + var owner = currentOwnerInDEV; + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = prepareStackTrace; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function resolveConsoleEntry(response, json) { + if (response._replayConsole) { + var blockedChunk = response._blockedConsole; + if (null == blockedChunk) + (blockedChunk = createResolvedModelChunk(response, json)), + initializeModelChunk(blockedChunk), + "fulfilled" === blockedChunk.status + ? replayConsoleWithCallStackInDEV(response, blockedChunk.value) + : (blockedChunk.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ), + (response._blockedConsole = blockedChunk)); + else { + var _chunk4 = createPendingChunk(response); + _chunk4.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ); + response._blockedConsole = _chunk4; + var unblock = function () { + response._blockedConsole === _chunk4 && + (response._blockedConsole = null); + resolveModelChunk(response, _chunk4, json); + }; + blockedChunk.then(unblock, unblock); + } + } + } + function initializeIOInfo(response, ioInfo) { + void 0 !== ioInfo.stack && + (initializeFakeTask(response, ioInfo), + initializeFakeStack(response, ioInfo)); + ioInfo.start += response._timeOrigin; + ioInfo.end += response._timeOrigin; + if (response._replayConsole) { + response = response._rootEnvironmentName; + var promise = ioInfo.value; + if (promise) + switch (promise.status) { + case "fulfilled": + logIOInfo(ioInfo, response, promise.value); + break; + case "rejected": + logIOInfoErrored(ioInfo, response, promise.reason); + break; + default: + promise.then( + logIOInfo.bind(null, ioInfo, response), + logIOInfoErrored.bind(null, ioInfo, response) + ); + } + else logIOInfo(ioInfo, response, void 0); + } + } + function resolveIOInfo(response, id, model) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk + ? (resolveModelChunk(response, chunk, model), + "resolved_model" === chunk.status && initializeModelChunk(chunk)) + : ((chunk = createResolvedModelChunk(response, model)), + chunks.set(id, chunk), + initializeModelChunk(chunk)); + "fulfilled" === chunk.status + ? initializeIOInfo(response, chunk.value) + : chunk.then( + function (v) { + initializeIOInfo(response, v); + }, + function () {} + ); + } + function mergeBuffer(buffer, lastChunk) { + for ( + var l = buffer.length, byteLength = lastChunk.length, i = 0; + i < l; + i++ + ) + byteLength += buffer[i].byteLength; + byteLength = new Uint8Array(byteLength); + for (var _i3 = (i = 0); _i3 < l; _i3++) { + var chunk = buffer[_i3]; + byteLength.set(chunk, i); + i += chunk.byteLength; + } + byteLength.set(lastChunk, i); + return byteLength; + } + function resolveTypedArray( + response, + id, + buffer, + lastChunk, + constructor, + bytesPerElement, + streamState + ) { + buffer = + 0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement + ? lastChunk + : mergeBuffer(buffer, lastChunk); + constructor = new constructor( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength / bytesPerElement + ); + resolveBuffer(response, id, constructor, streamState); + } + function flushComponentPerformance( + response$jscomp$0, + root, + trackIdx$jscomp$6, + trackTime, + parentEndTime + ) { + if (!isArrayImpl(root._children)) { + var previousResult = root._children, + previousEndTime = previousResult.endTime; + if ( + -Infinity < parentEndTime && + parentEndTime < previousEndTime && + null !== previousResult.component + ) { + var componentInfo = previousResult.component, + trackIdx = trackIdx$jscomp$6, + startTime = parentEndTime; + if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) { + var color = + componentInfo.env === response$jscomp$0._rootEnvironmentName + ? "primary-light" + : "secondary-light", + entryName = componentInfo.name + " [deduped]", + debugTask = componentInfo.debugTask; + debugTask + ? debugTask.run( + console.timeStamp.bind( + console, + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ) + ) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ); + } + } + previousResult.track = trackIdx$jscomp$6; + return previousResult; + } + var children = root._children; + var debugInfo = root._debugInfo; + if (0 === debugInfo.length && "fulfilled" === root.status) { + var resolvedValue = resolveLazy(root.value); + "object" === typeof resolvedValue && + null !== resolvedValue && + (isArrayImpl(resolvedValue) || + "function" === typeof resolvedValue[ASYNC_ITERATOR] || + resolvedValue.$$typeof === REACT_ELEMENT_TYPE || + resolvedValue.$$typeof === REACT_LAZY_TYPE) && + isArrayImpl(resolvedValue._debugInfo) && + (debugInfo = resolvedValue._debugInfo); + } + if (debugInfo) { + for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + "number" === typeof info.time && (startTime$jscomp$0 = info.time); + if ("string" === typeof info.name) { + startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++; + trackTime = startTime$jscomp$0; + break; + } + } + for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) { + var _info = debugInfo[_i4]; + if ("number" === typeof _info.time && _info.time > parentEndTime) { + parentEndTime = _info.time; + break; + } + } + } + var result = { + track: trackIdx$jscomp$6, + endTime: -Infinity, + component: null + }; + root._children = result; + for ( + var childrenEndTime = -Infinity, + childTrackIdx = trackIdx$jscomp$6, + childTrackTime = trackTime, + _i5 = 0; + _i5 < children.length; + _i5++ + ) { + var childResult = flushComponentPerformance( + response$jscomp$0, + children[_i5], + childTrackIdx, + childTrackTime, + parentEndTime + ); + null !== childResult.component && + (result.component = childResult.component); + childTrackIdx = childResult.track; + var childEndTime = childResult.endTime; + childEndTime > childTrackTime && (childTrackTime = childEndTime); + childEndTime > childrenEndTime && (childrenEndTime = childEndTime); + } + if (debugInfo) + for ( + var componentEndTime = 0, + isLastComponent = !0, + endTime = -1, + endTimeIdx = -1, + _i6 = debugInfo.length - 1; + 0 <= _i6; + _i6-- + ) { + var _info2 = debugInfo[_i6]; + if ("number" === typeof _info2.time) { + 0 === componentEndTime && (componentEndTime = _info2.time); + var time = _info2.time; + if (-1 < endTimeIdx) + for (var j = endTimeIdx - 1; j > _i6; j--) { + var candidateInfo = debugInfo[j]; + if ("string" === typeof candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var componentInfo$jscomp$0 = candidateInfo, + response = response$jscomp$0, + componentInfo$jscomp$1 = componentInfo$jscomp$0, + trackIdx$jscomp$0 = trackIdx$jscomp$6, + startTime$jscomp$1 = time, + componentEndTime$jscomp$0 = componentEndTime, + childrenEndTime$jscomp$0 = childrenEndTime; + if ( + isLastComponent && + "rejected" === root.status && + root.reason !== response._closedReason + ) { + var componentInfo$jscomp$2 = componentInfo$jscomp$1, + trackIdx$jscomp$1 = trackIdx$jscomp$0, + startTime$jscomp$2 = startTime$jscomp$1, + childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0, + error = root.reason; + if (supportsUserTiming) { + var env = componentInfo$jscomp$2.env, + name = componentInfo$jscomp$2.name, + entryName$jscomp$0 = + env === response._rootEnvironmentName || + void 0 === env + ? name + : name + " [" + env + "]", + measureName = "\u200b" + entryName$jscomp$0, + properties = [ + [ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]; + null != componentInfo$jscomp$2.key && + addValueToProperties( + "key", + componentInfo$jscomp$2.key, + properties, + 0, + "" + ); + null != componentInfo$jscomp$2.props && + addObjectToProperties( + componentInfo$jscomp$2.props, + properties, + 0, + "" + ); + performance.measure(measureName, { + start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2, + end: childrenEndTime$jscomp$1, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$1], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$0 + " Errored", + properties: properties + } + } + }); + performance.clearMeasures(measureName); + } + } else { + var componentInfo$jscomp$3 = componentInfo$jscomp$1, + trackIdx$jscomp$2 = trackIdx$jscomp$0, + startTime$jscomp$3 = startTime$jscomp$1, + childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0; + if ( + supportsUserTiming && + 0 <= childrenEndTime$jscomp$2 && + 10 > trackIdx$jscomp$2 + ) { + var env$jscomp$0 = componentInfo$jscomp$3.env, + name$jscomp$0 = componentInfo$jscomp$3.name, + isPrimaryEnv = + env$jscomp$0 === response._rootEnvironmentName, + selfTime = + componentEndTime$jscomp$0 - startTime$jscomp$3, + color$jscomp$0 = + 0.5 > selfTime + ? isPrimaryEnv + ? "primary-light" + : "secondary-light" + : 50 > selfTime + ? isPrimaryEnv + ? "primary" + : "secondary" + : 500 > selfTime + ? isPrimaryEnv + ? "primary-dark" + : "secondary-dark" + : "error", + debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask, + measureName$jscomp$0 = + "\u200b" + + (isPrimaryEnv || void 0 === env$jscomp$0 + ? name$jscomp$0 + : name$jscomp$0 + " [" + env$jscomp$0 + "]"); + if (debugTask$jscomp$0) { + var properties$jscomp$0 = []; + null != componentInfo$jscomp$3.key && + addValueToProperties( + "key", + componentInfo$jscomp$3.key, + properties$jscomp$0, + 0, + "" + ); + null != componentInfo$jscomp$3.props && + addObjectToProperties( + componentInfo$jscomp$3.props, + properties$jscomp$0, + 0, + "" + ); + debugTask$jscomp$0.run( + performance.measure.bind( + performance, + measureName$jscomp$0, + { + start: + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + end: childrenEndTime$jscomp$2, + detail: { + devtools: { + color: color$jscomp$0, + track: trackNames[trackIdx$jscomp$2], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(measureName$jscomp$0); + } else + console.timeStamp( + measureName$jscomp$0, + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + childrenEndTime$jscomp$2, + trackNames[trackIdx$jscomp$2], + "Server Components \u269b", + color$jscomp$0 + ); + } + } + componentEndTime = time; + result.component = componentInfo$jscomp$0; + isLastComponent = !1; + } else if ( + candidateInfo.awaited && + null != candidateInfo.awaited.env + ) { + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo = candidateInfo, + env$jscomp$1 = response$jscomp$0._rootEnvironmentName, + promise = asyncInfo.awaited.value; + if (promise) { + var thenable = promise; + switch (thenable.status) { + case "fulfilled": + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + thenable.value + ); + break; + case "rejected": + var asyncInfo$jscomp$0 = asyncInfo, + trackIdx$jscomp$3 = trackIdx$jscomp$6, + startTime$jscomp$4 = time, + endTime$jscomp$0 = endTime, + rootEnv = env$jscomp$1, + error$jscomp$0 = thenable.reason; + if (supportsUserTiming && 0 < endTime$jscomp$0) { + var description = getIODescription(error$jscomp$0), + entryName$jscomp$1 = + "await " + + getIOShortName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ), + debugTask$jscomp$1 = + asyncInfo$jscomp$0.debugTask || + asyncInfo$jscomp$0.awaited.debugTask; + if (debugTask$jscomp$1) { + var properties$jscomp$1 = [ + [ + "Rejected", + "object" === typeof error$jscomp$0 && + null !== error$jscomp$0 && + "string" === typeof error$jscomp$0.message + ? String(error$jscomp$0.message) + : String(error$jscomp$0) + ] + ], + tooltipText = + getIOLongName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ) + " Rejected"; + debugTask$jscomp$1.run( + performance.measure.bind( + performance, + entryName$jscomp$1, + { + start: + 0 > startTime$jscomp$4 + ? 0 + : startTime$jscomp$4, + end: endTime$jscomp$0, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$3], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$1, + tooltipText: tooltipText + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$1); + } else + console.timeStamp( + entryName$jscomp$1, + 0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4, + endTime$jscomp$0, + trackNames[trackIdx$jscomp$3], + "Server Components \u269b", + "error" + ); + } + break; + default: + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } else + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } + else { + endTime = time; + for (var _j = debugInfo.length - 1; _j > _i6; _j--) { + var _candidateInfo = debugInfo[_j]; + if ("string" === typeof _candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var _componentInfo = _candidateInfo, + _env = response$jscomp$0._rootEnvironmentName, + componentInfo$jscomp$4 = _componentInfo, + trackIdx$jscomp$4 = trackIdx$jscomp$6, + startTime$jscomp$5 = time, + childrenEndTime$jscomp$3 = childrenEndTime; + if (supportsUserTiming) { + var env$jscomp$2 = componentInfo$jscomp$4.env, + name$jscomp$1 = componentInfo$jscomp$4.name, + entryName$jscomp$2 = + env$jscomp$2 === _env || void 0 === env$jscomp$2 + ? name$jscomp$1 + : name$jscomp$1 + " [" + env$jscomp$2 + "]", + measureName$jscomp$1 = "\u200b" + entryName$jscomp$2, + properties$jscomp$2 = [ + [ + "Aborted", + "The stream was aborted before this Component finished rendering." + ] + ]; + null != componentInfo$jscomp$4.key && + addValueToProperties( + "key", + componentInfo$jscomp$4.key, + properties$jscomp$2, + 0, + "" + ); + null != componentInfo$jscomp$4.props && + addObjectToProperties( + componentInfo$jscomp$4.props, + properties$jscomp$2, + 0, + "" + ); + performance.measure(measureName$jscomp$1, { + start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5, + end: childrenEndTime$jscomp$3, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$4], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$2 + " Aborted", + properties: properties$jscomp$2 + } + } + }); + performance.clearMeasures(measureName$jscomp$1); + } + componentEndTime = time; + result.component = _componentInfo; + isLastComponent = !1; + } else if ( + _candidateInfo.awaited && + null != _candidateInfo.awaited.env + ) { + var _asyncInfo = _candidateInfo, + _env2 = response$jscomp$0._rootEnvironmentName; + _asyncInfo.awaited.end > endTime && + (endTime = _asyncInfo.awaited.end); + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo$jscomp$1 = _asyncInfo, + trackIdx$jscomp$5 = trackIdx$jscomp$6, + startTime$jscomp$6 = time, + endTime$jscomp$1 = endTime, + rootEnv$jscomp$0 = _env2; + if (supportsUserTiming && 0 < endTime$jscomp$1) { + var entryName$jscomp$3 = + "await " + + getIOShortName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ), + debugTask$jscomp$2 = + asyncInfo$jscomp$1.debugTask || + asyncInfo$jscomp$1.awaited.debugTask; + if (debugTask$jscomp$2) { + var tooltipText$jscomp$0 = + getIOLongName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ) + " Aborted"; + debugTask$jscomp$2.run( + performance.measure.bind( + performance, + entryName$jscomp$3, + { + start: + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + end: endTime$jscomp$1, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$5], + trackGroup: "Server Components \u269b", + properties: [ + [ + "Aborted", + "The stream was aborted before this Promise resolved." + ] + ], + tooltipText: tooltipText$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$3); + } else + console.timeStamp( + entryName$jscomp$3, + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + endTime$jscomp$1, + trackNames[trackIdx$jscomp$5], + "Server Components \u269b", + "warning" + ); + } + } + } + } + endTime = time; + endTimeIdx = _i6; + } + } + result.endTime = childrenEndTime; + return result; + } + function flushInitialRenderPerformance(response) { + if (response._replayConsole) { + var rootChunk = getChunk(response, 0); + isArrayImpl(rootChunk._children) && + (markAllTracksInOrder(), + flushComponentPerformance( + response, + rootChunk, + 0, + -Infinity, + -Infinity + )); + } + } + function processFullBinaryRow( + response, + streamState, + id, + tag, + buffer, + chunk + ) { + switch (tag) { + case 65: + resolveBuffer( + response, + id, + mergeBuffer(buffer, chunk).buffer, + streamState + ); + return; + case 79: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int8Array, + 1, + streamState + ); + return; + case 111: + resolveBuffer( + response, + id, + 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk), + streamState + ); + return; + case 85: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint8ClampedArray, + 1, + streamState + ); + return; + case 83: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int16Array, + 2, + streamState + ); + return; + case 115: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint16Array, + 2, + streamState + ); + return; + case 76: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int32Array, + 4, + streamState + ); + return; + case 108: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint32Array, + 4, + streamState + ); + return; + case 71: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float32Array, + 4, + streamState + ); + return; + case 103: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float64Array, + 8, + streamState + ); + return; + case 77: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigInt64Array, + 8, + streamState + ); + return; + case 109: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigUint64Array, + 8, + streamState + ); + return; + case 86: + resolveTypedArray( + response, + id, + buffer, + chunk, + DataView, + 1, + streamState + ); + return; + } + for ( + var stringDecoder = response._stringDecoder, row = "", i = 0; + i < buffer.length; + i++ + ) + row += stringDecoder.decode(buffer[i], decoderOptions); + row += stringDecoder.decode(chunk); + processFullStringRow(response, streamState, id, tag, row); + } + function processFullStringRow(response, streamState, id, tag, row) { + switch (tag) { + case 73: + resolveModule(response, id, row, streamState); + break; + case 72: + id = row[0]; + streamState = row.slice(1); + response = JSON.parse(streamState, response._fromJSON); + streamState = ReactDOMSharedInternals.d; + switch (id) { + case "D": + streamState.D(response); + break; + case "C": + "string" === typeof response + ? streamState.C(response) + : streamState.C(response[0], response[1]); + break; + case "L": + id = response[0]; + row = response[1]; + 3 === response.length + ? streamState.L(id, row, response[2]) + : streamState.L(id, row); + break; + case "m": + "string" === typeof response + ? streamState.m(response) + : streamState.m(response[0], response[1]); + break; + case "X": + "string" === typeof response + ? streamState.X(response) + : streamState.X(response[0], response[1]); + break; + case "S": + "string" === typeof response + ? streamState.S(response) + : streamState.S( + response[0], + 0 === response[1] ? void 0 : response[1], + 3 === response.length ? response[2] : void 0 + ); + break; + case "M": + "string" === typeof response + ? streamState.M(response) + : streamState.M(response[0], response[1]); + } + break; + case 69: + tag = response._chunks; + var chunk = tag.get(id); + row = JSON.parse(row); + var error = resolveErrorDev(response, row); + error.digest = row.digest; + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + triggerErrorOnChunk(response, chunk, error)) + : ((row = new ReactPromise("rejected", null, error)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 84: + tag = response._chunks; + (chunk = tag.get(id)) && "pending" !== chunk.status + ? chunk.reason.enqueueValue(row) + : (chunk && releasePendingChunk(response, chunk), + (row = new ReactPromise("fulfilled", row, null)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 78: + response._timeOrigin = +row - performance.timeOrigin; + break; + case 68: + id = getChunk(response, id); + "fulfilled" !== id.status && + "rejected" !== id.status && + "halted" !== id.status && + "blocked" !== id.status && + "resolved_module" !== id.status && + ((streamState = id._debugChunk), + (tag = createResolvedModelChunk(response, row)), + (tag._debugChunk = streamState), + (id._debugChunk = tag), + initializeDebugChunk(response, id), + "blocked" !== tag.status || + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + '"' !== row[0] || + "$" !== row[1] || + ((streamState = row.slice(2, row.length - 1).split(":")), + (streamState = parseInt(streamState[0], 16)), + "pending" === getChunk(response, streamState).status && + (id._debugChunk = null))); + break; + case 74: + resolveIOInfo(response, id, row); + break; + case 87: + resolveConsoleEntry(response, row); + break; + case 82: + startReadableStream(response, id, void 0, streamState); + break; + case 114: + startReadableStream(response, id, "bytes", streamState); + break; + case 88: + startAsyncIterable(response, id, !1, streamState); + break; + case 120: + startAsyncIterable(response, id, !0, streamState); + break; + case 67: + (response = response._chunks.get(id)) && + "fulfilled" === response.status && + response.reason.close("" === row ? '"$undefined"' : row); + break; + default: + if ("" === row) { + if ( + ((streamState = response._chunks), + (row = streamState.get(id)) || + streamState.set(id, (row = createPendingChunk(response))), + "pending" === row.status || "blocked" === row.status) + ) + releasePendingChunk(response, row), + (response = row), + (response.status = "halted"), + (response.value = null), + (response.reason = null); + } else + (tag = response._chunks), + (chunk = tag.get(id)) + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModelChunk(response, chunk, row)) + : ((row = createResolvedModelChunk(response, row)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + } + } + function processBinaryChunk(weakResponse, streamState, chunk) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse), + i = 0, + rowState = streamState._rowState; + weakResponse = streamState._rowID; + var rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + for ( + incrementChunkDebugInfo(streamState, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk[i++]; + 58 === lastIdx + ? (rowState = 1) + : (weakResponse = + (weakResponse << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk[i]; + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 35 === rowState || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk[i++]; + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf(10, i); + break; + case 4: + (lastIdx = i + rowLength), + lastIdx > chunk.length && (lastIdx = -1); + } + var offset = chunk.byteOffset + i; + if (-1 < lastIdx) + (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)), + processFullBinaryRow( + response, + streamState, + weakResponse, + rowTag, + buffer, + rowLength + ), + (i = lastIdx), + 3 === rowState && i++, + (rowLength = weakResponse = rowTag = rowState = 0), + (buffer.length = 0); + else { + chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i); + buffer.push(chunk); + rowLength -= chunk.byteLength; + break; + } + } + streamState._rowState = rowState; + streamState._rowID = weakResponse; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + } + } + function createFromJSONCallback(response) { + return function (key, value) { + if ("string" === typeof value) + return parseModelString(response, this, key, value); + if ("object" === typeof value && null !== value) { + if (value[0] === REACT_ELEMENT_TYPE) + b: { + var owner = value[4], + stack = value[5]; + key = value[6]; + value = { + $$typeof: REACT_ELEMENT_TYPE, + type: value[1], + key: value[2], + props: value[3], + _owner: void 0 === owner ? null : owner + }; + Object.defineProperty(value, "ref", { + enumerable: !1, + get: nullRefGetter + }); + value._store = {}; + Object.defineProperty(value._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: key + }); + Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + Object.defineProperty(value, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: void 0 === stack ? null : stack + }); + Object.defineProperty(value, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + if (null !== initializingHandler) { + owner = initializingHandler; + initializingHandler = owner.parent; + if (owner.errored) { + stack = new ReactPromise("rejected", null, owner.reason); + initializeElement(response, value, null); + owner = { + name: getComponentNameFromType(value.type) || "", + owner: value._owner + }; + owner.debugStack = value._debugStack; + supportsCreateTask && (owner.debugTask = value._debugTask); + stack._debugInfo = [owner]; + key = createLazyChunkWrapper(stack, key); + break b; + } + if (0 < owner.deps) { + stack = new ReactPromise("blocked", null, null); + owner.value = value; + owner.chunk = stack; + key = createLazyChunkWrapper(stack, key); + value = initializeElement.bind(null, response, value, key); + stack.then(value, value); + break b; + } + } + initializeElement(response, value, null); + key = value; + } + else key = value; + return key; + } + return value; + }; + } + function close(weakResponse) { + reportGlobalError(weakResponse, Error("Connection closed.")); + } + function noServerCall$1() { + throw Error( + "Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead." + ); + } + function createResponseFromOptions(options) { + return new ResponseInstance( + options.serverConsumerManifest.moduleMap, + options.serverConsumerManifest.serverModuleMap, + options.serverConsumerManifest.moduleLoading, + noServerCall$1, + options.encodeFormAction, + "string" === typeof options.nonce ? options.nonce : void 0, + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + options && options.findSourceMapURL ? options.findSourceMapURL : void 0, + options ? !0 === options.replayConsoleLogs : !1, + options && options.environmentName ? options.environmentName : void 0, + options && null != options.startTime ? options.startTime : void 0, + options && void 0 !== options.debugChannel + ? { + hasReadable: void 0 !== options.debugChannel.readable, + callback: null + } + : void 0 + )._weakResponse; + } + function startReadingFromStream$1(response, stream, onDone, debugValue) { + function progress(_ref) { + var value = _ref.value; + if (_ref.done) return onDone(); + processBinaryChunk(response, streamState, value); + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response, e); + } + var streamState = createStreamState(response, debugValue), + reader = stream.getReader(); + reader.read().then(progress).catch(error); + } + function noServerCall() { + throw Error( + "Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead." + ); + } + function startReadingFromStream(response$jscomp$0, stream, onEnd) { + var streamState = createStreamState(response$jscomp$0, stream); + stream.on("data", function (chunk) { + if ("string" === typeof chunk) { + if (void 0 !== response$jscomp$0.weak.deref()) { + var response = unwrapWeakResponse(response$jscomp$0), + i = 0, + rowState = streamState._rowState, + rowID = streamState._rowID, + rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + for ( + incrementChunkDebugInfo(streamState, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk.charCodeAt(i++); + 58 === lastIdx + ? (rowState = 1) + : (rowID = + (rowID << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk.charCodeAt(i); + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk.charCodeAt(i++); + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf("\n", i); + break; + case 4: + if (84 !== rowTag) + throw Error( + "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams." + ); + if (rowLength < chunk.length || chunk.length > 3 * rowLength) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + lastIdx = chunk.length; + } + if (-1 < lastIdx) { + if (0 < buffer.length) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + i = chunk.slice(i, lastIdx); + processFullStringRow(response, streamState, rowID, rowTag, i); + i = lastIdx; + 3 === rowState && i++; + rowLength = rowID = rowTag = rowState = 0; + buffer.length = 0; + } else if (chunk.length !== i) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + } + streamState._rowState = rowState; + streamState._rowID = rowID; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + } + } else processBinaryChunk(response$jscomp$0, streamState, chunk); + }); + stream.on("error", function (error) { + reportGlobalError(response$jscomp$0, error); + }); + stream.on("end", onEnd); + } + var util = require("util"), + ReactDOM = require("react-dom"), + React = require("react"), + decoderOptions = { stream: !0 }, + bind$1 = Function.prototype.bind, + instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(), + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_PORTAL_TYPE = Symbol.for("react.portal"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), + REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + ObjectPrototype = Object.prototype, + knownServerReferences = new WeakMap(), + boundCache = new WeakMap(), + fakeServerFunctionIdx = 0, + FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice, + v8FrameRegExp = + /^ {3} at (?:(.+) \((.+):(\d+):(\d+)\)|(?:async )?(.+):(\d+):(\d+))$/, + jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\d+):(\d+)/, + hasOwnProperty = Object.prototype.hasOwnProperty, + REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + supportsUserTiming = + "undefined" !== typeof console && + "function" === typeof console.timeStamp && + "undefined" !== typeof performance && + "function" === typeof performance.measure, + trackNames = + "Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split( + " " + ), + prefix, + suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var ReactSharedInteralsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE || + ReactSharedInteralsServer; + ReactPromise.prototype = Object.create(Promise.prototype); + ReactPromise.prototype.then = function (resolve, reject) { + var _this = this; + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + break; + case "resolved_module": + initializeModuleChunk(this); + } + var resolveCallback = resolve, + rejectCallback = reject, + wrapperPromise = new Promise(function (res, rej) { + resolve = function (value) { + wrapperPromise._debugInfo = _this._debugInfo; + res(value); + }; + reject = function (reason) { + wrapperPromise._debugInfo = _this._debugInfo; + rej(reason); + }; + }); + wrapperPromise.then(resolveCallback, rejectCallback); + switch (this.status) { + case "fulfilled": + "function" === typeof resolve && resolve(this.value); + break; + case "pending": + case "blocked": + "function" === typeof resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + "function" === typeof reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + case "halted": + break; + default: + "function" === typeof reject && reject(this.reason); + } + }; + var debugChannelRegistry = + "function" === typeof FinalizationRegistry + ? new FinalizationRegistry(closeDebugChannel) + : null, + initializingHandler = null, + initializingChunk = null, + mightHaveStaticConstructor = /\bclass\b.*\bstatic\b/, + MIN_CHUNK_SIZE = 65536, + supportsCreateTask = !!console.createTask, + fakeFunctionCache = new Map(), + fakeFunctionIdx = 0, + createFakeJSXCallStack = { + react_stack_bottom_frame: function (response, stack, environmentName) { + return buildFakeCallStack( + response, + stack, + environmentName, + !1, + fakeJSXCallSite + )(); + } + }, + createFakeJSXCallStackInDEV = + createFakeJSXCallStack.react_stack_bottom_frame.bind( + createFakeJSXCallStack + ), + currentOwnerInDEV = null, + replayConsoleWithCallStack = { + react_stack_bottom_frame: function (response, payload) { + var methodName = payload[0], + stackTrace = payload[1], + owner = payload[2], + env = payload[3]; + payload = payload.slice(4); + var prevStack = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; + currentOwnerInDEV = null === owner ? response._debugRootOwner : owner; + try { + a: { + var offset = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + var JSCompiler_inline_result = bind$1.apply( + console[methodName], + [console].concat(payload) + ); + break a; + case "assert": + offset = 1; + } + var newArgs = payload.slice(0); + "string" === typeof newArgs[offset] + ? newArgs.splice( + offset, + 1, + "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + newArgs[offset], + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ) + : newArgs.splice( + offset, + 0, + "\u001b[0m\u001b[7m%c%s\u001b[0m%c", + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ); + newArgs.unshift(console); + JSCompiler_inline_result = bind$1.apply( + console[methodName], + newArgs + ); + } + var callStack = buildFakeCallStack( + response, + stackTrace, + env, + !1, + JSCompiler_inline_result + ); + if (null != owner) { + var task = initializeFakeTask(response, owner); + initializeFakeStack(response, owner); + if (null !== task) { + task.run(callStack); + return; + } + } + var rootTask = getRootTask(response, env); + null != rootTask ? rootTask.run(callStack) : callStack(); + } finally { + (currentOwnerInDEV = null), + (ReactSharedInternals.getCurrentStack = prevStack); + } + } + }, + replayConsoleWithCallStackInDEV = + replayConsoleWithCallStack.react_stack_bottom_frame.bind( + replayConsoleWithCallStack + ); + exports.createFromFetch = function (promiseForResponse, options) { + var response = createResponseFromOptions(options); + promiseForResponse.then( + function (r) { + if ( + options && + options.debugChannel && + options.debugChannel.readable + ) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromStream$1( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream$1(response, r.body, handleDone, r); + } else + startReadingFromStream$1( + response, + r.body, + close.bind(null, response), + r + ); + }, + function (e) { + reportGlobalError(response, e); + } + ); + return getRoot(response); + }; + exports.createFromNodeStream = function ( + stream, + serverConsumerManifest, + options + ) { + var response = new ResponseInstance( + serverConsumerManifest.moduleMap, + serverConsumerManifest.serverModuleMap, + serverConsumerManifest.moduleLoading, + noServerCall, + options ? options.encodeFormAction : void 0, + options && "string" === typeof options.nonce ? options.nonce : void 0, + void 0, + options && options.findSourceMapURL ? options.findSourceMapURL : void 0, + options ? !0 === options.replayConsoleLogs : !1, + options && options.environmentName ? options.environmentName : void 0, + options && null != options.startTime ? options.startTime : void 0, + options && void 0 !== options.debugChannel + ? { + hasReadable: void 0 !== options.debugChannel.readable, + callback: null + } + : void 0 + )._weakResponse; + if (options && options.debugChannel) { + var streamEndedCount = 0; + serverConsumerManifest = function () { + 2 === ++streamEndedCount && close(response); + }; + startReadingFromStream( + response, + options.debugChannel, + serverConsumerManifest + ); + startReadingFromStream(response, stream, serverConsumerManifest); + } else + startReadingFromStream(response, stream, close.bind(null, response)); + return getRoot(response); + }; + exports.createFromReadableStream = function (stream, options) { + var response = createResponseFromOptions(options); + if (options && options.debugChannel && options.debugChannel.readable) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromStream$1( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream$1(response, stream, handleDone, stream); + } else + startReadingFromStream$1( + response, + stream, + close.bind(null, response), + stream + ); + return getRoot(response); + }; + exports.createServerReference = function (id) { + return createServerReference$1(id, noServerCall$1); + }; + exports.createTemporaryReferenceSet = function () { + return new Map(); + }; + exports.encodeReply = function (value, options) { + return new Promise(function (resolve, reject) { + var abort = processReply( + value, + "", + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + resolve, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(signal.reason); + else { + var listener = function () { + abort(signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + }); + }; + exports.registerServerReference = function ( + reference, + id, + encodeFormAction + ) { + registerBoundServerReference(reference, id, null, encodeFormAction); + return reference; + }; + })(); diff --git a/.socket/blob/2e45494a36fed247dee0b6502c5e3f941e1fc2093d7b4ec995dcc7ff7dabb847 b/.socket/blob/2e45494a36fed247dee0b6502c5e3f941e1fc2093d7b4ec995dcc7ff7dabb847 new file mode 100644 index 0000000..3bbcd60 --- /dev/null +++ b/.socket/blob/2e45494a36fed247dee0b6502c5e3f941e1fc2093d7b4ec995dcc7ff7dabb847 @@ -0,0 +1,6171 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-webpack-server.node.unbundled.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function voidHandler() {} + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function _defineProperty(obj, key, value) { + a: if ("object" == typeof key && key) { + var e = key[Symbol.toPrimitive]; + if (void 0 !== e) { + key = e.call(key, "string"); + if ("object" != typeof key) break a; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + key = String(key); + } + key = "symbol" == typeof key ? key : key + ""; + key in obj + ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) + : (obj[key] = value); + return obj; + } + function flushBuffered(destination) { + "function" === typeof destination.flush && destination.flush(); + } + function writeToDestination(destination, view) { + destination = destination.write(view); + destinationHasCapacity = destinationHasCapacity && destination; + } + function writeChunkAndReturn(destination, chunk) { + if ("string" === typeof chunk) { + if (0 !== chunk.length) + if (4096 < 3 * chunk.length) + 0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk); + else { + var target = currentView; + 0 < writtenBytes && (target = currentView.subarray(writtenBytes)); + target = textEncoder.encodeInto(chunk, target); + var read = target.read; + writtenBytes += target.written; + read < chunk.length && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = textEncoder.encodeInto( + chunk.slice(read), + currentView + ).written)); + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)); + } + } else + 0 !== chunk.byteLength && + (4096 < chunk.byteLength + ? (0 < writtenBytes && + (writeToDestination( + destination, + currentView.subarray(0, writtenBytes) + ), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + writeToDestination(destination, chunk)) + : ((target = currentView.length - writtenBytes), + target < chunk.byteLength && + (0 === target + ? writeToDestination(destination, currentView) + : (currentView.set(chunk.subarray(0, target), writtenBytes), + (writtenBytes += target), + writeToDestination(destination, currentView), + (chunk = chunk.subarray(target))), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)), + currentView.set(chunk, writtenBytes), + (writtenBytes += chunk.byteLength), + 4096 === writtenBytes && + (writeToDestination(destination, currentView), + (currentView = new Uint8Array(4096)), + (writtenBytes = 0)))); + return destinationHasCapacity; + } + function completeWriting(destination) { + currentView && + 0 < writtenBytes && + destination.write(currentView.subarray(0, writtenBytes)); + currentView = null; + writtenBytes = 0; + destinationHasCapacity = !0; + } + function byteLengthOfChunk(chunk) { + return "string" === typeof chunk + ? Buffer.byteLength(chunk, "utf8") + : chunk.byteLength; + } + function isClientReference(reference) { + return reference.$$typeof === CLIENT_REFERENCE_TAG$1; + } + function registerClientReferenceImpl(proxyImplementation, id, async) { + return Object.defineProperties(proxyImplementation, { + $$typeof: { value: CLIENT_REFERENCE_TAG$1 }, + $$id: { value: id }, + $$async: { value: async } + }); + } + function bind() { + var newFn = FunctionBind.apply(this, arguments); + if (this.$$typeof === SERVER_REFERENCE_TAG) { + null != arguments[0] && + console.error( + 'Cannot bind "this" of a Server Action. Pass null or undefined as the first argument to .bind().' + ); + var args = ArraySlice.call(arguments, 1), + $$typeof = { value: SERVER_REFERENCE_TAG }, + $$id = { value: this.$$id }; + args = { value: this.$$bound ? this.$$bound.concat(args) : args }; + return Object.defineProperties(newFn, { + $$typeof: $$typeof, + $$id: $$id, + $$bound: args, + $$location: { value: this.$$location, configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + } + return newFn; + } + function getReference(target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "__esModule": + var moduleId = target.$$id; + target.default = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call the default export of " + + moduleId + + " from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#", + target.$$async + ); + return !0; + case "then": + if (target.then) return target.then; + if (target.$$async) return; + var clientReference = registerClientReferenceImpl( + {}, + target.$$id, + !0 + ), + proxy = new Proxy(clientReference, proxyHandlers$1); + target.status = "fulfilled"; + target.value = proxy; + return (target.then = registerClientReferenceImpl( + function (resolve) { + return Promise.resolve(resolve(proxy)); + }, + target.$$id + "#then", + !1 + )); + } + if ("symbol" === typeof name) + throw Error( + "Cannot read Symbol exports. Only named exports are supported on a client module imported on the server." + ); + clientReference = target[name]; + clientReference || + ((clientReference = registerClientReferenceImpl( + function () { + throw Error( + "Attempted to call " + + String(name) + + "() from the server but " + + String(name) + + " is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + target.$$id + "#" + name, + target.$$async + )), + Object.defineProperty(clientReference, "name", { value: name }), + (clientReference = target[name] = + new Proxy(clientReference, deepProxyHandlers))); + return clientReference; + } + function resolveClientReferenceMetadata(config, clientReference) { + var modulePath = clientReference.$$id, + name = "", + resolvedModuleData = config[modulePath]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = modulePath.lastIndexOf("#"); + -1 !== idx && + ((name = modulePath.slice(idx + 1)), + (resolvedModuleData = config[modulePath.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + modulePath + + '" in the React Client Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + if (!0 === resolvedModuleData.async && !0 === clientReference.$$async) + throw Error( + 'The module "' + + modulePath + + '" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.' + ); + return !0 === resolvedModuleData.async || !0 === clientReference.$$async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function preload(href, as, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "L"; + if ("image" === as && options) { + var imageSrcSet = options.imageSrcSet, + imageSizes = options.imageSizes, + uniquePart = ""; + "string" === typeof imageSrcSet && "" !== imageSrcSet + ? ((uniquePart += "[" + imageSrcSet + "]"), + "string" === typeof imageSizes && + (uniquePart += "[" + imageSizes + "]")) + : (uniquePart += "[][]" + href); + key += "[image]" + uniquePart; + } else key += "[" + as + "]" + href; + hints.has(key) || + (hints.add(key), + (options = trimOptions(options)) + ? emitHint(request, "L", [href, as, options]) + : emitHint(request, "L", [href, as])); + } else previousDispatcher.L(href, as, options); + } + } + function preloadModule$1(href, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "m|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "m", [href, options]) + : emitHint(request, "m", href); + } + previousDispatcher.m(href, options); + } + } + function trimOptions(options) { + if (null == options) return null; + var hasProperties = !1, + trimmed = {}, + key; + for (key in options) + null != options[key] && + ((hasProperties = !0), (trimmed[key] = options[key])); + return hasProperties ? trimmed : null; + } + function getChildFormatContext(parentContext, type, props) { + switch (type) { + case "img": + type = props.src; + var srcSet = props.srcSet; + if ( + !( + "lazy" === props.loading || + (!type && !srcSet) || + ("string" !== typeof type && null != type) || + ("string" !== typeof srcSet && null != srcSet) || + "low" === props.fetchPriority || + parentContext & 3 + ) && + ("string" !== typeof type || + ":" !== type[4] || + ("d" !== type[0] && "D" !== type[0]) || + ("a" !== type[1] && "A" !== type[1]) || + ("t" !== type[2] && "T" !== type[2]) || + ("a" !== type[3] && "A" !== type[3])) && + ("string" !== typeof srcSet || + ":" !== srcSet[4] || + ("d" !== srcSet[0] && "D" !== srcSet[0]) || + ("a" !== srcSet[1] && "A" !== srcSet[1]) || + ("t" !== srcSet[2] && "T" !== srcSet[2]) || + ("a" !== srcSet[3] && "A" !== srcSet[3])) + ) { + var sizes = "string" === typeof props.sizes ? props.sizes : void 0; + var input = props.crossOrigin; + preload(type || "", "image", { + imageSrcSet: srcSet, + imageSizes: sizes, + crossOrigin: + "string" === typeof input + ? "use-credentials" === input + ? input + : "" + : void 0, + integrity: props.integrity, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy + }); + } + return parentContext; + case "link": + type = props.rel; + srcSet = props.href; + if ( + !( + parentContext & 1 || + null != props.itemProp || + "string" !== typeof type || + "string" !== typeof srcSet || + "" === srcSet + ) + ) + switch (type) { + case "preload": + preload(srcSet, props.as, { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + imageSrcSet: props.imageSrcSet, + imageSizes: props.imageSizes, + media: props.media + }); + break; + case "modulepreload": + preloadModule$1(srcSet, { + as: props.as, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce + }); + break; + case "stylesheet": + preload(srcSet, "style", { + crossOrigin: props.crossOrigin, + integrity: props.integrity, + nonce: props.nonce, + type: props.type, + fetchPriority: props.fetchPriority, + referrerPolicy: props.referrerPolicy, + media: props.media + }); + } + return parentContext; + case "picture": + return parentContext | 2; + case "noscript": + return parentContext | 1; + default: + return parentContext; + } + } + function resolveOwner() { + if (currentOwner) return currentOwner; + var owner = componentStorage.getStore(); + return owner ? owner : null; + } + function resolvePromiseOrAwaitNode(unresolvedNode, endTime) { + unresolvedNode.tag = 3 === unresolvedNode.tag ? 1 : 2; + unresolvedNode.end = endTime; + return unresolvedNode; + } + function getAsyncSequenceFromPromise(promise) { + try { + var asyncId = getAsyncId.call(promise); + } catch (x) {} + if (void 0 === asyncId) return null; + promise = pendingOperations.get(asyncId); + return void 0 === promise ? null : promise; + } + function collectStackTracePrivate(error, structuredStackTrace) { + error = []; + for (var i = framesToSkip; i < structuredStackTrace.length; i++) { + var callSite = structuredStackTrace[i], + name = callSite.getFunctionName() || ""; + if (name.includes("react_stack_bottom_frame")) break; + else if (callSite.isNative()) + (callSite = callSite.isAsync()), + error.push([name, "", 0, 0, 0, 0, callSite]); + else { + if (callSite.isConstructor()) name = "new " + name; + else if (!callSite.isToplevel()) { + var callSite$jscomp$0 = callSite; + name = callSite$jscomp$0.getTypeName(); + var methodName = callSite$jscomp$0.getMethodName(); + callSite$jscomp$0 = callSite$jscomp$0.getFunctionName(); + var result = ""; + callSite$jscomp$0 + ? (name && + identifierRegExp.test(callSite$jscomp$0) && + callSite$jscomp$0 !== name && + (result += name + "."), + (result += callSite$jscomp$0), + !methodName || + callSite$jscomp$0 === methodName || + callSite$jscomp$0.endsWith("." + methodName) || + callSite$jscomp$0.endsWith(" " + methodName) || + (result += " [as " + methodName + "]")) + : (name && (result += name + "."), + (result = methodName + ? result + methodName + : result + "")); + name = result; + } + "" === name && (name = ""); + methodName = callSite.getScriptNameOrSourceURL() || ""; + "" === methodName && + ((methodName = ""), + callSite.isEval() && + (callSite$jscomp$0 = callSite.getEvalOrigin()) && + (methodName = callSite$jscomp$0.toString() + ", ")); + callSite$jscomp$0 = callSite.getLineNumber() || 0; + result = callSite.getColumnNumber() || 0; + var enclosingLine = + "function" === typeof callSite.getEnclosingLineNumber + ? callSite.getEnclosingLineNumber() || 0 + : 0, + enclosingCol = + "function" === typeof callSite.getEnclosingColumnNumber + ? callSite.getEnclosingColumnNumber() || 0 + : 0; + callSite = callSite.isAsync(); + error.push([ + name, + methodName, + callSite$jscomp$0, + result, + enclosingLine, + enclosingCol, + callSite + ]); + } + } + collectedStackTrace = error; + return ""; + } + function collectStackTrace(error, structuredStackTrace) { + collectStackTracePrivate(error, structuredStackTrace); + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function parseStackTracePrivate(error, skipFrames) { + collectedStackTrace = null; + framesToSkip = skipFrames; + skipFrames = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTracePrivate; + try { + if ("" !== error.stack) return null; + } finally { + Error.prepareStackTrace = skipFrames; + } + return collectedStackTrace; + } + function parseStackTrace(error, skipFrames) { + var existing = stackTraceCache.get(error); + if (void 0 !== existing) return existing; + collectedStackTrace = null; + framesToSkip = skipFrames; + existing = Error.prepareStackTrace; + Error.prepareStackTrace = collectStackTrace; + try { + var stack = String(error.stack); + } finally { + Error.prepareStackTrace = existing; + } + if (null !== collectedStackTrace) + return ( + (stack = collectedStackTrace), + (collectedStackTrace = null), + stackTraceCache.set(error, stack), + stack + ); + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + existing = stack.indexOf("react_stack_bottom_frame"); + -1 !== existing && (existing = stack.lastIndexOf("\n", existing)); + -1 !== existing && (stack = stack.slice(0, existing)); + stack = stack.split("\n"); + for (existing = []; skipFrames < stack.length; skipFrames++) { + var parsed = frameRegExp.exec(stack[skipFrames]); + if (parsed) { + var name = parsed[1] || "", + isAsync = "async " === parsed[8]; + "" === name + ? (name = "") + : name.startsWith("async ") && + ((name = name.slice(5)), (isAsync = !0)); + var filename = parsed[2] || parsed[5] || ""; + "" === filename && (filename = ""); + existing.push([ + name, + filename, + +(parsed[3] || parsed[6]), + +(parsed[4] || parsed[7]), + 0, + 0, + isAsync + ]); + } + } + stackTraceCache.set(error, existing); + return existing; + } + function createTemporaryReference(temporaryReferences, id) { + var reference = Object.defineProperties( + function () { + throw Error( + "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component." + ); + }, + { $$typeof: { value: TEMPORARY_REFERENCE_TAG } } + ); + reference = new Proxy(reference, proxyHandlers); + temporaryReferences.set(reference, id); + return reference; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? (thenableState.push(thenable), + (thenableState._stacks || (thenableState._stacks = [])).push(Error())) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + "string" === typeof thenable.status + ? thenable.then(noop, noop) + : ((thenableState = thenable), + (thenableState.status = "pending"), + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + )); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + suspendedThenable = thenable; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; + } + function getThenableStateAfterSuspending() { + var state = thenableState || []; + state._componentDebugInfo = currentComponentDebugInfo; + thenableState = currentComponentDebugInfo = null; + return state; + } + function unsupportedHook() { + throw Error("This Hook is not supported in Server Components."); + } + function unsupportedRefresh() { + throw Error( + "Refreshing the cache is not supported in Server Components." + ); + } + function unsupportedContext() { + throw Error("Cannot read a Client Context from a Server Component."); + } + function prepareStackTrace(error, structuredStackTrace) { + error = (error.name || "Error") + ": " + (error.message || ""); + for (var i = 0; i < structuredStackTrace.length; i++) + error += "\n at " + structuredStackTrace[i].toString(); + return error; + } + function resetOwnerStackLimit() { + var now = getCurrentTime(); + 1e3 < now - lastResetTime && + ((ReactSharedInternalsServer.recentlyCreatedOwnerStacks = 0), + (lastResetTime = now)); + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isGetter(object, name) { + if (object === Object.prototype || null === object) return !1; + var descriptor = Object.getOwnPropertyDescriptor(object, name); + return void 0 === descriptor + ? isGetter(getPrototypeOf(object), name) + : "function" === typeof descriptor.get; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function defaultFilterStackFrame(filename) { + return ( + "" !== filename && + !filename.startsWith("node:") && + !filename.includes("node_modules") + ); + } + function devirtualizeURL(url) { + if (url.startsWith("about://React/")) { + var envIdx = url.indexOf("/", 14), + suffixIdx = url.lastIndexOf("?"); + if (-1 < envIdx && -1 < suffixIdx) + return decodeURI(url.slice(envIdx + 1, suffixIdx)); + } + return url; + } + function isPromiseCreationInternal(url, functionName) { + if ("node:internal/async_hooks" === url) return !0; + if ("" !== url) return !1; + switch (functionName) { + case "new Promise": + case "Function.withResolvers": + case "Function.reject": + case "Function.resolve": + case "Function.all": + case "Function.allSettled": + case "Function.race": + case "Function.try": + return !0; + default: + return !1; + } + } + function filterStackTrace(request, stack) { + request = request.filterStackFrame; + for (var filteredStack = [], i = 0; i < stack.length; i++) { + var callsite = stack[i], + functionName = callsite[0], + url = devirtualizeURL(callsite[1]); + request(url, functionName, callsite[2], callsite[3]) && + ((callsite = callsite.slice(0)), + (callsite[1] = url), + filteredStack.push(callsite)); + } + return filteredStack; + } + function hasUnfilteredFrame(request, stack) { + request = request.filterStackFrame; + for (var i = 0; i < stack.length; i++) { + var callsite = stack[i], + functionName = callsite[0], + url = devirtualizeURL(callsite[1]), + lineNumber = callsite[2], + columnNumber = callsite[3]; + if ( + !callsite[6] && + request(url, functionName, lineNumber, columnNumber) && + "" !== url + ) + return !0; + } + return !1; + } + function isPromiseAwaitInternal(url, functionName) { + if ("node:internal/async_hooks" === url) return !0; + if ("" !== url) return !1; + switch (functionName) { + case "Promise.then": + case "Promise.catch": + case "Promise.finally": + case "Function.reject": + case "Function.resolve": + case "Function.all": + case "Function.allSettled": + case "Function.race": + case "Function.try": + return !0; + default: + return !1; + } + } + function isAwaitInUserspace(request, stack) { + for ( + var firstFrame = 0; + stack.length > firstFrame && + isPromiseAwaitInternal(stack[firstFrame][1], stack[firstFrame][0]); + + ) + firstFrame++; + if (stack.length > firstFrame) { + request = request.filterStackFrame; + stack = stack[firstFrame]; + firstFrame = stack[0]; + var url = devirtualizeURL(stack[1]); + return request(url, firstFrame, stack[2], stack[3]) && "" !== url; + } + return !1; + } + function patchConsole(consoleInst, methodName) { + var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); + if ( + descriptor && + (descriptor.configurable || descriptor.writable) && + "function" === typeof descriptor.value + ) { + var originalMethod = descriptor.value; + descriptor = Object.getOwnPropertyDescriptor(originalMethod, "name"); + var wrapperMethod = function () { + var request = resolveRequest(); + if (("assert" !== methodName || !arguments[0]) && null !== request) { + var stack = filterStackTrace( + request, + parseStackTracePrivate(Error("react-stack-top-frame"), 1) || [] + ); + request.pendingDebugChunks++; + var owner = resolveOwner(), + args = Array.from(arguments); + a: { + var env = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + env = null; + break a; + case "assert": + env = 1; + } + var format = args[env], + style = args[env + 1], + badge = args[env + 2]; + "string" === typeof format && + format.startsWith("\u001b[0m\u001b[7m%c%s\u001b[0m%c") && + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px" === + style && + "string" === typeof badge + ? ((format = format.slice(18)), + " " === format[0] && (format = format.slice(1)), + args.splice(env, 4, format), + (env = badge.slice(1, badge.length - 1))) + : (env = null); + } + null === env && (env = (0, request.environmentName)()); + null != owner && outlineComponentInfo(request, owner); + badge = [methodName, stack, owner, env]; + badge.push.apply(badge, args); + args = serializeDebugModel( + request, + (null === request.deferredDebugObjects ? 500 : 10) + stack.length, + badge + ); + "[" !== args[0] && + (args = serializeDebugModel(request, 10 + stack.length, [ + methodName, + stack, + owner, + env, + "Unknown Value: React could not send it from the server." + ])); + request.completedDebugChunks.push(":W" + args + "\n"); + } + return originalMethod.apply(this, arguments); + }; + descriptor && Object.defineProperty(wrapperMethod, "name", descriptor); + Object.defineProperty(consoleInst, methodName, { + value: wrapperMethod + }); + } + } + function getCurrentStackInDEV() { + var owner = resolveOwner(); + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = prepareStackTrace; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function defaultErrorHandler(error) { + console.error(error); + } + function RequestInstance( + type, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + if ( + null !== ReactSharedInternalsServer.A && + ReactSharedInternalsServer.A !== DefaultAsyncDispatcher + ) + throw Error( + "Currently React only supports one RSC renderer at a time." + ); + ReactSharedInternalsServer.A = DefaultAsyncDispatcher; + ReactSharedInternalsServer.getCurrentStack = getCurrentStackInDEV; + var abortSet = new Set(), + pingedTasks = [], + hints = new Set(); + this.type = type; + this.status = 10; + this.flushScheduled = !1; + this.destination = this.fatalError = null; + this.bundlerConfig = bundlerConfig; + this.cache = new Map(); + this.cacheController = new AbortController(); + this.pendingChunks = this.nextChunkId = 0; + this.hints = hints; + this.abortableTasks = abortSet; + this.pingedTasks = pingedTasks; + this.completedImportChunks = []; + this.completedHintChunks = []; + this.completedRegularChunks = []; + this.completedErrorChunks = []; + this.writtenSymbols = new Map(); + this.writtenClientReferences = new Map(); + this.writtenServerReferences = new Map(); + this.writtenObjects = new WeakMap(); + this.temporaryReferences = temporaryReferences; + this.identifierPrefix = identifierPrefix || ""; + this.identifierCount = 1; + this.taintCleanupQueue = []; + this.onError = void 0 === onError ? defaultErrorHandler : onError; + this.onPostpone = + void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = onAllReady; + this.onFatalError = onFatalError; + this.pendingDebugChunks = 0; + this.completedDebugChunks = []; + this.debugDestination = null; + this.environmentName = + void 0 === environmentName + ? function () { + return "Server"; + } + : "function" !== typeof environmentName + ? function () { + return environmentName; + } + : environmentName; + this.filterStackFrame = + void 0 === filterStackFrame + ? defaultFilterStackFrame + : filterStackFrame; + this.didWarnForKey = null; + this.writtenDebugObjects = new WeakMap(); + this.deferredDebugObjects = keepDebugAlive + ? { retained: new Map(), existing: new Map() } + : null; + type = this.timeOrigin = performance.now(); + emitTimeOriginChunk(this, type + performance.timeOrigin); + this.abortTime = -0; + model = createTask( + this, + model, + null, + !1, + 0, + abortSet, + type, + null, + null, + null + ); + pingedTasks.push(model); + } + function createRequest( + model, + bundlerConfig, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 20, + model, + bundlerConfig, + onError, + onPostpone, + noop, + noop, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function createPrerenderRequest( + model, + bundlerConfig, + onAllReady, + onFatalError, + onError, + identifierPrefix, + onPostpone, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ) { + resetOwnerStackLimit(); + return new RequestInstance( + 21, + model, + bundlerConfig, + onError, + onPostpone, + onAllReady, + onFatalError, + identifierPrefix, + temporaryReferences, + environmentName, + filterStackFrame, + keepDebugAlive + ); + } + function resolveRequest() { + if (currentRequest) return currentRequest; + var store = requestStorage.getStore(); + return store ? store : null; + } + function serializeDebugThenable(request, counter, thenable) { + request.pendingDebugChunks++; + var id = request.nextChunkId++, + ref = "$@" + id.toString(16); + request.writtenDebugObjects.set(thenable, ref); + switch (thenable.status) { + case "fulfilled": + return ( + emitOutlinedDebugModelChunk(request, id, counter, thenable.value), + ref + ); + case "rejected": + return ( + emitErrorChunk(request, id, "", thenable.reason, !0, null), ref + ); + } + if (request.status === ABORTING) + return emitDebugHaltChunk(request, id), ref; + var deferredDebugObjects = request.deferredDebugObjects; + if (null !== deferredDebugObjects) + return ( + deferredDebugObjects.retained.set(id, thenable), + (ref = "$Y@" + id.toString(16)), + request.writtenDebugObjects.set(thenable, ref), + ref + ); + var cancelled = !1; + thenable.then( + function (value) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : (isArrayImpl(value) && 200 < value.length) || + ((value instanceof ArrayBuffer || + value instanceof Int8Array || + value instanceof Uint8Array || + value instanceof Uint8ClampedArray || + value instanceof Int16Array || + value instanceof Uint16Array || + value instanceof Int32Array || + value instanceof Uint32Array || + value instanceof Float32Array || + value instanceof Float64Array || + value instanceof BigInt64Array || + value instanceof BigUint64Array || + value instanceof DataView) && + 1e3 < value.byteLength) + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value), + enqueueFlush(request)); + }, + function (reason) { + cancelled || + ((cancelled = !0), + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null), + enqueueFlush(request)); + } + ); + Promise.resolve().then(function () { + cancelled || + ((cancelled = !0), + emitDebugHaltChunk(request, id), + enqueueFlush(request), + (counter = request = null)); + }); + return ref; + } + function emitRequestedDebugThenable(request, id, counter, thenable) { + thenable.then( + function (value) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitOutlinedDebugModelChunk(request, id, counter, value); + enqueueFlush(request); + }, + function (reason) { + request.status === ABORTING + ? emitDebugHaltChunk(request, id) + : emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + } + ); + } + function serializeThenable(request, task, thenable) { + var newTask = createTask( + request, + thenable, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + switch (thenable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + (newTask.model = thenable.value), + pingTask(request, newTask), + newTask.id + ); + case "rejected": + return ( + forwardDebugInfoFromThenable( + request, + newTask, + thenable, + null, + null + ), + erroredTask(request, newTask, thenable.reason), + newTask.id + ); + default: + if (request.status === ABORTING) + return ( + request.abortableTasks.delete(newTask), + 21 === request.type + ? (haltTask(newTask), finishHaltedTask(newTask, request)) + : ((task = request.fatalError), + abortTask(newTask), + finishAbortedTask(newTask, request, task)), + newTask.id + ); + "string" !== typeof thenable.status && + ((thenable.status = "pending"), + thenable.then( + function (fulfilledValue) { + "pending" === thenable.status && + ((thenable.status = "fulfilled"), + (thenable.value = fulfilledValue)); + }, + function (error) { + "pending" === thenable.status && + ((thenable.status = "rejected"), (thenable.reason = error)); + } + )); + } + thenable.then( + function (value) { + forwardDebugInfoFromCurrentContext(request, newTask, thenable); + newTask.model = value; + pingTask(request, newTask); + }, + function (reason) { + 0 === newTask.status && + ((newTask.timed = !0), + erroredTask(request, newTask, reason), + enqueueFlush(request)); + } + ); + return newTask.id; + } + function serializeReadableStream(request, task, stream) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) + (streamTask.status = 1), + (entry = streamTask.id.toString(16) + ":C\n"), + request.completedRegularChunks.push(entry), + request.abortableTasks.delete(streamTask), + request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + enqueueFlush(request), + callOnAllReadyIfReady(request); + else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + reader.read().then(progress, error); + } catch (x$0) { + error(x$0); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortStream + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortStream() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortStream); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var supportsBYOB = stream.supportsBYOB; + if (void 0 === supportsBYOB) + try { + stream.getReader({ mode: "byob" }).releaseLock(), (supportsBYOB = !0); + } catch (x) { + supportsBYOB = !1; + } + var reader = stream.getReader(), + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + request.pendingChunks++; + task = + streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n"; + request.completedRegularChunks.push(task); + request.cacheController.signal.addEventListener("abort", abortStream); + reader.read().then(progress, error); + return serializeByValueID(streamTask.id); + } + function serializeAsyncIterable(request, task, iterable, iterator) { + function progress(entry) { + if (0 === streamTask.status) + if (entry.done) { + streamTask.status = 1; + if (void 0 === entry.value) + var endStreamRow = streamTask.id.toString(16) + ":C\n"; + else + try { + var chunkId = outlineModel(request, entry.value); + endStreamRow = + streamTask.id.toString(16) + + ":C" + + stringify(serializeByValueID(chunkId)) + + "\n"; + } catch (x) { + error(x); + return; + } + request.completedRegularChunks.push(endStreamRow); + request.abortableTasks.delete(streamTask); + request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ); + enqueueFlush(request); + callOnAllReadyIfReady(request); + } else + try { + (streamTask.model = entry.value), + request.pendingChunks++, + tryStreamTask(request, streamTask), + enqueueFlush(request), + callIteratorInDEV(iterator, progress, error); + } catch (x$1) { + error(x$1); + } + } + function error(reason) { + 0 === streamTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortIterable + ), + erroredTask(request, streamTask, reason), + enqueueFlush(request), + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error)); + } + function abortIterable() { + if (0 === streamTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortIterable); + var reason = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(streamTask), + haltTask(streamTask), + finishHaltedTask(streamTask, request)) + : (erroredTask(request, streamTask, signal.reason), + enqueueFlush(request)); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + } + var isIterator = iterable === iterator, + streamTask = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + (task = iterable._debugInfo) && + forwardDebugInfo(request, streamTask, task); + request.pendingChunks++; + isIterator = + streamTask.id.toString(16) + ":" + (isIterator ? "x" : "X") + "\n"; + request.completedRegularChunks.push(isIterator); + request.cacheController.signal.addEventListener("abort", abortIterable); + callIteratorInDEV(iterator, progress, error); + return serializeByValueID(streamTask.id); + } + function emitHint(request, code, model) { + model = stringify(model); + request.completedHintChunks.push(":H" + code + model + "\n"); + enqueueFlush(request); + } + function readThenable(thenable) { + if ("fulfilled" === thenable.status) return thenable.value; + if ("rejected" === thenable.status) throw thenable.reason; + throw thenable; + } + function createLazyWrapperAroundWakeable(request, task, wakeable) { + switch (wakeable.status) { + case "fulfilled": + return ( + forwardDebugInfoFromThenable(request, task, wakeable, null, null), + wakeable.value + ); + case "rejected": + forwardDebugInfoFromThenable(request, task, wakeable, null, null); + break; + default: + "string" !== typeof wakeable.status && + ((wakeable.status = "pending"), + wakeable.then( + function (fulfilledValue) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "fulfilled"), + (wakeable.value = fulfilledValue)); + }, + function (error) { + forwardDebugInfoFromCurrentContext(request, task, wakeable); + "pending" === wakeable.status && + ((wakeable.status = "rejected"), (wakeable.reason = error)); + } + )); + } + return { + $$typeof: REACT_LAZY_TYPE, + _payload: wakeable, + _init: readThenable + }; + } + function callWithDebugContextInDEV(request, task, callback, arg) { + var componentDebugInfo = { + name: "", + env: task.environmentName, + key: null, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.debugStack = task.debugStack; + request = componentDebugInfo.debugTask = task.debugTask; + currentOwner = componentDebugInfo; + try { + return request ? request.run(callback.bind(null, arg)) : callback(arg); + } finally { + currentOwner = null; + } + } + function processServerComponentReturnValue( + request, + task, + Component, + result + ) { + if ( + "object" !== typeof result || + null === result || + isClientReference(result) + ) + return result; + if ("function" === typeof result.then) + return ( + result.then(function (resolvedValue) { + "object" === typeof resolvedValue && + null !== resolvedValue && + resolvedValue.$$typeof === REACT_ELEMENT_TYPE && + (resolvedValue._store.validated = 1); + }, voidHandler), + createLazyWrapperAroundWakeable(request, task, result) + ); + result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1); + var iteratorFn = getIteratorFn(result); + if (iteratorFn) { + var multiShot = _defineProperty({}, Symbol.iterator, function () { + var iterator = iteratorFn.call(result); + iterator !== result || + ("[object GeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object Generator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + }); + multiShot._debugInfo = result._debugInfo; + return multiShot; + } + return "function" !== typeof result[ASYNC_ITERATOR] || + ("function" === typeof ReadableStream && + result instanceof ReadableStream) + ? result + : ((multiShot = _defineProperty({}, ASYNC_ITERATOR, function () { + var iterator = result[ASYNC_ITERATOR](); + iterator !== result || + ("[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(Component) && + "[object AsyncGenerator]" === + Object.prototype.toString.call(result)) || + callWithDebugContextInDEV(request, task, function () { + console.error( + "Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. " + ); + }); + return iterator; + })), + (multiShot._debugInfo = result._debugInfo), + multiShot); + } + function renderFunctionComponent( + request, + task, + key, + Component, + props, + validated + ) { + var prevThenableState = task.thenableState; + task.thenableState = null; + if (canEmitDebugInfo) + if (null !== prevThenableState) + var componentDebugInfo = prevThenableState._componentDebugInfo; + else { + var componentDebugID = task.id; + componentDebugInfo = Component.displayName || Component.name || ""; + var componentEnv = (0, request.environmentName)(); + request.pendingChunks++; + componentDebugInfo = { + name: componentDebugInfo, + env: componentEnv, + key: key, + owner: task.debugOwner + }; + componentDebugInfo.stack = + null === task.debugStack + ? null + : filterStackTrace(request, parseStackTrace(task.debugStack, 1)); + componentDebugInfo.props = props; + componentDebugInfo.debugStack = task.debugStack; + componentDebugInfo.debugTask = task.debugTask; + outlineComponentInfo(request, componentDebugInfo); + advanceTaskTime(request, task, performance.now()); + emitDebugChunk(request, componentDebugID, componentDebugInfo); + task.environmentName = componentEnv; + 2 === validated && + warnForMissingKey(request, key, componentDebugInfo, task.debugTask); + } + else return outlineTask(request, task); + thenableIndexCounter = 0; + thenableState = prevThenableState; + currentComponentDebugInfo = componentDebugInfo; + props = task.debugTask + ? task.debugTask.run( + componentStorage.run.bind( + componentStorage, + componentDebugInfo, + callComponentInDEV, + Component, + props, + componentDebugInfo + ) + ) + : componentStorage.run( + componentDebugInfo, + callComponentInDEV, + Component, + props, + componentDebugInfo + ); + if (request.status === ABORTING) + throw ( + ("object" !== typeof props || + null === props || + "function" !== typeof props.then || + isClientReference(props) || + props.then(voidHandler, voidHandler), + null) + ); + validated = thenableState; + if (null !== validated) + for ( + prevThenableState = validated._stacks || (validated._stacks = []), + componentDebugID = 0; + componentDebugID < validated.length; + componentDebugID++ + ) + forwardDebugInfoFromThenable( + request, + task, + validated[componentDebugID], + componentDebugInfo, + prevThenableState[componentDebugID] + ); + props = processServerComponentReturnValue( + request, + task, + Component, + props + ); + task.debugOwner = componentDebugInfo; + task.debugStack = null; + task.debugTask = null; + Component = task.keyPath; + componentDebugInfo = task.implicitSlot; + null !== key + ? (task.keyPath = null === Component ? key : Component + "," + key) + : null === Component && (task.implicitSlot = !0); + request = renderModelDestructive(request, task, emptyRoot, "", props); + task.keyPath = Component; + task.implicitSlot = componentDebugInfo; + return request; + } + function warnForMissingKey(request, key, componentDebugInfo, debugTask) { + function logKeyError() { + console.error( + 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', + "", + "" + ); + } + key = request.didWarnForKey; + null == key && (key = request.didWarnForKey = new WeakSet()); + request = componentDebugInfo.owner; + if (null != request) { + if (key.has(request)) return; + key.add(request); + } + debugTask + ? debugTask.run( + componentStorage.run.bind( + componentStorage, + componentDebugInfo, + callComponentInDEV, + logKeyError, + null, + componentDebugInfo + ) + ) + : componentStorage.run( + componentDebugInfo, + callComponentInDEV, + logKeyError, + null, + componentDebugInfo + ); + } + function renderFragment(request, task, children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + null === child || + "object" !== typeof child || + child.$$typeof !== REACT_ELEMENT_TYPE || + null !== child.key || + child._store.validated || + (child._store.validated = 2); + } + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + if ((i = children._debugInfo)) { + if (canEmitDebugInfo) forwardDebugInfo(request, task, i); + else return outlineTask(request, task); + children = Array.from(children); + } + return children; + } + function renderAsyncFragment(request, task, children, getAsyncIterator) { + if (null !== task.keyPath) + return ( + (request = [ + REACT_ELEMENT_TYPE, + REACT_FRAGMENT_TYPE, + task.keyPath, + { children: children }, + null, + null, + 0 + ]), + task.implicitSlot ? [request] : request + ); + getAsyncIterator = getAsyncIterator.call(children); + return serializeAsyncIterable(request, task, children, getAsyncIterator); + } + function deferTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + pingTask(request, task); + return serializeLazyID(task.id); + } + function outlineTask(request, task) { + task = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + ); + retryTask(request, task); + return 1 === task.status + ? serializeByValueID(task.id) + : serializeLazyID(task.id); + } + function renderElement(request, task, type, key, ref, props, validated) { + if (null !== ref && void 0 !== ref) + throw Error( + "Refs cannot be used in Server Components, nor passed to Client Components." + ); + jsxPropsParents.set(props, type); + "object" === typeof props.children && + null !== props.children && + jsxChildrenParents.set(props.children, type); + if ( + "function" !== typeof type || + isClientReference(type) || + type.$$typeof === TEMPORARY_REFERENCE_TAG + ) { + if (type === REACT_FRAGMENT_TYPE && null === key) + return ( + 2 === validated && + ((validated = { + name: "Fragment", + env: (0, request.environmentName)(), + key: key, + owner: task.debugOwner, + stack: + null === task.debugStack + ? null + : filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ), + props: props, + debugStack: task.debugStack, + debugTask: task.debugTask + }), + warnForMissingKey(request, key, validated, task.debugTask)), + (validated = task.implicitSlot), + null === task.keyPath && (task.implicitSlot = !0), + (request = renderModelDestructive( + request, + task, + emptyRoot, + "", + props.children + )), + (task.implicitSlot = validated), + request + ); + if ( + null != type && + "object" === typeof type && + !isClientReference(type) + ) + switch (type.$$typeof) { + case REACT_LAZY_TYPE: + type = callLazyInitInDEV(type); + if (request.status === ABORTING) throw null; + return renderElement( + request, + task, + type, + key, + ref, + props, + validated + ); + case REACT_FORWARD_REF_TYPE: + return renderFunctionComponent( + request, + task, + key, + type.render, + props, + validated + ); + case REACT_MEMO_TYPE: + return renderElement( + request, + task, + type.type, + key, + ref, + props, + validated + ); + case REACT_ELEMENT_TYPE: + type._store.validated = 1; + } + else if ("string" === typeof type) { + ref = task.formatContext; + var newFormatContext = getChildFormatContext(ref, type, props); + ref !== newFormatContext && + null != props.children && + outlineModelWithFormatContext( + request, + props.children, + newFormatContext + ); + } + } else + return renderFunctionComponent( + request, + task, + key, + type, + props, + validated + ); + ref = task.keyPath; + null === key ? (key = ref) : null !== ref && (key = ref + "," + key); + newFormatContext = null; + ref = task.debugOwner; + null !== ref && outlineComponentInfo(request, ref); + if (null !== task.debugStack) { + newFormatContext = filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ); + var id = outlineDebugModel( + request, + { objectLimit: 2 * newFormatContext.length + 1 }, + newFormatContext + ); + request.writtenObjects.set(newFormatContext, serializeByValueID(id)); + } + request = [ + REACT_ELEMENT_TYPE, + type, + key, + props, + ref, + newFormatContext, + validated + ]; + task = task.implicitSlot && null !== key ? [request] : request; + return task; + } + function visitAsyncNode(request, task, node, visited, cutOff) { + if (visited.has(node)) return null; + visited.add(node); + if (0 <= node.end && node.end <= request.timeOrigin) return null; + var previousIONode = null; + if ( + null !== node.previous && + ((previousIONode = visitAsyncNode( + request, + task, + node.previous, + visited, + cutOff + )), + void 0 === previousIONode) + ) + return; + switch (node.tag) { + case 0: + return node; + case 3: + return previousIONode; + case 1: + var awaited = node.awaited, + promise = node.promise.deref(); + if (null !== awaited) { + cutOff = visitAsyncNode(request, task, awaited, visited, cutOff); + if (void 0 === cutOff) break; + null !== cutOff + ? (previousIONode = + 1 === cutOff.tag + ? cutOff + : (null !== node.stack && + hasUnfilteredFrame(request, node.stack)) || + (void 0 !== promise && + "string" === typeof promise.displayName && + (null === cutOff.stack || + !hasUnfilteredFrame(request, cutOff.stack))) + ? node + : cutOff) + : request.status === ABORTING && + node.start < request.abortTime && + node.end > request.abortTime && + ((null !== node.stack && + hasUnfilteredFrame(request, node.stack)) || + (void 0 !== promise && + "string" === typeof promise.displayName)) && + (previousIONode = node); + } + void 0 !== promise && + ((node = promise._debugInfo), + null == node || + visited.has(node) || + (visited.add(node), forwardDebugInfo(request, task, node))); + return previousIONode; + case 4: + return previousIONode; + case 2: + awaited = node.awaited; + if (null !== awaited) { + promise = visitAsyncNode(request, task, awaited, visited, cutOff); + if (void 0 === promise) break; + if (null !== promise) { + var startTime = node.start, + endTime = node.end; + startTime < cutOff + ? ((previousIONode = promise), + null !== node.stack && + isAwaitInUserspace(request, node.stack) && + void 0 !== + (null === awaited.promise + ? void 0 + : awaited.promise.deref()) && + serializeIONode(request, promise, awaited.promise)) + : null !== node.stack && isAwaitInUserspace(request, node.stack) + ? (request.status === ABORTING && + startTime > request.abortTime) || + (serializeIONode(request, promise, awaited.promise), + null != node.owner && + outlineComponentInfo(request, node.owner), + (cutOff = (0, request.environmentName)()), + advanceTaskTime(request, task, startTime), + request.pendingChunks++, + emitDebugChunk(request, task.id, { + awaited: promise, + env: cutOff, + owner: node.owner, + stack: + null === node.stack + ? null + : filterStackTrace(request, node.stack) + }), + markOperationEndTime(request, task, endTime), + request.status === ABORTING && (previousIONode = void 0)) + : (previousIONode = promise); + } + } + node = node.promise.deref(); + void 0 !== node && + ((node = node._debugInfo), + null == node || + visited.has(node) || + (visited.add(node), forwardDebugInfo(request, task, node))); + return previousIONode; + default: + throw Error("Unknown AsyncSequence tag. This is a bug in React."); + } + } + function emitAsyncSequence( + request, + task, + node, + alreadyForwardedDebugInfo, + owner, + stack + ) { + var visited = new Set(); + alreadyForwardedDebugInfo && visited.add(alreadyForwardedDebugInfo); + node = visitAsyncNode(request, task, node, visited, task.time); + void 0 !== node && + null !== node && + (serializeIONode(request, node, node.promise), + request.pendingChunks++, + (alreadyForwardedDebugInfo = (0, request.environmentName)()), + (alreadyForwardedDebugInfo = { + awaited: node, + env: alreadyForwardedDebugInfo + }), + null === owner && null === stack + ? (null !== task.debugOwner && + (alreadyForwardedDebugInfo.owner = task.debugOwner), + null !== task.debugStack && + (alreadyForwardedDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(task.debugStack, 1) + ))) + : (null != owner && (alreadyForwardedDebugInfo.owner = owner), + null != stack && + (alreadyForwardedDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(stack, 1) + ))), + advanceTaskTime(request, task, task.time), + emitDebugChunk(request, task.id, alreadyForwardedDebugInfo), + markOperationEndTime(request, task, node.end)); + } + function pingTask(request, task) { + task.timed = !0; + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + 1 === pingedTasks.length && + ((request.flushScheduled = null !== request.destination), + 21 === request.type || 10 === request.status + ? scheduleMicrotask(function () { + return performWork(request); + }) + : setImmediate(function () { + return performWork(request); + })); + } + function createTask( + request, + model, + keyPath, + implicitSlot, + formatContext, + abortSet, + lastTimestamp, + debugOwner, + debugStack, + debugTask + ) { + request.pendingChunks++; + var id = request.nextChunkId++; + "object" !== typeof model || + null === model || + null !== keyPath || + implicitSlot || + request.writtenObjects.set(model, serializeByValueID(id)); + var task = { + id: id, + status: 0, + model: model, + keyPath: keyPath, + implicitSlot: implicitSlot, + formatContext: formatContext, + ping: function () { + return pingTask(request, task); + }, + toJSON: function (parentPropertyName, value) { + var parent = this, + originalValue = parent[parentPropertyName]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + callWithDebugContextInDEV(request, task, function () { + "Object" !== objectName(originalValue) + ? "string" === typeof jsxChildrenParents.get(parent) + ? console.error( + "%s objects cannot be rendered as text children. Try formatting it using toString().%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(parent, parentPropertyName) + ) + : console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + return renderModel(request, task, parent, parentPropertyName, value); + }, + thenableState: null, + timed: !1 + }; + task.time = lastTimestamp; + task.environmentName = request.environmentName(); + task.debugOwner = debugOwner; + task.debugStack = debugStack; + task.debugTask = debugTask; + abortSet.add(task); + return task; + } + function serializeByValueID(id) { + return "$" + id.toString(16); + } + function serializeLazyID(id) { + return "$L" + id.toString(16); + } + function serializeDeferredObject(request, value) { + var deferredDebugObjects = request.deferredDebugObjects; + return null !== deferredDebugObjects + ? (request.pendingDebugChunks++, + (request = request.nextChunkId++), + deferredDebugObjects.existing.set(value, request), + deferredDebugObjects.retained.set(request, value), + "$Y" + request.toString(16)) + : "$Y"; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function encodeReferenceChunk(request, id, reference) { + request = stringify(reference); + return id.toString(16) + ":" + request + "\n"; + } + function serializeClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var clientReferenceKey = clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id, + writtenClientReferences = request.writtenClientReferences, + existingId = writtenClientReferences.get(clientReferenceKey); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !1); + writtenClientReferences.set(clientReferenceKey, importId); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !1, null), + serializeByValueID(parent) + ); + } + } + function serializeDebugClientReference( + request, + parent, + parentPropertyName, + clientReference + ) { + var existingId = request.writtenClientReferences.get( + clientReference.$$async + ? clientReference.$$id + "#async" + : clientReference.$$id + ); + if (void 0 !== existingId) + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(existingId) + : serializeByValueID(existingId); + try { + var clientReferenceMetadata = resolveClientReferenceMetadata( + request.bundlerConfig, + clientReference + ); + request.pendingDebugChunks++; + var importId = request.nextChunkId++; + emitImportChunk(request, importId, clientReferenceMetadata, !0); + return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName + ? serializeLazyID(importId) + : serializeByValueID(importId); + } catch (x) { + return ( + request.pendingDebugChunks++, + (parent = request.nextChunkId++), + (parentPropertyName = logRecoverableError(request, x, null)), + emitErrorChunk(request, parent, parentPropertyName, x, !0, null), + serializeByValueID(parent) + ); + } + } + function outlineModel(request, value) { + return outlineModelWithFormatContext(request, value, 0); + } + function outlineModelWithFormatContext(request, value, formatContext) { + value = createTask( + request, + value, + null, + !1, + formatContext, + request.abortableTasks, + performance.now(), + null, + null, + null + ); + retryTask(request, value); + return value.id; + } + function serializeServerReference(request, serverReference) { + var writtenServerReferences = request.writtenServerReferences, + existingId = writtenServerReferences.get(serverReference); + if (void 0 !== existingId) return "$F" + existingId.toString(16); + existingId = serverReference.$$bound; + existingId = null === existingId ? null : Promise.resolve(existingId); + var id = serverReference.$$id, + location = null, + error = serverReference.$$location; + error && + ((error = parseStackTrace(error, 1)), + 0 < error.length && + ((location = error[0]), + (location = [location[0], location[1], location[2], location[3]]))); + existingId = + null !== location + ? { + id: id, + bound: existingId, + name: + "function" === typeof serverReference + ? serverReference.name + : "", + env: (0, request.environmentName)(), + location: location + } + : { id: id, bound: existingId }; + request = outlineModel(request, existingId); + writtenServerReferences.set(serverReference, request); + return "$F" + request.toString(16); + } + function serializeLargeTextString(request, text) { + request.pendingChunks++; + var textId = request.nextChunkId++; + emitTextChunk(request, textId, text, !1); + return serializeByValueID(textId); + } + function serializeMap(request, map) { + map = Array.from(map); + return "$Q" + outlineModel(request, map).toString(16); + } + function serializeFormData(request, formData) { + formData = Array.from(formData.entries()); + return "$K" + outlineModel(request, formData).toString(16); + } + function serializeSet(request, set) { + set = Array.from(set); + return "$W" + outlineModel(request, set).toString(16); + } + function serializeTypedArray(request, tag, typedArray) { + request.pendingChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !1); + return serializeByValueID(bufferId); + } + function serializeDebugTypedArray(request, tag, typedArray) { + if (1e3 < typedArray.byteLength && !doNotLimit.has(typedArray)) + return serializeDeferredObject(request, typedArray); + request.pendingDebugChunks++; + var bufferId = request.nextChunkId++; + emitTypedArrayChunk(request, bufferId, tag, typedArray, !0); + return serializeByValueID(bufferId); + } + function serializeDebugBlob(request, blob) { + function progress(entry) { + if (entry.done) + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: model.length + 2 }, + model + ), + enqueueFlush(request); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + emitErrorChunk(request, id, "", reason, !0, null); + enqueueFlush(request); + reader.cancel(reason).then(noop, noop); + } + var model = [blob.type], + reader = blob.stream().getReader(); + request.pendingDebugChunks++; + var id = request.nextChunkId++; + reader.read().then(progress).catch(error); + return "$B" + id.toString(16); + } + function serializeBlob(request, blob) { + function progress(entry) { + if (0 === newTask.status) + if (entry.done) + request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + pingTask(request, newTask); + else + return ( + model.push(entry.value), reader.read().then(progress).catch(error) + ); + } + function error(reason) { + 0 === newTask.status && + (request.cacheController.signal.removeEventListener( + "abort", + abortBlob + ), + erroredTask(request, newTask, reason), + enqueueFlush(request), + reader.cancel(reason).then(error, error)); + } + function abortBlob() { + if (0 === newTask.status) { + var signal = request.cacheController.signal; + signal.removeEventListener("abort", abortBlob); + signal = signal.reason; + 21 === request.type + ? (request.abortableTasks.delete(newTask), + haltTask(newTask), + finishHaltedTask(newTask, request)) + : (erroredTask(request, newTask, signal), enqueueFlush(request)); + reader.cancel(signal).then(error, error); + } + } + var model = [blob.type], + newTask = createTask( + request, + model, + null, + !1, + 0, + request.abortableTasks, + performance.now(), + null, + null, + null + ), + reader = blob.stream().getReader(); + request.cacheController.signal.addEventListener("abort", abortBlob); + reader.read().then(progress).catch(error); + return "$B" + newTask.id.toString(16); + } + function renderModel(request, task, parent, key, value) { + serializedSize += key.length; + var prevKeyPath = task.keyPath, + prevImplicitSlot = task.implicitSlot; + try { + return renderModelDestructive(request, task, parent, key, value); + } catch (thrownValue) { + parent = task.model; + parent = + "object" === typeof parent && + null !== parent && + (parent.$$typeof === REACT_ELEMENT_TYPE || + parent.$$typeof === REACT_LAZY_TYPE); + if (request.status === ABORTING) { + task.status = 3; + if (21 === request.type) + return ( + (task = request.nextChunkId++), + (task = parent + ? serializeLazyID(task) + : serializeByValueID(task)), + task + ); + task = request.fatalError; + return parent ? serializeLazyID(task) : serializeByValueID(task); + } + key = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof key && + null !== key && + "function" === typeof key.then + ) + return ( + (request = createTask( + request, + task.model, + task.keyPath, + task.implicitSlot, + task.formatContext, + request.abortableTasks, + task.time, + task.debugOwner, + task.debugStack, + task.debugTask + )), + (value = request.ping), + key.then(value, value), + (request.thenableState = getThenableStateAfterSuspending()), + (task.keyPath = prevKeyPath), + (task.implicitSlot = prevImplicitSlot), + parent + ? serializeLazyID(request.id) + : serializeByValueID(request.id) + ); + task.keyPath = prevKeyPath; + task.implicitSlot = prevImplicitSlot; + request.pendingChunks++; + prevKeyPath = request.nextChunkId++; + prevImplicitSlot = logRecoverableError(request, key, task); + emitErrorChunk( + request, + prevKeyPath, + prevImplicitSlot, + key, + !1, + task.debugOwner + ); + return parent + ? serializeLazyID(prevKeyPath) + : serializeByValueID(prevKeyPath); + } + } + function renderModelDestructive( + request, + task, + parent, + parentPropertyName, + value + ) { + task.model = value; + if (value === REACT_ELEMENT_TYPE) return "$"; + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + var elementReference = null, + _writtenObjects = request.writtenObjects; + if (null === task.keyPath && !task.implicitSlot) { + var _existingReference = _writtenObjects.get(value); + if (void 0 !== _existingReference) + if (modelRoot === value) modelRoot = null; + else return _existingReference; + else + -1 === parentPropertyName.indexOf(":") && + ((_existingReference = _writtenObjects.get(parent)), + void 0 !== _existingReference && + ((elementReference = + _existingReference + ":" + parentPropertyName), + _writtenObjects.set(value, elementReference))); + } + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + if ((_existingReference = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _existingReference); + else return outlineTask(request, task); + _existingReference = value.props; + var refProp = _existingReference.ref; + refProp = void 0 !== refProp ? refProp : null; + task.debugOwner = value._owner; + task.debugStack = value._debugStack; + task.debugTask = value._debugTask; + if ( + void 0 === value._owner || + void 0 === value._debugStack || + void 0 === value._debugTask + ) { + var key = ""; + null !== value.key && (key = ' key="' + value.key + '"'); + console.error( + "Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\n- The element is created with a production version of React but rendered in development.\n- The element was cloned with a custom function instead of `React.cloneElement`.\nThe props of this element may help locate this element: %o", + value.type, + key, + value.props + ); + } + request = renderElement( + request, + task, + value.type, + value.key, + refProp, + _existingReference, + value._store.validated + ); + "object" === typeof request && + null !== request && + null !== elementReference && + (_writtenObjects.has(request) || + _writtenObjects.set(request, elementReference)); + return request; + case REACT_LAZY_TYPE: + if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task); + task.thenableState = null; + elementReference = callLazyInitInDEV(value); + if (request.status === ABORTING) throw null; + if ((_writtenObjects = value._debugInfo)) + if (canEmitDebugInfo) + forwardDebugInfo(request, task, _writtenObjects); + else return outlineTask(request, task); + return renderModelDestructive( + request, + task, + emptyRoot, + "", + elementReference + ); + case REACT_LEGACY_ELEMENT_TYPE: + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); + } + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((elementReference = request.temporaryReferences.get(value)), + void 0 !== elementReference) + ) + return "$T" + elementReference; + elementReference = request.writtenObjects; + _writtenObjects = elementReference.get(value); + if ("function" === typeof value.then) { + if (void 0 !== _writtenObjects) { + if (null !== task.keyPath || task.implicitSlot) + return ( + "$@" + serializeThenable(request, task, value).toString(16) + ); + if (modelRoot === value) modelRoot = null; + else return _writtenObjects; + } + request = "$@" + serializeThenable(request, task, value).toString(16); + elementReference.set(value, request); + return request; + } + if (void 0 !== _writtenObjects) + if (modelRoot === value) { + if (_writtenObjects !== serializeByValueID(task.id)) + return _writtenObjects; + modelRoot = null; + } else return _writtenObjects; + else if ( + -1 === parentPropertyName.indexOf(":") && + ((_writtenObjects = elementReference.get(parent)), + void 0 !== _writtenObjects) + ) { + _existingReference = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + _existingReference = "type"; + break; + case "2": + _existingReference = "key"; + break; + case "3": + _existingReference = "props"; + break; + case "4": + _existingReference = "_owner"; + } + elementReference.set( + value, + _writtenObjects + ":" + _existingReference + ); + } + if (isArrayImpl(value)) return renderFragment(request, task, value); + if (value instanceof Map) return serializeMap(request, value); + if (value instanceof Set) return serializeSet(request, value); + if ("function" === typeof FormData && value instanceof FormData) + return serializeFormData(request, value); + if (value instanceof Error) return serializeErrorValue(request, value); + if (value instanceof ArrayBuffer) + return serializeTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeBlob(request, value); + if ((elementReference = getIteratorFn(value))) + return ( + (elementReference = elementReference.call(value)), + elementReference === value + ? "$i" + + outlineModel(request, Array.from(elementReference)).toString(16) + : renderFragment(request, task, Array.from(elementReference)) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(request, task, value); + elementReference = value[ASYNC_ITERATOR]; + if ("function" === typeof elementReference) + return renderAsyncFragment(request, task, value, elementReference); + if (value instanceof Date) return "$D" + value.toJSON(); + elementReference = getPrototypeOf(value); + if ( + elementReference !== ObjectPrototype && + (null === elementReference || + null !== getPrototypeOf(elementReference)) + ) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + if ("Object" !== objectName(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (!isSimpleObject(value)) + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + else if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(value); + 0 < symbols.length && + callWithDebugContextInDEV(request, task, function () { + console.error( + "Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like %s are not supported.%s", + symbols[0].description, + describeObjectForErrorMessage(parent, parentPropertyName) + ); + }); + } + return value; + } + if ("string" === typeof value) + return ( + (serializedSize += value.length), + "Z" === value[value.length - 1] && + parent[parentPropertyName] instanceof Date + ? "$D" + value + : 1024 <= value.length && null !== byteLengthOfChunk + ? serializeLargeTextString(request, value) + : "$" === value[0] + ? "$" + value + : value + ); + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === SERVER_REFERENCE_TAG) + return serializeServerReference(request, value); + if ( + void 0 !== request.temporaryReferences && + ((request = request.temporaryReferences.get(value)), + void 0 !== request) + ) + return "$T" + request; + if (value.$$typeof === TEMPORARY_REFERENCE_TAG) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + if (/^on[A-Z]/.test(parentPropertyName)) + throw Error( + "Event handlers cannot be passed to Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + + "\nIf you need interactivity, consider converting part of this to a Client Component." + ); + if ( + jsxChildrenParents.has(parent) || + (jsxPropsParents.has(parent) && "children" === parentPropertyName) + ) + throw ( + ((request = value.displayName || value.name || "Component"), + Error( + "Functions are not valid as a child of Client Components. This may happen if you return " + + request + + " instead of <" + + request + + " /> from render. Or maybe you meant to call this function rather than return it." + + describeObjectForErrorMessage(parent, parentPropertyName) + )) + ); + throw Error( + 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.' + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + if ("symbol" === typeof value) { + task = request.writtenSymbols; + elementReference = task.get(value); + if (void 0 !== elementReference) + return serializeByValueID(elementReference); + elementReference = value.description; + if (Symbol.for(elementReference) !== value) + throw Error( + "Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(" + + (value.description + ") cannot be found among global symbols.") + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + request.pendingChunks++; + _writtenObjects = request.nextChunkId++; + emitSymbolChunk(request, _writtenObjects, elementReference); + task.set(value, _writtenObjects); + return serializeByValueID(_writtenObjects); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported in Client Component props." + + describeObjectForErrorMessage(parent, parentPropertyName) + ); + } + function logRecoverableError(request, error, task) { + var prevRequest = currentRequest; + currentRequest = null; + try { + var onError = request.onError; + var errorDigest = + null !== task + ? requestStorage.run( + void 0, + callWithDebugContextInDEV, + request, + task, + onError, + error + ) + : requestStorage.run(void 0, onError, error); + } finally { + currentRequest = prevRequest; + } + if (null != errorDigest && "string" !== typeof errorDigest) + throw Error( + 'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + + typeof errorDigest + + '" instead' + ); + return errorDigest || ""; + } + function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); + null !== request.destination + ? ((request.status = CLOSED), request.destination.destroy(error)) + : ((request.status = 13), (request.fatalError = error)); + request.cacheController.abort( + Error("The render was aborted due to a fatal error.", { cause: error }) + ); + } + function serializeErrorValue(request, error) { + var name = "Error", + env = (0, request.environmentName)(); + try { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + return ( + "$Z" + + outlineModel(request, { + name: name, + message: message, + stack: stack, + env: env + }).toString(16) + ); + } + function emitErrorChunk(request, id, digest, error, debug, owner) { + var name = "Error", + env = (0, request.environmentName)(); + try { + if (error instanceof Error) { + name = error.name; + var message = String(error.message); + var stack = filterStackTrace(request, parseStackTrace(error, 0)); + var errorEnv = error.environmentName; + "string" === typeof errorEnv && (env = errorEnv); + } else + (message = + "object" === typeof error && null !== error + ? describeObjectForErrorMessage(error) + : String(error)), + (stack = []); + } catch (x) { + (message = + "An error occurred but serializing the error message failed."), + (stack = []); + } + error = null == owner ? null : outlineComponentInfo(request, owner); + digest = { + digest: digest, + name: name, + message: message, + stack: stack, + env: env, + owner: error + }; + id = id.toString(16) + ":E" + stringify(digest) + "\n"; + debug + ? request.completedDebugChunks.push(id) + : request.completedErrorChunks.push(id); + } + function emitImportChunk(request, id, clientReferenceMetadata, debug) { + clientReferenceMetadata = stringify(clientReferenceMetadata); + id = id.toString(16) + ":I" + clientReferenceMetadata + "\n"; + debug + ? request.completedDebugChunks.push(id) + : request.completedImportChunks.push(id); + } + function emitSymbolChunk(request, id, name) { + id = encodeReferenceChunk(request, id, "$S" + name); + request.completedImportChunks.push(id); + } + function emitDebugHaltChunk(request, id) { + id = id.toString(16) + ":\n"; + request.completedDebugChunks.push(id); + } + function emitDebugChunk(request, id, debugInfo) { + var json = serializeDebugModel(request, 500, debugInfo); + null !== request.debugDestination + ? '"' === json[0] && "$" === json[1] + ? ((id = id.toString(16) + ":D" + json + "\n"), + request.completedRegularChunks.push(id)) + : ((debugInfo = request.nextChunkId++), + (json = debugInfo.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(json), + (id = id.toString(16) + ':D"$' + debugInfo.toString(16) + '"\n'), + request.completedRegularChunks.push(id)) + : ((id = id.toString(16) + ":D" + json + "\n"), + request.completedRegularChunks.push(id)); + } + function outlineComponentInfo(request, componentInfo) { + var existingRef = request.writtenDebugObjects.get(componentInfo); + if (void 0 !== existingRef) return existingRef; + null != componentInfo.owner && + outlineComponentInfo(request, componentInfo.owner); + existingRef = 10; + null != componentInfo.stack && + (existingRef += componentInfo.stack.length); + existingRef = { objectLimit: existingRef }; + var componentDebugInfo = { + name: componentInfo.name, + key: componentInfo.key + }; + null != componentInfo.env && (componentDebugInfo.env = componentInfo.env); + null != componentInfo.owner && + (componentDebugInfo.owner = componentInfo.owner); + null == componentInfo.stack && null != componentInfo.debugStack + ? (componentDebugInfo.stack = filterStackTrace( + request, + parseStackTrace(componentInfo.debugStack, 1) + )) + : null != componentInfo.stack && + (componentDebugInfo.stack = componentInfo.stack); + componentDebugInfo.props = componentInfo.props; + existingRef = outlineDebugModel(request, existingRef, componentDebugInfo); + existingRef = serializeByValueID(existingRef); + request.writtenDebugObjects.set(componentInfo, existingRef); + request.writtenObjects.set(componentInfo, existingRef); + return existingRef; + } + function emitIOInfoChunk( + request, + id, + name, + start, + end, + value, + env, + owner, + stack + ) { + var objectLimit = 10; + stack && (objectLimit += stack.length); + name = { + name: name, + start: start - request.timeOrigin, + end: end - request.timeOrigin + }; + null != env && (name.env = env); + null != stack && (name.stack = stack); + null != owner && (name.owner = owner); + void 0 !== value && (name.value = value); + value = serializeDebugModel(request, objectLimit, name); + id = id.toString(16) + ":J" + value + "\n"; + request.completedDebugChunks.push(id); + } + function serializeIONode(request, ioNode, promiseRef) { + var existingRef = request.writtenDebugObjects.get(ioNode); + if (void 0 !== existingRef) return existingRef; + existingRef = null; + var name = ""; + if (null !== ioNode.promise) { + var promise = ioNode.promise.deref(); + void 0 !== promise && + "string" === typeof promise.displayName && + (name = promise.displayName); + } + if (null !== ioNode.stack) { + a: { + existingRef = ioNode.stack; + for (promise = 0; promise < existingRef.length; promise++) { + var callsite = existingRef[promise]; + if (!isPromiseCreationInternal(callsite[1], callsite[0])) { + promise = 0 < promise ? existingRef.slice(promise) : existingRef; + break a; + } + } + promise = []; + } + existingRef = filterStackTrace(request, promise); + if ("" === name) { + a: { + name = promise; + promise = ""; + callsite = request.filterStackFrame; + for (var i = 0; i < name.length; i++) { + var callsite$jscomp$0 = name[i], + functionName = callsite$jscomp$0[0], + url = devirtualizeURL(callsite$jscomp$0[1]); + if ( + callsite( + url, + functionName, + callsite$jscomp$0[2], + callsite$jscomp$0[3] + ) && + "" !== url + ) { + if ("" === promise) { + name = functionName; + break a; + } + name = promise; + break a; + } else promise = functionName; + } + name = ""; + } + name.startsWith("Window.") + ? (name = name.slice(7)) + : name.startsWith(".") && (name = name.slice(7)); + } + } + promise = ioNode.owner; + null != promise && outlineComponentInfo(request, promise); + callsite = void 0; + null !== promiseRef && (callsite = promiseRef.deref()); + promiseRef = (0, request.environmentName)(); + i = 3 === ioNode.tag ? request.abortTime : ioNode.end; + request.pendingDebugChunks++; + callsite$jscomp$0 = request.nextChunkId++; + emitIOInfoChunk( + request, + callsite$jscomp$0, + name, + ioNode.start, + i, + callsite, + promiseRef, + promise, + existingRef + ); + promiseRef = serializeByValueID(callsite$jscomp$0); + request.writtenDebugObjects.set(ioNode, promiseRef); + return promiseRef; + } + function emitTypedArrayChunk(request, id, tag, typedArray, debug) { + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + typedArray = new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ); + var binaryLength = typedArray.byteLength; + id = id.toString(16) + ":" + tag + binaryLength.toString(16) + ","; + debug + ? request.completedDebugChunks.push(id, typedArray) + : request.completedRegularChunks.push(id, typedArray); + } + function emitTextChunk(request, id, text, debug) { + if (null === byteLengthOfChunk) + throw Error( + "Existence of byteLengthOfChunk should have already been checked. This is a bug in React." + ); + debug ? request.pendingDebugChunks++ : request.pendingChunks++; + var binaryLength = byteLengthOfChunk(text); + id = id.toString(16) + ":T" + binaryLength.toString(16) + ","; + debug + ? request.completedDebugChunks.push(id, text) + : request.completedRegularChunks.push(id, text); + } + function renderDebugModel( + request, + counter, + parent, + parentPropertyName, + value + ) { + if (null === value) return null; + if (value === REACT_ELEMENT_TYPE) return "$"; + if ("object" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if (value.$$typeof === CONSTRUCTOR_MARKER) { + value = value.constructor; + var ref = request.writtenDebugObjects.get(value); + void 0 === ref && + ((request = outlineDebugModel(request, counter, value)), + (ref = serializeByValueID(request))); + return "$P" + ref.slice(1); + } + if (void 0 !== request.temporaryReferences) { + var tempRef = request.temporaryReferences.get(value); + if (void 0 !== tempRef) return "$T" + tempRef; + } + tempRef = request.writtenDebugObjects; + var existingDebugReference = tempRef.get(value); + if (void 0 !== existingDebugReference) + if (debugModelRoot === value) debugModelRoot = null; + else return existingDebugReference; + else if (-1 === parentPropertyName.indexOf(":")) + if ( + ((existingDebugReference = tempRef.get(parent)), + void 0 !== existingDebugReference) + ) { + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + var propertyName = parentPropertyName; + if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE) + switch (parentPropertyName) { + case "1": + propertyName = "type"; + break; + case "2": + propertyName = "key"; + break; + case "3": + propertyName = "props"; + break; + case "4": + propertyName = "_owner"; + } + tempRef.set(value, existingDebugReference + ":" + propertyName); + } else if (debugNoOutline !== value) { + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + request = outlineDebugModel(request, counter, value); + return serializeByValueID(request); + } + parent = request.writtenObjects.get(value); + if (void 0 !== parent) return parent; + if (0 >= counter.objectLimit && !doNotLimit.has(value)) + return serializeDeferredObject(request, value); + counter.objectLimit--; + parent = request.deferredDebugObjects; + if ( + null !== parent && + ((parentPropertyName = parent.existing.get(value)), + void 0 !== parentPropertyName) + ) + return ( + parent.existing.delete(value), + parent.retained.delete(parentPropertyName), + emitOutlinedDebugModelChunk( + request, + parentPropertyName, + counter, + value + ), + serializeByValueID(parentPropertyName) + ); + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + null != value._owner && outlineComponentInfo(request, value._owner); + "object" === typeof value.type && + null !== value.type && + doNotLimit.add(value.type); + "object" === typeof value.key && + null !== value.key && + doNotLimit.add(value.key); + doNotLimit.add(value.props); + null !== value._owner && doNotLimit.add(value._owner); + counter = null; + if (null != value._debugStack) + for ( + counter = filterStackTrace( + request, + parseStackTrace(value._debugStack, 1) + ), + doNotLimit.add(counter), + request = 0; + request < counter.length; + request++ + ) + doNotLimit.add(counter[request]); + return [ + REACT_ELEMENT_TYPE, + value.type, + value.key, + value.props, + value._owner, + counter, + value._store.validated + ]; + case REACT_LAZY_TYPE: + value = value._payload; + if (null !== value && "object" === typeof value) { + switch (value._status) { + case 1: + return ( + (request = outlineDebugModel( + request, + counter, + value._result + )), + serializeLazyID(request) + ); + case 2: + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value._result, + !0, + null + ), + serializeLazyID(counter) + ); + } + switch (value.status) { + case "fulfilled": + return ( + (request = outlineDebugModel( + request, + counter, + value.value + )), + serializeLazyID(request) + ); + case "rejected": + return ( + (counter = request.nextChunkId++), + emitErrorChunk( + request, + counter, + "", + value.reason, + !0, + null + ), + serializeLazyID(counter) + ); + } + } + request.pendingDebugChunks++; + value = request.nextChunkId++; + emitDebugHaltChunk(request, value); + return serializeLazyID(value); + } + if ("function" === typeof value.then) + return serializeDebugThenable(request, counter, value); + if (isArrayImpl(value)) + return 200 < value.length && !doNotLimit.has(value) + ? serializeDeferredObject(request, value) + : value; + if (value instanceof Date) return "$D" + value.toJSON(); + if (value instanceof Map) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) { + var entry = value[ref]; + doNotLimit.add(entry); + var key = entry[0]; + entry = entry[1]; + "object" === typeof key && null !== key && doNotLimit.add(key); + "object" === typeof entry && + null !== entry && + doNotLimit.add(entry); + } + return "$Q" + outlineDebugModel(request, counter, value).toString(16); + } + if (value instanceof Set) { + value = Array.from(value); + counter.objectLimit++; + for (ref = 0; ref < value.length; ref++) + (key = value[ref]), + "object" === typeof key && null !== key && doNotLimit.add(key); + return "$W" + outlineDebugModel(request, counter, value).toString(16); + } + if ("function" === typeof FormData && value instanceof FormData) + return ( + (value = Array.from(value.entries())), + "$K" + + outlineDebugModel( + request, + { objectLimit: 2 * value.length + 1 }, + value + ).toString(16) + ); + if (value instanceof Error) { + counter = "Error"; + var env = (0, request.environmentName)(); + try { + (counter = value.name), + (ref = String(value.message)), + (key = filterStackTrace(request, parseStackTrace(value, 0))), + (entry = value.environmentName), + "string" === typeof entry && (env = entry); + } catch (x) { + (ref = + "An error occurred but serializing the error message failed."), + (key = []); + } + request = + "$Z" + + outlineDebugModel( + request, + { objectLimit: 2 * key.length + 1 }, + { name: counter, message: ref, stack: key, env: env } + ).toString(16); + return request; + } + if (value instanceof ArrayBuffer) + return serializeDebugTypedArray(request, "A", new Uint8Array(value)); + if (value instanceof Int8Array) + return serializeDebugTypedArray(request, "O", value); + if (value instanceof Uint8Array) + return serializeDebugTypedArray(request, "o", value); + if (value instanceof Uint8ClampedArray) + return serializeDebugTypedArray(request, "U", value); + if (value instanceof Int16Array) + return serializeDebugTypedArray(request, "S", value); + if (value instanceof Uint16Array) + return serializeDebugTypedArray(request, "s", value); + if (value instanceof Int32Array) + return serializeDebugTypedArray(request, "L", value); + if (value instanceof Uint32Array) + return serializeDebugTypedArray(request, "l", value); + if (value instanceof Float32Array) + return serializeDebugTypedArray(request, "G", value); + if (value instanceof Float64Array) + return serializeDebugTypedArray(request, "g", value); + if (value instanceof BigInt64Array) + return serializeDebugTypedArray(request, "M", value); + if (value instanceof BigUint64Array) + return serializeDebugTypedArray(request, "m", value); + if (value instanceof DataView) + return serializeDebugTypedArray(request, "V", value); + if ("function" === typeof Blob && value instanceof Blob) + return serializeDebugBlob(request, value); + if (getIteratorFn(value)) return Array.from(value); + request = getPrototypeOf(value); + if (request !== ObjectPrototype && null !== request) { + counter = Object.create(null); + for (env in value) + if (hasOwnProperty.call(value, env) || isGetter(request, env)) + counter[env] = value[env]; + ref = request.constructor; + "function" !== typeof ref || + ref.prototype !== request || + hasOwnProperty.call(value, "") || + isGetter(request, "") || + (counter[""] = { $$typeof: CONSTRUCTOR_MARKER, constructor: ref }); + return counter; + } + return value; + } + if ("string" === typeof value) { + if (1024 <= value.length) { + if (0 >= counter.objectLimit) + return serializeDeferredObject(request, value); + counter.objectLimit--; + request.pendingDebugChunks++; + counter = request.nextChunkId++; + emitTextChunk(request, counter, value, !0); + return serializeByValueID(counter); + } + return "$" === value[0] ? "$" + value : value; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + if (isClientReference(value)) + return serializeDebugClientReference( + request, + parent, + parentPropertyName, + value + ); + if ( + void 0 !== request.temporaryReferences && + ((counter = request.temporaryReferences.get(value)), + void 0 !== counter) + ) + return "$T" + counter; + counter = request.writtenDebugObjects; + ref = counter.get(value); + if (void 0 !== ref) return ref; + ref = Function.prototype.toString.call(value); + key = value.name; + key = + "$E" + + ("string" === typeof key + ? "Object.defineProperty(" + + ref + + ',"name",{value:' + + JSON.stringify(key) + + "})" + : "(" + ref + ")"); + request.pendingDebugChunks++; + ref = request.nextChunkId++; + key = encodeReferenceChunk(request, ref, key); + request.completedDebugChunks.push(key); + request = serializeByValueID(ref); + counter.set(value, request); + return request; + } + if ("symbol" === typeof value) { + counter = request.writtenSymbols.get(value); + if (void 0 !== counter) return serializeByValueID(counter); + value = value.description; + request.pendingChunks++; + counter = request.nextChunkId++; + emitSymbolChunk(request, counter, value); + return serializeByValueID(counter); + } + return "bigint" === typeof value + ? "$n" + value.toString(10) + : "unknown type " + typeof value; + } + function serializeDebugModel(request, objectLimit, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + var counter = { objectLimit: objectLimit }; + objectLimit = debugNoOutline; + debugNoOutline = model; + try { + return stringify(model, replacer); + } catch (x) { + return stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugNoOutline = objectLimit; + } + } + function emitOutlinedDebugModelChunk(request, id, counter, model) { + function replacer(parentPropertyName) { + try { + return renderDebugModel( + request, + counter, + this, + parentPropertyName, + this[parentPropertyName] + ); + } catch (x) { + return ( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } + } + "object" === typeof model && null !== model && doNotLimit.add(model); + var prevModelRoot = debugModelRoot; + debugModelRoot = model; + "object" === typeof model && + null !== model && + request.writtenDebugObjects.set(model, serializeByValueID(id)); + try { + var json = stringify(model, replacer); + } catch (x) { + json = stringify( + "Unknown Value: React could not send it from the server.\n" + + x.message + ); + } finally { + debugModelRoot = prevModelRoot; + } + id = id.toString(16) + ":" + json + "\n"; + request.completedDebugChunks.push(id); + } + function outlineDebugModel(request, counter, model) { + var id = request.nextChunkId++; + request.pendingDebugChunks++; + emitOutlinedDebugModelChunk(request, id, counter, model); + return id; + } + function emitTimeOriginChunk(request, timeOrigin) { + request.pendingDebugChunks++; + request.completedDebugChunks.push(":N" + timeOrigin + "\n"); + } + function forwardDebugInfo(request$jscomp$0, task, debugInfo) { + for (var id = task.id, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + if ("number" === typeof info.time) + markOperationEndTime(request$jscomp$0, task, info.time); + else if ("string" === typeof info.name) + outlineComponentInfo(request$jscomp$0, info), + request$jscomp$0.pendingChunks++, + emitDebugChunk(request$jscomp$0, id, info); + else if (info.awaited) { + var ioInfo = info.awaited; + if (!(ioInfo.end <= request$jscomp$0.timeOrigin)) { + var request = request$jscomp$0, + ioInfo$jscomp$0 = ioInfo; + if (!request.writtenObjects.has(ioInfo$jscomp$0)) { + request.pendingDebugChunks++; + var id$jscomp$0 = request.nextChunkId++, + owner = ioInfo$jscomp$0.owner; + null != owner && outlineComponentInfo(request, owner); + var debugStack = + null == ioInfo$jscomp$0.stack && + null != ioInfo$jscomp$0.debugStack + ? filterStackTrace( + request, + parseStackTrace(ioInfo$jscomp$0.debugStack, 1) + ) + : ioInfo$jscomp$0.stack; + var env = ioInfo$jscomp$0.env; + null == env && (env = (0, request.environmentName)()); + emitIOInfoChunk( + request, + id$jscomp$0, + ioInfo$jscomp$0.name, + ioInfo$jscomp$0.start, + ioInfo$jscomp$0.end, + ioInfo$jscomp$0.value, + env, + owner, + debugStack + ); + request.writtenDebugObjects.set( + ioInfo$jscomp$0, + serializeByValueID(id$jscomp$0) + ); + } + null != info.owner && + outlineComponentInfo(request$jscomp$0, info.owner); + debugStack = + null == info.stack && null != info.debugStack + ? filterStackTrace( + request$jscomp$0, + parseStackTrace(info.debugStack, 1) + ) + : info.stack; + ioInfo = { awaited: ioInfo }; + ioInfo.env = + null != info.env + ? info.env + : (0, request$jscomp$0.environmentName)(); + null != info.owner && (ioInfo.owner = info.owner); + null != debugStack && (ioInfo.stack = debugStack); + request$jscomp$0.pendingChunks++; + emitDebugChunk(request$jscomp$0, id, ioInfo); + } + } else + request$jscomp$0.pendingChunks++, + emitDebugChunk(request$jscomp$0, id, info); + } + } + function forwardDebugInfoFromThenable( + request, + task, + thenable, + owner, + stack + ) { + var debugInfo; + (debugInfo = thenable._debugInfo) && + forwardDebugInfo(request, task, debugInfo); + thenable = getAsyncSequenceFromPromise(thenable); + null !== thenable && + emitAsyncSequence(request, task, thenable, debugInfo, owner, stack); + } + function forwardDebugInfoFromCurrentContext(request, task, thenable) { + (thenable = thenable._debugInfo) && + forwardDebugInfo(request, task, thenable); + var sequence = pendingOperations.get(async_hooks.executionAsyncId()); + sequence = void 0 === sequence ? null : sequence; + null !== sequence && + emitAsyncSequence(request, task, sequence, thenable, null, null); + } + function forwardDebugInfoFromAbortedTask(request, task) { + var model = task.model; + if ("object" === typeof model && null !== model) { + var debugInfo; + (debugInfo = model._debugInfo) && + forwardDebugInfo(request, task, debugInfo); + var thenable = null; + "function" === typeof model.then + ? (thenable = model) + : model.$$typeof === REACT_LAZY_TYPE && + ((model = model._payload), + "function" === typeof model.then && (thenable = model)); + if ( + null !== thenable && + ((model = getAsyncSequenceFromPromise(thenable)), null !== model) + ) { + for ( + thenable = model; + 4 === thenable.tag && null !== thenable.awaited; + + ) + thenable = thenable.awaited; + 3 === thenable.tag + ? (serializeIONode(request, thenable, null), + request.pendingChunks++, + (debugInfo = (0, request.environmentName)()), + (debugInfo = { awaited: thenable, env: debugInfo }), + advanceTaskTime(request, task, task.time), + emitDebugChunk(request, task.id, debugInfo)) + : emitAsyncSequence(request, task, model, debugInfo, null, null); + } + } + } + function emitTimingChunk(request, id, timestamp) { + request.pendingChunks++; + var json = '{"time":' + (timestamp - request.timeOrigin) + "}"; + null !== request.debugDestination + ? ((timestamp = request.nextChunkId++), + (json = timestamp.toString(16) + ":" + json + "\n"), + request.pendingDebugChunks++, + request.completedDebugChunks.push(json), + (id = id.toString(16) + ':D"$' + timestamp.toString(16) + '"\n'), + request.completedRegularChunks.push(id)) + : ((id = id.toString(16) + ":D" + json + "\n"), + request.completedRegularChunks.push(id)); + } + function advanceTaskTime(request, task, timestamp) { + timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : task.timed || emitTimingChunk(request, task.id, task.time); + task.timed = !0; + } + function markOperationEndTime(request, task, timestamp) { + (request.status === ABORTING && timestamp > request.abortTime) || + (timestamp > task.time + ? (emitTimingChunk(request, task.id, timestamp), + (task.time = timestamp)) + : emitTimingChunk(request, task.id, task.time)); + } + function emitChunk(request, task, value) { + var id = task.id; + "string" === typeof value && null !== byteLengthOfChunk + ? emitTextChunk(request, id, value, !1) + : value instanceof ArrayBuffer + ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1) + : value instanceof Int8Array + ? emitTypedArrayChunk(request, id, "O", value, !1) + : value instanceof Uint8Array + ? emitTypedArrayChunk(request, id, "o", value, !1) + : value instanceof Uint8ClampedArray + ? emitTypedArrayChunk(request, id, "U", value, !1) + : value instanceof Int16Array + ? emitTypedArrayChunk(request, id, "S", value, !1) + : value instanceof Uint16Array + ? emitTypedArrayChunk(request, id, "s", value, !1) + : value instanceof Int32Array + ? emitTypedArrayChunk(request, id, "L", value, !1) + : value instanceof Uint32Array + ? emitTypedArrayChunk(request, id, "l", value, !1) + : value instanceof Float32Array + ? emitTypedArrayChunk(request, id, "G", value, !1) + : value instanceof Float64Array + ? emitTypedArrayChunk(request, id, "g", value, !1) + : value instanceof BigInt64Array + ? emitTypedArrayChunk(request, id, "M", value, !1) + : value instanceof BigUint64Array + ? emitTypedArrayChunk( + request, + id, + "m", + value, + !1 + ) + : value instanceof DataView + ? emitTypedArrayChunk( + request, + id, + "V", + value, + !1 + ) + : ((value = stringify(value, task.toJSON)), + (task = + task.id.toString(16) + + ":" + + value + + "\n"), + request.completedRegularChunks.push(task)); + } + function erroredTask(request, task, error) { + task.timed && markOperationEndTime(request, task, performance.now()); + task.status = 4; + var digest = logRecoverableError(request, error, task); + emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner); + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } + function retryTask(request, task) { + if (0 === task.status) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + task.status = 5; + var parentSerializedSize = serializedSize; + try { + modelRoot = task.model; + canEmitDebugInfo = !0; + var resolvedModel = renderModelDestructive( + request, + task, + emptyRoot, + "", + task.model + ); + canEmitDebugInfo = !1; + modelRoot = resolvedModel; + task.keyPath = null; + task.implicitSlot = !1; + var currentEnv = (0, request.environmentName)(); + currentEnv !== task.environmentName && + (request.pendingChunks++, + emitDebugChunk(request, task.id, { env: currentEnv })); + task.timed && markOperationEndTime(request, task, performance.now()); + if ("object" === typeof resolvedModel && null !== resolvedModel) + request.writtenObjects.set( + resolvedModel, + serializeByValueID(task.id) + ), + emitChunk(request, task, resolvedModel); + else { + var json = stringify(resolvedModel), + processedChunk = task.id.toString(16) + ":" + json + "\n"; + request.completedRegularChunks.push(processedChunk); + } + task.status = 1; + request.abortableTasks.delete(task); + callOnAllReadyIfReady(request); + } catch (thrownValue) { + if (request.status === ABORTING) + if ( + (request.abortableTasks.delete(task), + (task.status = 0), + 21 === request.type) + ) + haltTask(task), finishHaltedTask(task, request); + else { + var errorId = request.fatalError; + abortTask(task); + finishAbortedTask(task, request, errorId); + } + else { + var x = + thrownValue === SuspenseException + ? getSuspendedThenable() + : thrownValue; + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + task.status = 0; + task.thenableState = getThenableStateAfterSuspending(); + var ping = task.ping; + x.then(ping, ping); + } else erroredTask(request, task, x); + } + } finally { + (canEmitDebugInfo = prevCanEmitDebugInfo), + (serializedSize = parentSerializedSize); + } + } + } + function tryStreamTask(request, task) { + var prevCanEmitDebugInfo = canEmitDebugInfo; + canEmitDebugInfo = !1; + var parentSerializedSize = serializedSize; + try { + emitChunk(request, task, task.model); + } finally { + (serializedSize = parentSerializedSize), + (canEmitDebugInfo = prevCanEmitDebugInfo); + } + } + function performWork(request) { + pendingOperations.delete(async_hooks.executionAsyncId()); + var prevDispatcher = ReactSharedInternalsServer.H; + ReactSharedInternalsServer.H = HooksDispatcher; + var prevRequest = currentRequest; + currentRequest$1 = currentRequest = request; + try { + var pingedTasks = request.pingedTasks; + request.pingedTasks = []; + for (var i = 0; i < pingedTasks.length; i++) + retryTask(request, pingedTasks[i]); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } finally { + (ReactSharedInternalsServer.H = prevDispatcher), + (currentRequest$1 = null), + (currentRequest = prevRequest); + } + } + function abortTask(task) { + 0 === task.status && (task.status = 3); + } + function finishAbortedTask(task, request, errorId) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + task.timed && markOperationEndTime(request, task, request.abortTime), + (errorId = serializeByValueID(errorId)), + (task = encodeReferenceChunk(request, task.id, errorId)), + request.completedErrorChunks.push(task)); + } + function haltTask(task) { + 0 === task.status && (task.status = 3); + } + function finishHaltedTask(task, request) { + 3 === task.status && + (forwardDebugInfoFromAbortedTask(request, task), + request.pendingChunks--); + } + function flushCompletedChunks(request) { + if (null !== request.debugDestination) { + var debugDestination = request.debugDestination; + currentView = new Uint8Array(4096); + writtenBytes = 0; + destinationHasCapacity = !0; + try { + for ( + var debugChunks = request.completedDebugChunks, i = 0; + i < debugChunks.length; + i++ + ) + request.pendingDebugChunks--, + writeChunkAndReturn(debugDestination, debugChunks[i]); + debugChunks.splice(0, i); + } finally { + completeWriting(debugDestination); + } + flushBuffered(debugDestination); + } + debugDestination = request.destination; + if (null !== debugDestination) { + currentView = new Uint8Array(4096); + writtenBytes = 0; + destinationHasCapacity = !0; + try { + var importsChunks = request.completedImportChunks; + for ( + debugChunks = 0; + debugChunks < importsChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + importsChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + importsChunks.splice(0, debugChunks); + var hintChunks = request.completedHintChunks; + for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++) + if ( + !writeChunkAndReturn(debugDestination, hintChunks[debugChunks]) + ) { + request.destination = null; + debugChunks++; + break; + } + hintChunks.splice(0, debugChunks); + if (null === request.debugDestination) { + var _debugChunks = request.completedDebugChunks; + for ( + debugChunks = 0; + debugChunks < _debugChunks.length; + debugChunks++ + ) + if ( + (request.pendingDebugChunks--, + !writeChunkAndReturn( + debugDestination, + _debugChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + _debugChunks.splice(0, debugChunks); + } + var regularChunks = request.completedRegularChunks; + for ( + debugChunks = 0; + debugChunks < regularChunks.length; + debugChunks++ + ) + if ( + (request.pendingChunks--, + !writeChunkAndReturn( + debugDestination, + regularChunks[debugChunks] + )) + ) { + request.destination = null; + debugChunks++; + break; + } + regularChunks.splice(0, debugChunks); + var errorChunks = request.completedErrorChunks; + for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++) + if ( + (request.pendingChunks--, + !writeChunkAndReturn(debugDestination, errorChunks[debugChunks])) + ) { + request.destination = null; + debugChunks++; + break; + } + errorChunks.splice(0, debugChunks); + } finally { + (request.flushScheduled = !1), completeWriting(debugDestination); + } + flushBuffered(debugDestination); + } + 0 === request.pendingChunks && + ((importsChunks = request.debugDestination), + 0 === request.pendingDebugChunks + ? (null !== importsChunks && + (importsChunks.end(), (request.debugDestination = null)), + request.status < ABORTING && + request.cacheController.abort( + Error( + "This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources." + ) + ), + null !== request.destination && + ((request.status = CLOSED), + request.destination.end(), + (request.destination = null)), + null !== request.debugDestination && + (request.debugDestination.end(), + (request.debugDestination = null))) + : null !== importsChunks && + null !== request.destination && + ((request.status = CLOSED), + request.destination.end(), + (request.destination = null))); + } + function startWork(request) { + request.flushScheduled = null !== request.destination; + scheduleMicrotask(function () { + requestStorage.run(request, performWork, request); + }); + setImmediate(function () { + 10 === request.status && (request.status = 11); + }); + } + function enqueueFlush(request) { + !1 !== request.flushScheduled || + 0 !== request.pingedTasks.length || + (null === request.destination && null === request.debugDestination) || + ((request.flushScheduled = !0), + setImmediate(function () { + request.flushScheduled = !1; + flushCompletedChunks(request); + })); + } + function callOnAllReadyIfReady(request) { + 0 === request.abortableTasks.size && + ((request = request.onAllReady), request()); + } + function startFlowing(request, destination) { + if (13 === request.status) + (request.status = CLOSED), destination.destroy(request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } + function startFlowingDebug(request, debugDestination) { + if (13 === request.status) + (request.status = CLOSED), debugDestination.destroy(request.fatalError); + else if (request.status !== CLOSED && null === request.debugDestination) { + request.debugDestination = debugDestination; + try { + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } + function finishHalt(request, abortedTasks) { + try { + abortedTasks.forEach(function (task) { + return finishHaltedTask(task, request); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function finishAbort(request, abortedTasks, errorId) { + try { + abortedTasks.forEach(function (task) { + return finishAbortedTask(task, request, errorId); + }); + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + function abort(request, reason) { + if (!(11 < request.status)) + try { + request.status = ABORTING; + request.abortTime = performance.now(); + request.cacheController.abort(reason); + var abortableTasks = request.abortableTasks; + if (0 < abortableTasks.size) + if (21 === request.type) + abortableTasks.forEach(function (task) { + return haltTask(task, request); + }), + setImmediate(function () { + return finishHalt(request, abortableTasks); + }); + else { + var error = + void 0 === reason + ? Error( + "The render was aborted by the server without a reason." + ) + : "object" === typeof reason && + null !== reason && + "function" === typeof reason.then + ? Error( + "The render was aborted by the server with a promise." + ) + : reason, + digest = logRecoverableError(request, error, null), + _errorId2 = request.nextChunkId++; + request.fatalError = _errorId2; + request.pendingChunks++; + emitErrorChunk(request, _errorId2, digest, error, !1, null); + abortableTasks.forEach(function (task) { + return abortTask(task, request, _errorId2); + }); + setImmediate(function () { + return finishAbort(request, abortableTasks, _errorId2); + }); + } + else { + var onAllReady = request.onAllReady; + onAllReady(); + flushCompletedChunks(request); + } + } catch (error$2) { + logRecoverableError(request, error$2, null), + fatalError(request, error$2); + } + } + function fromHex(str) { + return parseInt(str, 16); + } + function resolveDebugMessage(request, message) { + var deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + if ("" === message) closeDebugChannel(request); + else { + var command = message.charCodeAt(0); + message = message.slice(2).split(",").map(fromHex); + switch (command) { + case 82: + for (command = 0; command < message.length; command++) { + var id = message[command], + retainedValue = deferredDebugObjects.retained.get(id); + void 0 !== retainedValue && + (request.pendingDebugChunks--, + deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + enqueueFlush(request)); + } + break; + case 81: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + deferredDebugObjects.existing.delete(retainedValue), + emitOutlinedDebugModelChunk( + request, + id, + { objectLimit: 10 }, + retainedValue + ), + enqueueFlush(request)); + break; + case 80: + for (command = 0; command < message.length; command++) + (id = message[command]), + (retainedValue = deferredDebugObjects.retained.get(id)), + void 0 !== retainedValue && + (deferredDebugObjects.retained.delete(id), + emitRequestedDebugThenable( + request, + id, + { objectLimit: 10 }, + retainedValue + )); + break; + default: + throw Error( + "Unknown command. The debugChannel was not wired up properly." + ); + } + } + } + function closeDebugChannel(request) { + var deferredDebugObjects = request.deferredDebugObjects; + if (null === deferredDebugObjects) + throw Error( + "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React." + ); + deferredDebugObjects.retained.forEach(function (value, id) { + request.pendingDebugChunks--; + deferredDebugObjects.retained.delete(id); + deferredDebugObjects.existing.delete(value); + }); + enqueueFlush(request); + } + function resolveServerReference(bundlerConfig, id) { + var idx = id.lastIndexOf("#"); + bundlerConfig = id.slice(0, idx); + id = id.slice(idx + 1); + return { specifier: bundlerConfig, name: id }; + } + function preloadModule(metadata) { + var existingPromise = asyncModuleCache.get(metadata.specifier); + if (existingPromise) + return "fulfilled" === existingPromise.status ? null : existingPromise; + var modulePromise = import(metadata.specifier); + metadata.async && + (modulePromise = modulePromise.then(function (value) { + return value.default; + })); + modulePromise.then( + function (value) { + var fulfilledThenable = modulePromise; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = value; + }, + function (reason) { + var rejectedThenable = modulePromise; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = reason; + } + ); + asyncModuleCache.set(metadata.specifier, modulePromise); + return modulePromise; + } + function requireModule(metadata) { + var moduleExports = asyncModuleCache.get(metadata.specifier); + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata.name + ? moduleExports + : "" === metadata.name + ? moduleExports.default + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata.name) ? moduleExports[metadata.name] : void 0); + } + function Chunk(status, value, reason, response) { + this.status = status; + this.value = value; + this.reason = reason; + this._response = response; + } + function createPendingChunk(response) { + return new Chunk("pending", null, null, response); + } + function wakeChunk(listeners, value) { + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value); + } + function triggerErrorOnChunk(chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + var listeners = chunk.reason; + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && wakeChunk(listeners, error); + } + } + function resolveModelChunk(chunk, value, id) { + if ("pending" !== chunk.status) + (chunk = chunk.reason), + "C" === value[0] + ? chunk.close("C" === value ? '"$undefined"' : value.slice(1)) + : chunk.enqueueModel(value); + else { + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = id; + if (null !== resolveListeners) + switch ((initializeModelChunk(chunk), chunk.status)) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value); + break; + case "pending": + case "blocked": + case "cyclic": + if (chunk.value) + for (value = 0; value < resolveListeners.length; value++) + chunk.value.push(resolveListeners[value]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for (value = 0; value < rejectListeners.length; value++) + chunk.reason.push(rejectListeners[value]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && wakeChunk(rejectListeners, chunk.reason); + } + } + } + function createResolvedIteratorResultChunk(response, value, done) { + return new Chunk( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1, + response + ); + } + function resolveIteratorResultChunk(chunk, value, done) { + resolveModelChunk( + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + -1 + ); + } + function loadServerReference$1( + response, + id, + bound, + parentChunk, + parentObject, + key + ) { + var serverReference = resolveServerReference(response._bundlerConfig, id); + id = preloadModule(serverReference); + if (bound) + bound = Promise.all([bound, id]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }); + else if (id) + bound = Promise.resolve(id).then(function () { + return requireModule(serverReference); + }); + else return requireModule(serverReference); + bound.then( + createModelResolver( + parentChunk, + parentObject, + key, + !1, + response, + createModel, + [] + ), + createModelReject(parentChunk) + ); + return null; + } + function reviveModel(response, parentObj, parentKey, value, reference) { + if ("string" === typeof value) + return parseModelString( + response, + parentObj, + parentKey, + value, + reference + ); + if ("object" === typeof value && null !== value) + if ( + (void 0 !== reference && + void 0 !== response._temporaryReferences && + response._temporaryReferences.set(value, reference), + Array.isArray(value)) + ) + for (var i = 0; i < value.length; i++) + value[i] = reviveModel( + response, + value, + "" + i, + value[i], + void 0 !== reference ? reference + ":" + i : void 0 + ); + else + for (i in value) + hasOwnProperty.call(value, i) && + ((parentObj = + void 0 !== reference && -1 === i.indexOf(":") + ? reference + ":" + i + : void 0), + (parentObj = reviveModel( + response, + value, + i, + value[i], + parentObj + )), + (void 0 !== parentObj && "__proto__" !== i) ? (value[i] = parentObj) : delete value[i]); + return value; + } + function initializeModelChunk(chunk) { + var prevChunk = initializingChunk, + prevBlocked = initializingChunkBlockedModel; + initializingChunk = chunk; + initializingChunkBlockedModel = null; + var rootReference = + -1 === chunk.reason ? void 0 : chunk.reason.toString(16), + resolvedModel = chunk.value; + chunk.status = "cyclic"; + chunk.value = null; + chunk.reason = null; + try { + var rawModel = JSON.parse(resolvedModel), + value = reviveModel( + chunk._response, + { "": rawModel }, + "", + rawModel, + rootReference + ); + if ( + null !== initializingChunkBlockedModel && + 0 < initializingChunkBlockedModel.deps + ) + (initializingChunkBlockedModel.value = value), + (chunk.status = "blocked"); + else { + var resolveListeners = chunk.value; + chunk.status = "fulfilled"; + chunk.value = value; + null !== resolveListeners && wakeChunk(resolveListeners, value); + } + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingChunk = prevChunk), + (initializingChunkBlockedModel = prevBlocked); + } + } + function reportGlobalError(response, error) { + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && triggerErrorOnChunk(chunk, error); + }); + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._formData.get(response._prefix + id)), + (chunk = + null != chunk + ? new Chunk("resolved_model", chunk, id, response) + : response._closed + ? new Chunk("rejected", null, response._closedReason, response) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function createModelResolver( + chunk, + parentObject, + key, + cyclic, + response, + map, + path + ) { + if (initializingChunkBlockedModel) { + var blocked = initializingChunkBlockedModel; + cyclic || blocked.deps++; + } else + blocked = initializingChunkBlockedModel = { + deps: cyclic ? 0 : 1, + value: null + }; + return function (value) { + for (var i = 1; i < path.length; i++) (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + parentObject[key] = map(response, value); + "" === key && + null === blocked.value && + (blocked.value = parentObject[key]); + blocked.deps--; + 0 === blocked.deps && + "blocked" === chunk.status && + ((value = chunk.value), + (chunk.status = "fulfilled"), + (chunk.value = blocked.value), + null !== value && wakeChunk(value, blocked.value)); + }; + } + function createModelReject(chunk) { + return function (error) { + return triggerErrorOnChunk(chunk, error); + }; + } + function getOutlinedModel(response, reference, parentObject, key, map) { + reference = reference.split(":"); + var id = parseInt(reference[0], 16); + id = getChunk(response, id); + switch (id.status) { + case "resolved_model": + initializeModelChunk(id); + } + switch (id.status) { + case "fulfilled": + parentObject = id.value; + for (key = 1; key < reference.length; key++) + (typeof parentObject === "object" && parentObject !== null && Object.prototype.hasOwnProperty.call(parentObject, reference[key]) ? parentObject = parentObject[reference[key]] : (parentObject = undefined)); + return map(response, parentObject); + case "pending": + case "blocked": + case "cyclic": + var parentChunk = initializingChunk; + id.then( + createModelResolver( + parentChunk, + parentObject, + key, + "cyclic" === id.status, + response, + map, + reference + ), + createModelReject(parentChunk) + ); + return null; + default: + throw id.reason; + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function parseTypedArray( + response, + reference, + constructor, + bytesPerElement, + parentObject, + parentKey + ) { + reference = parseInt(reference.slice(2), 16); + reference = response._formData.get(response._prefix + reference); + reference = + constructor === ArrayBuffer + ? reference.arrayBuffer() + : reference.arrayBuffer().then(function (buffer) { + return new constructor(buffer); + }); + bytesPerElement = initializingChunk; + reference.then( + createModelResolver( + bytesPerElement, + parentObject, + parentKey, + !1, + response, + createModel, + [] + ), + createModelReject(bytesPerElement) + ); + return null; + } + function resolveStream(response, id, stream, controller) { + var chunks = response._chunks; + stream = new Chunk("fulfilled", stream, controller, response); + chunks.set(id, stream); + response = response._formData.getAll(response._prefix + id); + for (id = 0; id < response.length; id++) + (chunks = response[id]), + "C" === chunks[0] + ? controller.close( + "C" === chunks ? '"$undefined"' : chunks.slice(1) + ) + : controller.enqueueModel(chunks); + } + function parseReadableStream(response, reference, type) { + reference = parseInt(reference.slice(2), 16); + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream(response, reference, type, { + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = new Chunk("resolved_model", json, -1, response); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk = createPendingChunk(response); + _chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk; + chunk.then(function () { + previousBlockedChunk === _chunk && (previousBlockedChunk = null); + resolveModelChunk(_chunk, json, -1); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }); + return type; + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function parseAsyncIterable(response, reference, iterator) { + reference = parseInt(reference.slice(2), 16); + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = _defineProperty({}, ASYNC_ITERATOR, function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new Chunk( + "fulfilled", + { done: !0, value: void 0 }, + null, + response + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }); + iterator = iterator ? iterable[ASYNC_ITERATOR]() : iterable; + resolveStream(response, reference, iterator, { + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !1); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(buffer[nextWriteIndex++], error); + } + }); + return iterator; + } + function parseModelString(response, obj, key, value, reference) { + if ("$" === value[0]) { + switch (value[1]) { + case "$": + return value.slice(1); + case "@": + return ( + (obj = parseInt(value.slice(2), 16)), getChunk(response, obj) + ); + case "F": + return ( + (value = value.slice(2)), + (value = getOutlinedModel( + response, + value, + obj, + key, + createModel + )), + loadServerReference$1( + response, + value.id, + value.bound, + initializingChunk, + obj, + key + ) + ); + case "T": + if ( + void 0 === reference || + void 0 === response._temporaryReferences + ) + throw Error( + "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server." + ); + return createTemporaryReference( + response._temporaryReferences, + reference + ); + case "Q": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createMap) + ); + case "W": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, createSet) + ); + case "K": + obj = value.slice(2); + var formPrefix = response._prefix + obj + "_", + data = new FormData(); + response._formData.forEach(function (entry, entryKey) { + entryKey.startsWith(formPrefix) && + data.append(entryKey.slice(formPrefix.length), entry); + }); + return data; + case "i": + return ( + (value = value.slice(2)), + getOutlinedModel(response, value, obj, key, extractIterator) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + } + switch (value[1]) { + case "A": + return parseTypedArray(response, value, ArrayBuffer, 1, obj, key); + case "O": + return parseTypedArray(response, value, Int8Array, 1, obj, key); + case "o": + return parseTypedArray(response, value, Uint8Array, 1, obj, key); + case "U": + return parseTypedArray( + response, + value, + Uint8ClampedArray, + 1, + obj, + key + ); + case "S": + return parseTypedArray(response, value, Int16Array, 2, obj, key); + case "s": + return parseTypedArray(response, value, Uint16Array, 2, obj, key); + case "L": + return parseTypedArray(response, value, Int32Array, 4, obj, key); + case "l": + return parseTypedArray(response, value, Uint32Array, 4, obj, key); + case "G": + return parseTypedArray(response, value, Float32Array, 4, obj, key); + case "g": + return parseTypedArray(response, value, Float64Array, 8, obj, key); + case "M": + return parseTypedArray(response, value, BigInt64Array, 8, obj, key); + case "m": + return parseTypedArray( + response, + value, + BigUint64Array, + 8, + obj, + key + ); + case "V": + return parseTypedArray(response, value, DataView, 1, obj, key); + case "B": + return ( + (obj = parseInt(value.slice(2), 16)), + response._formData.get(response._prefix + obj) + ); + } + switch (value[1]) { + case "R": + return parseReadableStream(response, value, void 0); + case "r": + return parseReadableStream(response, value, "bytes"); + case "X": + return parseAsyncIterable(response, value, !1); + case "x": + return parseAsyncIterable(response, value, !0); + } + value = value.slice(1); + return getOutlinedModel(response, value, obj, key, createModel); + } + return value; + } + function createResponse( + bundlerConfig, + formFieldPrefix, + temporaryReferences + ) { + var backingFormData = + 3 < arguments.length && void 0 !== arguments[3] + ? arguments[3] + : new FormData(), + chunks = new Map(); + return { + _bundlerConfig: bundlerConfig, + _prefix: formFieldPrefix, + _formData: backingFormData, + _chunks: chunks, + _closed: !1, + _closedReason: null, + _temporaryReferences: temporaryReferences + }; + } + function resolveField(response, key, value) { + response._formData.append(key, value); + var prefix = response._prefix; + key.startsWith(prefix) && + ((response = response._chunks), + (key = +key.slice(prefix.length)), + (prefix = response.get(key)) && resolveModelChunk(prefix, value, key)); + } + function close(response) { + reportGlobalError(response, Error("Connection closed.")); + } + function loadServerReference(bundlerConfig, id, bound) { + var serverReference = resolveServerReference(bundlerConfig, id); + bundlerConfig = preloadModule(serverReference); + return bound + ? Promise.all([bound, bundlerConfig]).then(function (_ref) { + _ref = _ref[0]; + var fn = requireModule(serverReference); + return fn.bind.apply(fn, [null].concat(_ref)); + }) + : bundlerConfig + ? Promise.resolve(bundlerConfig).then(function () { + return requireModule(serverReference); + }) + : Promise.resolve(requireModule(serverReference)); + } + function decodeBoundActionMetaData(body, serverManifest, formFieldPrefix) { + body = createResponse(serverManifest, formFieldPrefix, void 0, body); + close(body); + body = getChunk(body, 0); + body.then(function () {}); + if ("fulfilled" !== body.status) throw body.reason; + return body.value; + } + function createDrainHandler(destination, request) { + return function () { + return startFlowing(request, destination); + }; + } + function createCancelHandler(request, reason) { + return function () { + request.destination = null; + abort(request, Error(reason)); + }; + } + function startReadingFromDebugChannelReadable(request, stream) { + function onData(chunk) { + if ("string" === typeof chunk) { + if (lastWasPartial) { + var JSCompiler_temp_const = stringBuffer; + var JSCompiler_inline_result = new Uint8Array(0); + JSCompiler_inline_result = stringDecoder.decode( + JSCompiler_inline_result + ); + stringBuffer = JSCompiler_temp_const + JSCompiler_inline_result; + lastWasPartial = !1; + } + stringBuffer += chunk; + } else + (stringBuffer += stringDecoder.decode(chunk, decoderOptions)), + (lastWasPartial = !0); + chunk = stringBuffer.split("\n"); + for ( + JSCompiler_temp_const = 0; + JSCompiler_temp_const < chunk.length - 1; + JSCompiler_temp_const++ + ) + resolveDebugMessage(request, chunk[JSCompiler_temp_const]); + stringBuffer = chunk[chunk.length - 1]; + } + function onError(error) { + abort( + request, + Error("Lost connection to the Debug Channel.", { cause: error }) + ); + } + function onClose() { + closeDebugChannel(request); + } + var stringDecoder = new util.TextDecoder(), + lastWasPartial = !1, + stringBuffer = ""; + "function" === typeof stream.addEventListener && + "string" === typeof stream.binaryType + ? ((stream.binaryType = "arraybuffer"), + stream.addEventListener("message", function (event) { + onData(event.data); + }), + stream.addEventListener("error", function (event) { + onError(event.error); + }), + stream.addEventListener("close", onClose)) + : (stream.on("data", onData), + stream.on("error", onError), + stream.on("end", onClose)); + } + function createFakeWritableFromWebSocket(webSocket) { + return { + write: function (chunk) { + webSocket.send(chunk); + return !0; + }, + end: function () { + webSocket.close(); + }, + destroy: function (reason) { + "object" === typeof reason && + null !== reason && + (reason = reason.message); + "string" === typeof reason + ? webSocket.close(1011, reason) + : webSocket.close(1011); + } + }; + } + function createFakeWritableFromReadableStreamController(controller) { + return { + write: function (chunk) { + "string" === typeof chunk && (chunk = textEncoder.encode(chunk)); + controller.enqueue(chunk); + return !0; + }, + end: function () { + controller.close(); + }, + destroy: function (error) { + "function" === typeof controller.error + ? controller.error(error) + : controller.close(); + } + }; + } + function startReadingFromDebugChannelReadableStream(request, stream) { + function progress(_ref) { + var done = _ref.done, + buffer = _ref.value; + _ref = stringBuffer; + done + ? ((buffer = new Uint8Array(0)), + (buffer = stringDecoder.decode(buffer))) + : (buffer = stringDecoder.decode(buffer, decoderOptions)); + stringBuffer = _ref + buffer; + _ref = stringBuffer.split("\n"); + for (buffer = 0; buffer < _ref.length - 1; buffer++) + resolveDebugMessage(request, _ref[buffer]); + stringBuffer = _ref[_ref.length - 1]; + if (done) closeDebugChannel(request); + else return reader.read().then(progress).catch(error); + } + function error(e) { + abort( + request, + Error("Lost connection to the Debug Channel.", { cause: e }) + ); + } + var reader = stream.getReader(), + stringDecoder = new util.TextDecoder(), + stringBuffer = ""; + reader.read().then(progress).catch(error); + } + function createFakeWritableFromNodeReadable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; + } + var stream = require("stream"), + util = require("util"); + require("crypto"); + var async_hooks = require("async_hooks"), + ReactDOM = require("react-dom"), + React = require("react"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); + Symbol.for("react.postpone"); + var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + scheduleMicrotask = queueMicrotask, + currentView = null, + writtenBytes = 0, + destinationHasCapacity = !0, + textEncoder = new util.TextEncoder(), + CLIENT_REFERENCE_TAG$1 = Symbol.for("react.client.reference"), + SERVER_REFERENCE_TAG = Symbol.for("react.server.reference"), + FunctionBind = Function.prototype.bind, + ArraySlice = Array.prototype.slice, + PROMISE_PROTOTYPE = Promise.prototype, + deepProxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "$$id": + return target.$$id; + case "$$async": + return target.$$async; + case "name": + return target.name; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + throw Error( + "Cannot await or return from a thenable. You cannot await a client module from a server component." + ); + } + throw Error( + "Cannot access " + + (String(target.name) + "." + String(name)) + + " on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." + ); + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + proxyHandlers$1 = { + get: function (target, name) { + return getReference(target, name); + }, + getOwnPropertyDescriptor: function (target, name) { + var descriptor = Object.getOwnPropertyDescriptor(target, name); + descriptor || + ((descriptor = { + value: getReference(target, name), + writable: !1, + configurable: !1, + enumerable: !1 + }), + Object.defineProperty(target, name, descriptor)); + return descriptor; + }, + getPrototypeOf: function () { + return PROMISE_PROTOTYPE; + }, + set: function () { + throw Error("Cannot assign to a client module from a server module."); + } + }, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + previousDispatcher = ReactDOMSharedInternals.d; + ReactDOMSharedInternals.d = { + f: previousDispatcher.f, + r: previousDispatcher.r, + D: function (href) { + if ("string" === typeof href && href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "D|" + href; + hints.has(key) || (hints.add(key), emitHint(request, "D", href)); + } else previousDispatcher.D(href); + } + }, + C: function (href, crossOrigin) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = + "C|" + + (null == crossOrigin ? "null" : crossOrigin) + + "|" + + href; + hints.has(key) || + (hints.add(key), + "string" === typeof crossOrigin + ? emitHint(request, "C", [href, crossOrigin]) + : emitHint(request, "C", href)); + } else previousDispatcher.C(href, crossOrigin); + } + }, + L: preload, + m: preloadModule$1, + X: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "X|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "X", [src, options]) + : emitHint(request, "X", src); + } + previousDispatcher.X(src, options); + } + }, + S: function (href, precedence, options) { + if ("string" === typeof href) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "S|" + href; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "S", [ + href, + "string" === typeof precedence ? precedence : 0, + options + ]) + : "string" === typeof precedence + ? emitHint(request, "S", [href, precedence]) + : emitHint(request, "S", href); + } + previousDispatcher.S(href, precedence, options); + } + }, + M: function (src, options) { + if ("string" === typeof src) { + var request = resolveRequest(); + if (request) { + var hints = request.hints, + key = "M|" + src; + if (hints.has(key)) return; + hints.add(key); + return (options = trimOptions(options)) + ? emitHint(request, "M", [src, options]) + : emitHint(request, "M", src); + } + previousDispatcher.M(src, options); + } + } + }; + var currentOwner = null, + getAsyncId = async_hooks.AsyncResource.prototype.asyncId, + pendingOperations = new Map(), + lastRanAwait = null, + emptyStack = [], + framesToSkip = 0, + collectedStackTrace = null, + identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, + frameRegExp = + /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|)\)|(?:async )?(.+):(\d+):(\d+)|)$/, + stackTraceCache = new WeakMap(), + requestStorage = new async_hooks.AsyncLocalStorage(), + componentStorage = new async_hooks.AsyncLocalStorage(), + TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"), + proxyHandlers = { + get: function (target, name) { + switch (name) { + case "$$typeof": + return target.$$typeof; + case "name": + return; + case "displayName": + return; + case "defaultProps": + return; + case "_debugInfo": + return; + case "toJSON": + return; + case Symbol.toPrimitive: + return Object.prototype[Symbol.toPrimitive]; + case Symbol.toStringTag: + return Object.prototype[Symbol.toStringTag]; + case "Provider": + throw Error( + "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider." + ); + case "then": + return; + } + throw Error( + "Cannot access " + + String(name) + + " on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client." + ); + }, + set: function () { + throw Error( + "Cannot assign to a temporary client reference from a server module." + ); + } + }, + SuspenseException = Error( + "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`." + ), + suspendedThenable = null, + currentRequest$1 = null, + thenableIndexCounter = 0, + thenableState = null, + currentComponentDebugInfo = null, + HooksDispatcher = { + readContext: unsupportedContext, + use: function (usable) { + if ( + (null !== usable && "object" === typeof usable) || + "function" === typeof usable + ) { + if ("function" === typeof usable.then) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = []); + return trackUsedThenable(thenableState, usable, index); + } + usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext(); + } + if (isClientReference(usable)) { + if ( + null != usable.value && + usable.value.$$typeof === REACT_CONTEXT_TYPE + ) + throw Error( + "Cannot read a Client Context from a Server Component." + ); + throw Error("Cannot use() an already resolved Client Reference."); + } + throw Error( + "An unsupported type was passed to use(): " + String(usable) + ); + }, + useCallback: function (callback) { + return callback; + }, + useContext: unsupportedContext, + useEffect: unsupportedHook, + useImperativeHandle: unsupportedHook, + useLayoutEffect: unsupportedHook, + useInsertionEffect: unsupportedHook, + useMemo: function (nextCreate) { + return nextCreate(); + }, + useReducer: unsupportedHook, + useRef: unsupportedHook, + useState: unsupportedHook, + useDebugValue: function () {}, + useDeferredValue: unsupportedHook, + useTransition: unsupportedHook, + useSyncExternalStore: unsupportedHook, + useId: function () { + if (null === currentRequest$1) + throw Error("useId can only be used while React is rendering"); + var id = currentRequest$1.identifierCount++; + return ( + "_" + + currentRequest$1.identifierPrefix + + "S_" + + id.toString(32) + + "_" + ); + }, + useHostTransitionStatus: unsupportedHook, + useFormState: unsupportedHook, + useActionState: unsupportedHook, + useOptimistic: unsupportedHook, + useMemoCache: function (size) { + for (var data = Array(size), i = 0; i < size; i++) + data[i] = REACT_MEMO_CACHE_SENTINEL; + return data; + }, + useCacheRefresh: function () { + return unsupportedRefresh; + } + }; + HooksDispatcher.useEffectEvent = unsupportedHook; + var DefaultAsyncDispatcher = { + getCacheForType: function (resourceType) { + var cache = (cache = resolveRequest()) ? cache.cache : new Map(); + var entry = cache.get(resourceType); + void 0 === entry && + ((entry = resourceType()), cache.set(resourceType, entry)); + return entry; + }, + cacheSignal: function () { + var request = resolveRequest(); + return request ? request.cacheController.signal : null; + } + }; + DefaultAsyncDispatcher.getOwner = resolveOwner; + var ReactSharedInternalsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + if (!ReactSharedInternalsServer) + throw Error( + '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.' + ); + var prefix, suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var lastResetTime = 0; + if ( + "object" === typeof performance && + "function" === typeof performance.now + ) { + var localPerformance = performance; + var getCurrentTime = function () { + return localPerformance.now(); + }; + } else { + var localDate = Date; + getCurrentTime = function () { + return localDate.now(); + }; + } + var callComponent = { + react_stack_bottom_frame: function ( + Component, + props, + componentDebugInfo + ) { + currentOwner = componentDebugInfo; + try { + return Component(props, void 0); + } finally { + currentOwner = null; + } + } + }, + callComponentInDEV = + callComponent.react_stack_bottom_frame.bind(callComponent), + callLazyInit = { + react_stack_bottom_frame: function (lazy) { + var init = lazy._init; + return init(lazy._payload); + } + }, + callLazyInitInDEV = + callLazyInit.react_stack_bottom_frame.bind(callLazyInit), + callIterator = { + react_stack_bottom_frame: function (iterator, progress, error) { + iterator.next().then(progress, error); + } + }, + callIteratorInDEV = + callIterator.react_stack_bottom_frame.bind(callIterator), + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + hasOwnProperty = Object.prototype.hasOwnProperty, + doNotLimit = new WeakSet(); + (function () { + async_hooks + .createHook({ + init: function (asyncId, type, triggerAsyncId, resource) { + var trigger = pendingOperations.get(triggerAsyncId); + if ("PROMISE" === type) + if ( + ((type = async_hooks.executionAsyncId()), + type !== triggerAsyncId) + ) { + if (void 0 === trigger) return; + triggerAsyncId = null; + if ( + null === trigger.stack || + (2 !== trigger.tag && 4 !== trigger.tag) + ) { + resource = new WeakRef(resource); + var request = resolveRequest(); + null !== request && + ((triggerAsyncId = parseStackTracePrivate(Error(), 5)), + null === triggerAsyncId || + isAwaitInUserspace(request, triggerAsyncId) || + (triggerAsyncId = null)); + } else + (triggerAsyncId = emptyStack), + (resource = + void 0 !== resource._debugInfo + ? new WeakRef(resource) + : trigger.promise); + type = pendingOperations.get(type); + trigger = { + tag: 4, + owner: resolveOwner(), + stack: triggerAsyncId, + start: performance.now(), + end: -1.1, + promise: resource, + awaited: trigger, + previous: void 0 === type ? null : type + }; + } else + (type = resolveOwner()), + (trigger = { + tag: 3, + owner: type, + stack: + null === type ? null : parseStackTracePrivate(Error(), 5), + start: performance.now(), + end: -1.1, + promise: new WeakRef(resource), + awaited: void 0 === trigger ? null : trigger, + previous: null + }); + else if ( + "bound-anonymous-fn" === type || + "Microtask" === type || + "TickObject" === type || + "Immediate" === type + ) { + if (void 0 === trigger) return; + } else if (void 0 === trigger) + (trigger = resolveOwner()), + (trigger = { + tag: 0, + owner: trigger, + stack: + null === trigger + ? parseStackTracePrivate(Error(), 3) + : null, + start: performance.now(), + end: -1.1, + promise: null, + awaited: null, + previous: null + }); + else if (2 === trigger.tag || 4 === trigger.tag) + (resource = resolveOwner()), + (trigger = { + tag: 0, + owner: resource, + stack: + null === resource + ? parseStackTracePrivate(Error(), 3) + : null, + start: performance.now(), + end: -1.1, + promise: null, + awaited: null, + previous: trigger + }); + pendingOperations.set(asyncId, trigger); + }, + before: function (asyncId) { + asyncId = pendingOperations.get(asyncId); + if (void 0 !== asyncId) + switch (asyncId.tag) { + case 0: + lastRanAwait = null; + asyncId.end = performance.now(); + break; + case 4: + lastRanAwait = resolvePromiseOrAwaitNode( + asyncId, + performance.now() + ); + break; + case 2: + lastRanAwait = asyncId; + break; + case 3: + resolvePromiseOrAwaitNode( + asyncId, + performance.now() + ).previous = lastRanAwait; + lastRanAwait = null; + break; + default: + lastRanAwait = null; + } + }, + promiseResolve: function (asyncId) { + var node = pendingOperations.get(asyncId); + if (void 0 !== node) { + switch (node.tag) { + case 4: + case 3: + node = resolvePromiseOrAwaitNode(node, performance.now()); + break; + case 2: + case 1: + break; + default: + throw Error( + "A Promise should never be an IO_NODE. This is a bug in React." + ); + } + var currentAsyncId = async_hooks.executionAsyncId(); + asyncId !== currentAsyncId && + ((asyncId = pendingOperations.get(currentAsyncId)), + 1 === node.tag + ? (node.awaited = void 0 === asyncId ? null : asyncId) + : void 0 !== asyncId && + ((currentAsyncId = { + tag: 2, + owner: node.owner, + stack: node.stack, + start: node.start, + end: node.end, + promise: node.promise, + awaited: node.awaited, + previous: node.previous + }), + (node.start = node.end), + (node.end = performance.now()), + (node.previous = currentAsyncId), + (node.awaited = asyncId))); + } + }, + destroy: function (asyncId) { + pendingOperations.delete(asyncId); + } + }) + .enable(); + })(); + "object" === typeof console && + null !== console && + (patchConsole(console, "assert"), + patchConsole(console, "debug"), + patchConsole(console, "dir"), + patchConsole(console, "dirxml"), + patchConsole(console, "error"), + patchConsole(console, "group"), + patchConsole(console, "groupCollapsed"), + patchConsole(console, "groupEnd"), + patchConsole(console, "info"), + patchConsole(console, "log"), + patchConsole(console, "table"), + patchConsole(console, "trace"), + patchConsole(console, "warn")); + var ObjectPrototype = Object.prototype, + stringify = JSON.stringify, + ABORTING = 12, + CLOSED = 14, + defaultPostponeHandler = noop, + currentRequest = null, + canEmitDebugInfo = !1, + serializedSize = 0, + MAX_ROW_SIZE = 3200, + modelRoot = !1, + CONSTRUCTOR_MARKER = Symbol(), + debugModelRoot = null, + debugNoOutline = null, + emptyRoot = {}, + decoderOptions = { stream: !0 }, + asyncModuleCache = new Map(); + Chunk.prototype = Object.create(Promise.prototype); + Chunk.prototype.then = function (resolve, reject) { + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + } + switch (this.status) { + case "fulfilled": + resolve(this.value); + break; + case "pending": + case "blocked": + case "cyclic": + resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + default: + reject(this.reason); + } + }; + var initializingChunk = null, + initializingChunkBlockedModel = null; + exports.createClientModuleProxy = function (moduleId) { + moduleId = registerClientReferenceImpl({}, moduleId, !1); + return new Proxy(moduleId, proxyHandlers$1); + }; + exports.createTemporaryReferenceSet = function () { + return new WeakMap(); + }; + exports.decodeAction = function (body, serverManifest) { + var formData = new FormData(), + action = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_") + ? key.startsWith("$ACTION_REF_") + ? ((value = "$ACTION_" + key.slice(12) + ":"), + (value = decodeBoundActionMetaData(body, serverManifest, value)), + (action = loadServerReference( + serverManifest, + value.id, + value.bound + ))) + : key.startsWith("$ACTION_ID_") && + ((value = key.slice(11)), + (action = loadServerReference(serverManifest, value, null))) + : formData.append(key, value); + }); + return null === action + ? null + : action.then(function (fn) { + return fn.bind(null, formData); + }); + }; + exports.decodeFormState = function (actionResult, body, serverManifest) { + var keyPath = body.get("$ACTION_KEY"); + if ("string" !== typeof keyPath) return Promise.resolve(null); + var metaData = null; + body.forEach(function (value, key) { + key.startsWith("$ACTION_REF_") && + ((value = "$ACTION_" + key.slice(12) + ":"), + (metaData = decodeBoundActionMetaData(body, serverManifest, value))); + }); + if (null === metaData) return Promise.resolve(null); + var referenceId = metaData.id; + return Promise.resolve(metaData.bound).then(function (bound) { + return null === bound + ? null + : [actionResult, keyPath, referenceId, bound.length - 1]; + }); + }; + exports.decodeReply = function (body, webpackMap, options) { + if ("string" === typeof body) { + var form = new FormData(); + form.append("0", body); + body = form; + } + body = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0, + body + ); + webpackMap = getChunk(body, 0); + close(body); + return webpackMap; + }; + exports.decodeReplyFromAsyncIterable = function ( + iterable, + webpackMap, + options + ) { + function progress(entry) { + if (entry.done) close(response); + else { + var _entry$value = entry.value; + entry = _entry$value[0]; + _entry$value = _entry$value[1]; + "string" === typeof _entry$value + ? resolveField(response, entry, _entry$value) + : response._formData.append(entry, _entry$value); + iterator.next().then(progress, error); + } + } + function error(reason) { + reportGlobalError(response, reason); + "function" === typeof iterator.throw && + iterator.throw(reason).then(error, error); + } + var iterator = iterable[ASYNC_ITERATOR](), + response = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0 + ); + iterator.next().then(progress, error); + return getChunk(response, 0); + }; + exports.decodeReplyFromBusboy = function ( + busboyStream, + webpackMap, + options + ) { + var response = createResponse( + webpackMap, + "", + options ? options.temporaryReferences : void 0 + ), + pendingFiles = 0, + queuedFields = []; + busboyStream.on("field", function (name, value) { + 0 < pendingFiles + ? queuedFields.push(name, value) + : resolveField(response, name, value); + }); + busboyStream.on("file", function (name, value, _ref2) { + var filename = _ref2.filename, + mimeType = _ref2.mimeType; + if ("base64" === _ref2.encoding.toLowerCase()) + throw Error( + "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it." + ); + pendingFiles++; + var JSCompiler_object_inline_chunks_251 = []; + value.on("data", function (chunk) { + JSCompiler_object_inline_chunks_251.push(chunk); + }); + value.on("end", function () { + var blob = new Blob(JSCompiler_object_inline_chunks_251, { + type: mimeType + }); + response._formData.append(name, blob, filename); + pendingFiles--; + if (0 === pendingFiles) { + for (blob = 0; blob < queuedFields.length; blob += 2) + resolveField( + response, + queuedFields[blob], + queuedFields[blob + 1] + ); + queuedFields.length = 0; + } + }); + }); + busboyStream.on("finish", function () { + close(response); + }); + busboyStream.on("error", function (err) { + reportGlobalError(response, err); + }); + return getChunk(response, 0); + }; + exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = createPrerenderRequest( + model, + webpackMap, + function () { + var writable, + stream = new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = + createFakeWritableFromReadableStreamController( + controller + ); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + !1 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; + exports.prerenderToNodeStream = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = createPrerenderRequest( + model, + webpackMap, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritableFromNodeReadable(readable); + resolve({ prelude: readable }); + }, + reject, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + !1 + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; + exports.registerClientReference = function ( + proxyImplementation, + id, + exportName + ) { + return registerClientReferenceImpl( + proxyImplementation, + id + "#" + exportName, + !1 + ); + }; + exports.registerServerReference = function (reference, id, exportName) { + return Object.defineProperties(reference, { + $$typeof: { value: SERVER_REFERENCE_TAG }, + $$id: { + value: null === exportName ? id : id + "#" + exportName, + configurable: !0 + }, + $$bound: { value: null, configurable: !0 }, + $$location: { value: Error("react-stack-top-frame"), configurable: !0 }, + bind: { value: bind, configurable: !0 } + }); + }; + exports.renderToPipeableStream = function (model, webpackMap, options) { + var debugChannel = options ? options.debugChannel : void 0, + debugChannelReadable = + void 0 === debugChannel || + ("function" !== typeof debugChannel.read && + "number" !== typeof debugChannel.readyState) + ? void 0 + : debugChannel; + debugChannel = + void 0 !== debugChannel + ? "function" === typeof debugChannel.write + ? debugChannel + : "function" === typeof debugChannel.send + ? createFakeWritableFromWebSocket(debugChannel) + : void 0 + : void 0; + var request = createRequest( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + void 0 !== debugChannelReadable + ), + hasStartedFlowing = !1; + startWork(request); + void 0 !== debugChannel && startFlowingDebug(request, debugChannel); + void 0 !== debugChannelReadable && + startReadingFromDebugChannelReadable(request, debugChannelReadable); + return { + pipe: function (destination) { + if (hasStartedFlowing) + throw Error( + "React currently only supports piping to one writable stream." + ); + hasStartedFlowing = !0; + startFlowing(request, destination); + destination.on("drain", createDrainHandler(destination, request)); + destination.on( + "error", + createCancelHandler( + request, + "The destination stream errored while writing data." + ) + ); + if (void 0 === debugChannelReadable) + destination.on( + "close", + createCancelHandler( + request, + "The destination stream closed early." + ) + ); + return destination; + }, + abort: function (reason) { + abort(request, reason); + } + }; + }; + exports.renderToReadableStream = function (model, webpackMap, options) { + var debugChannelReadable = + options && options.debugChannel + ? options.debugChannel.readable + : void 0, + debugChannelWritable = + options && options.debugChannel + ? options.debugChannel.writable + : void 0, + request = createRequest( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + void 0 !== debugChannelReadable + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + if (void 0 !== debugChannelWritable) { + var debugWritable; + new ReadableStream( + { + type: "bytes", + start: function (controller) { + debugWritable = + createFakeWritableFromReadableStreamController(controller); + }, + pull: function () { + startFlowingDebug(request, debugWritable); + } + }, + { highWaterMark: 0 } + ).pipeTo(debugChannelWritable); + } + void 0 !== debugChannelReadable && + startReadingFromDebugChannelReadableStream( + request, + debugChannelReadable + ); + var writable; + return new ReadableStream( + { + type: "bytes", + start: function (controller) { + writable = + createFakeWritableFromReadableStreamController(controller); + startWork(request); + }, + pull: function () { + startFlowing(request, writable); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + }; + })(); diff --git a/.socket/blob/3356331f60e8999db217dfab41a14439c03c7322aefc4beba2b13b80b209fbfb b/.socket/blob/3356331f60e8999db217dfab41a14439c03c7322aefc4beba2b13b80b209fbfb new file mode 100644 index 0000000..35fe853 --- /dev/null +++ b/.socket/blob/3356331f60e8999db217dfab41a14439c03c7322aefc4beba2b13b80b209fbfb @@ -0,0 +1,5056 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-client.browser.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function resolveClientReference(bundlerConfig, metadata) { + if (bundlerConfig) { + var moduleExports = bundlerConfig[metadata[0]]; + if ((bundlerConfig = moduleExports && (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0))) + moduleExports = bundlerConfig.name; + else { + bundlerConfig = moduleExports && moduleExports["*"]; + if (!bundlerConfig) + throw Error( + 'Could not find the module "' + + metadata[0] + + '" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.' + ); + moduleExports = metadata[2]; + } + return 4 === metadata.length + ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1] + : [bundlerConfig.id, bundlerConfig.chunks, moduleExports]; + } + return metadata; + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = __turbopack_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + i++ + ) { + var thenable = __turbopack_load_by_url__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = __turbopack_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function processReply( + root, + formFieldPrefix, + temporaryReferences, + resolve, + reject + ) { + function serializeTypedArray(tag, typedArray) { + typedArray = new Blob([ + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ]); + var blobId = nextPartId++; + null === formData && (formData = new FormData()); + formData.append(formFieldPrefix + blobId, typedArray); + return "$" + tag + blobId.toString(16); + } + function serializeBinaryReader(reader) { + function progress(entry) { + entry.done + ? ((entry = nextPartId++), + data.append(formFieldPrefix + entry, new Blob(buffer)), + data.append( + formFieldPrefix + streamId, + '"$o' + entry.toString(16) + '"' + ), + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data)) + : (buffer.push(entry.value), + reader.read(new Uint8Array(1024)).then(progress, reject)); + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++, + buffer = []; + reader.read(new Uint8Array(1024)).then(progress, reject); + return "$r" + streamId.toString(16); + } + function serializeReader(reader) { + function progress(entry) { + if (entry.done) + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON); + reader.read().then(progress, reject); + } catch (x) { + reject(x); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + reader.read().then(progress, reject); + return "$R" + streamId.toString(16); + } + function serializeReadableStream(stream) { + try { + var binaryReader = stream.getReader({ mode: "byob" }); + } catch (x) { + return serializeReader(stream.getReader()); + } + return serializeBinaryReader(binaryReader); + } + function serializeAsyncIterable(iterable, iterator) { + function progress(entry) { + if (entry.done) { + if (void 0 === entry.value) + data.append(formFieldPrefix + streamId, "C"); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, "C" + partJSON); + } catch (x) { + reject(x); + return; + } + pendingParts--; + 0 === pendingParts && resolve(data); + } else + try { + var _partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, _partJSON); + iterator.next().then(progress, reject); + } catch (x$0) { + reject(x$0); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + iterable = iterable === iterator; + iterator.next().then(progress, reject); + return "$" + (iterable ? "x" : "X") + streamId.toString(16); + } + function resolveToJSON(key, value) { + var originalValue = this[key]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + ("Object" !== objectName(originalValue) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(this, key) + ) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(this, key) + )); + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) { + var parentReference = writtenObjects.get(this); + if (void 0 !== parentReference) + return ( + temporaryReferences.set(parentReference + ":" + key, value), + "$T" + ); + } + throw Error( + "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + case REACT_LAZY_TYPE: + originalValue = value._payload; + var init = value._init; + null === formData && (formData = new FormData()); + pendingParts++; + try { + parentReference = init(originalValue); + var lazyId = nextPartId++, + partJSON = serializeModel(parentReference, lazyId); + formData.append(formFieldPrefix + lazyId, partJSON); + return "$" + lazyId.toString(16); + } catch (x) { + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + pendingParts++; + var _lazyId = nextPartId++; + parentReference = function () { + try { + var _partJSON2 = serializeModel(value, _lazyId), + _data = formData; + _data.append(formFieldPrefix + _lazyId, _partJSON2); + pendingParts--; + 0 === pendingParts && resolve(_data); + } catch (reason) { + reject(reason); + } + }; + x.then(parentReference, parentReference); + return "$" + _lazyId.toString(16); + } + reject(x); + return null; + } finally { + pendingParts--; + } + } + if ("function" === typeof value.then) { + null === formData && (formData = new FormData()); + pendingParts++; + var promiseId = nextPartId++; + value.then(function (partValue) { + try { + var _partJSON3 = serializeModel(partValue, promiseId); + partValue = formData; + partValue.append(formFieldPrefix + promiseId, _partJSON3); + pendingParts--; + 0 === pendingParts && resolve(partValue); + } catch (reason) { + reject(reason); + } + }, reject); + return "$@" + promiseId.toString(16); + } + parentReference = writtenObjects.get(value); + if (void 0 !== parentReference) + if (modelRoot === value) modelRoot = null; + else return parentReference; + else + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference && + ((parentReference = parentReference + ":" + key), + writtenObjects.set(value, parentReference), + void 0 !== temporaryReferences && + temporaryReferences.set(parentReference, value))); + if (isArrayImpl(value)) return value; + if (value instanceof FormData) { + null === formData && (formData = new FormData()); + var _data3 = formData; + key = nextPartId++; + var prefix = formFieldPrefix + key + "_"; + value.forEach(function (originalValue, originalKey) { + _data3.append(prefix + originalKey, originalValue); + }); + return "$K" + key.toString(16); + } + if (value instanceof Map) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$Q" + key.toString(16) + ); + if (value instanceof Set) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$W" + key.toString(16) + ); + if (value instanceof ArrayBuffer) + return ( + (key = new Blob([value])), + (parentReference = nextPartId++), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + parentReference, key), + "$A" + parentReference.toString(16) + ); + if (value instanceof Int8Array) + return serializeTypedArray("O", value); + if (value instanceof Uint8Array) + return serializeTypedArray("o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray("U", value); + if (value instanceof Int16Array) + return serializeTypedArray("S", value); + if (value instanceof Uint16Array) + return serializeTypedArray("s", value); + if (value instanceof Int32Array) + return serializeTypedArray("L", value); + if (value instanceof Uint32Array) + return serializeTypedArray("l", value); + if (value instanceof Float32Array) + return serializeTypedArray("G", value); + if (value instanceof Float64Array) + return serializeTypedArray("g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray("M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray("m", value); + if (value instanceof DataView) return serializeTypedArray("V", value); + if ("function" === typeof Blob && value instanceof Blob) + return ( + null === formData && (formData = new FormData()), + (key = nextPartId++), + formData.append(formFieldPrefix + key, value), + "$B" + key.toString(16) + ); + if ((parentReference = getIteratorFn(value))) + return ( + (parentReference = parentReference.call(value)), + parentReference === value + ? ((key = nextPartId++), + (parentReference = serializeModel( + Array.from(parentReference), + key + )), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$i" + key.toString(16)) + : Array.from(parentReference) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(value); + parentReference = value[ASYNC_ITERATOR]; + if ("function" === typeof parentReference) + return serializeAsyncIterable(value, parentReference.call(value)); + parentReference = getPrototypeOf(value); + if ( + parentReference !== ObjectPrototype && + (null === parentReference || + null !== getPrototypeOf(parentReference)) + ) { + if (void 0 === temporaryReferences) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(this, key) + ); + return "$T"; + } + value.$$typeof === REACT_CONTEXT_TYPE + ? console.error( + "React Context Providers cannot be passed to Server Functions from the Client.%s", + describeObjectForErrorMessage(this, key) + ) + : "Object" !== objectName(value) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(this, key) + ) + : isSimpleObject(value) + ? Object.getOwnPropertySymbols && + ((parentReference = Object.getOwnPropertySymbols(value)), + 0 < parentReference.length && + console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s", + parentReference[0].description, + describeObjectForErrorMessage(this, key) + )) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(this, key) + ); + return value; + } + if ("string" === typeof value) { + if ("Z" === value[value.length - 1] && this[key] instanceof Date) + return "$D" + value; + key = "$" === value[0] ? "$" + value : value; + return key; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + parentReference = knownServerReferences.get(value); + if (void 0 !== parentReference) + return ( + (key = JSON.stringify( + { id: parentReference.id, bound: parentReference.bound }, + resolveToJSON + )), + null === formData && (formData = new FormData()), + (parentReference = nextPartId++), + formData.set(formFieldPrefix + parentReference, key), + "$F" + parentReference.toString(16) + ); + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again." + ); + } + if ("symbol" === typeof value) { + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported as an argument to a Server Function." + ); + } + function serializeModel(model, id) { + "object" === typeof model && + null !== model && + ((id = "$" + id.toString(16)), + writtenObjects.set(model, id), + void 0 !== temporaryReferences && temporaryReferences.set(id, model)); + modelRoot = model; + return JSON.stringify(model, resolveToJSON); + } + var nextPartId = 1, + pendingParts = 0, + formData = null, + writtenObjects = new WeakMap(), + modelRoot = root, + json = serializeModel(root, 0); + null === formData + ? resolve(json) + : (formData.set(formFieldPrefix + "0", json), + 0 === pendingParts && resolve(formData)); + return function () { + 0 < pendingParts && + ((pendingParts = 0), + null === formData ? resolve(json) : resolve(formData)); + }; + } + function createFakeServerFunction( + name, + filename, + sourceMap, + line, + col, + environmentName, + innerFunction + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 >= line + ? ((line = encodedName.length + 7), + (col = + "s=>({" + + encodedName + + " ".repeat(col < line ? 0 : col - line) + + ":(...args) => s(...args)})\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */")) + : (col = + "/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */" + + "\n".repeat(line - 2) + + "server=>({" + + encodedName + + ":\n" + + " ".repeat(1 > col ? 0 : col - 1) + + "(...args) => server(...args)})"); + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((col += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?s" + + fakeServerFunctionIdx++), + (col += "\n//# sourceMappingURL=" + sourceMap)) + : filename && (col += "\n//# sourceURL=" + filename); + try { + return (0, eval)(col)(innerFunction)[name]; + } catch (x) { + return innerFunction; + } + } + function registerBoundServerReference(reference, id, bound) { + knownServerReferences.has(reference) || + knownServerReferences.set(reference, { + id: id, + originalBind: reference.bind, + bound: bound + }); + } + function createBoundServerReference( + metaData, + callServer, + encodeFormAction, + findSourceMapURL + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return bound + ? "fulfilled" === bound.status + ? callServer(id, bound.value.concat(args)) + : Promise.resolve(bound).then(function (boundArgs) { + return callServer(id, boundArgs.concat(args)); + }) + : callServer(id, args); + } + var id = metaData.id, + bound = metaData.bound, + location = metaData.location; + if (location) { + encodeFormAction = metaData.name || ""; + var filename = location[1], + line = location[2]; + location = location[3]; + metaData = metaData.env || "Server"; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, metaData); + action = createFakeServerFunction( + encodeFormAction, + filename, + findSourceMapURL, + line, + location, + metaData, + action + ); + } + registerBoundServerReference(action, id, bound); + return action; + } + function parseStackLocation(error) { + error = error.stack; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + var endOfFirst = error.indexOf("\n"); + if (-1 !== endOfFirst) { + var endOfSecond = error.indexOf("\n", endOfFirst + 1); + endOfFirst = + -1 === endOfSecond + ? error.slice(endOfFirst + 1) + : error.slice(endOfFirst + 1, endOfSecond); + } else endOfFirst = error; + error = v8FrameRegExp.exec(endOfFirst); + if ( + !error && + ((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error) + ) + return null; + endOfFirst = error[1] || ""; + "" === endOfFirst && (endOfFirst = ""); + endOfSecond = error[2] || error[5] || ""; + "" === endOfSecond && (endOfSecond = ""); + return [ + endOfFirst, + endOfSecond, + +(error[3] || error[6]), + +(error[4] || error[7]) + ]; + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE + ? null + : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + 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"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ( + ("number" === typeof type.tag && + console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), + type.$$typeof) + ) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: + return ( + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" + ); + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) {} + } + return null; + } + function getArrayKind(array) { + for (var kind = 0, i = 0; i < array.length && 100 > i; i++) { + var value = array[i]; + if ("object" === typeof value && null !== value) + if ( + isArrayImpl(value) && + 2 === value.length && + "string" === typeof value[0] + ) { + if (0 !== kind && 3 !== kind) return 1; + kind = 3; + } else return 1; + else { + if ( + "function" === typeof value || + ("string" === typeof value && 50 < value.length) || + (0 !== kind && 2 !== kind) + ) + return 1; + kind = 2; + } + } + return kind; + } + function addObjectToProperties(object, properties, indent, prefix) { + var addedProperties = 0, + key; + for (key in object) + if ( + hasOwnProperty.call(object, key) && + "_" !== key[0] && + (addedProperties++, + addValueToProperties(key, object[key], properties, indent, prefix), + 100 <= addedProperties) + ) { + properties.push([ + prefix + + "\u00a0\u00a0".repeat(indent) + + "Only 100 properties are shown. React will not log more properties of this object.", + "" + ]); + break; + } + } + function addValueToProperties( + propertyName, + value, + properties, + indent, + prefix + ) { + switch (typeof value) { + case "object": + if (null === value) { + value = "null"; + break; + } else { + if (value.$$typeof === REACT_ELEMENT_TYPE) { + var typeName = getComponentNameFromType(value.type) || "\u2026", + key = value.key; + value = value.props; + var propsKeys = Object.keys(value), + propsLength = propsKeys.length; + if (null == key && 0 === propsLength) { + value = "<" + typeName + " />"; + break; + } + if ( + 3 > indent || + (1 === propsLength && + "children" === propsKeys[0] && + null == key) + ) { + value = "<" + typeName + " \u2026 />"; + break; + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "<" + typeName + ]); + null !== key && + addValueToProperties( + "key", + key, + properties, + indent + 1, + prefix + ); + propertyName = !1; + key = 0; + for (var propKey in value) + if ( + (key++, + "children" === propKey + ? null != value.children && + (!isArrayImpl(value.children) || + 0 < value.children.length) && + (propertyName = !0) + : hasOwnProperty.call(value, propKey) && + "_" !== propKey[0] && + addValueToProperties( + propKey, + value[propKey], + properties, + indent + 1, + prefix + ), + 100 <= key) + ) + break; + properties.push([ + "", + propertyName ? ">\u2026" : "/>" + ]); + return; + } + typeName = Object.prototype.toString.call(value); + propKey = typeName.slice(8, typeName.length - 1); + if ("Array" === propKey) + if ( + ((typeName = 100 < value.length), + (key = getArrayKind(value)), + 2 === key || 0 === key) + ) { + value = JSON.stringify( + typeName ? value.slice(0, 100).concat("\u2026") : value + ); + break; + } else if (3 === key) { + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "" + ]); + for ( + propertyName = 0; + propertyName < value.length && 100 > propertyName; + propertyName++ + ) + (propKey = value[propertyName]), + addValueToProperties( + propKey[0], + propKey[1], + properties, + indent + 1, + prefix + ); + typeName && + addValueToProperties( + (100).toString(), + "\u2026", + properties, + indent + 1, + prefix + ); + return; + } + if ("Promise" === propKey) { + if ("fulfilled" === value.status) { + if ( + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.value, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = + "Promise<" + (properties[1] || "Object") + ">"; + return; + } + } else if ( + "rejected" === value.status && + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.reason, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = "Rejected Promise<" + properties[1] + ">"; + return; + } + properties.push([ + "\u00a0\u00a0".repeat(indent) + propertyName, + "Promise" + ]); + return; + } + "Object" === propKey && + (typeName = Object.getPrototypeOf(value)) && + "function" === typeof typeName.constructor && + (propKey = typeName.constructor.name); + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "Object" === propKey ? (3 > indent ? "" : "\u2026") : propKey + ]); + 3 > indent && + addObjectToProperties(value, properties, indent + 1, prefix); + return; + } + case "function": + value = "" === value.name ? "() => {}" : value.name + "() {}"; + break; + case "string": + value = + "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects." === + value + ? "\u2026" + : JSON.stringify(value); + break; + case "undefined": + value = "undefined"; + break; + case "boolean": + value = value ? "true" : "false"; + break; + default: + value = String(value); + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + value + ]); + } + function getIODescription(value) { + try { + switch (typeof value) { + case "function": + return value.name || ""; + case "object": + if (null === value) return ""; + if (value instanceof Error) return String(value.message); + if ("string" === typeof value.url) return value.url; + if ("string" === typeof value.href) return value.href; + if ("string" === typeof value.src) return value.src; + if ("string" === typeof value.currentSrc) return value.currentSrc; + if ("string" === typeof value.command) return value.command; + if ( + "object" === typeof value.request && + null !== value.request && + "string" === typeof value.request.url + ) + return value.request.url; + if ( + "object" === typeof value.response && + null !== value.response && + "string" === typeof value.response.url + ) + return value.response.url; + if ( + "string" === typeof value.id || + "number" === typeof value.id || + "bigint" === typeof value.id + ) + return String(value.id); + if ("string" === typeof value.name) return value.name; + var str = value.toString(); + return str.startsWith("[object ") || + 5 > str.length || + 500 < str.length + ? "" + : str; + case "string": + return 5 > value.length || 500 < value.length ? "" : value; + case "number": + case "bigint": + return String(value); + default: + return ""; + } + } catch (x) { + return ""; + } + } + function markAllTracksInOrder() { + supportsUserTiming && + (console.timeStamp( + "Server Requests Track", + 0.001, + 0.001, + "Server Requests \u269b", + void 0, + "primary-light" + ), + console.timeStamp( + "Server Components Track", + 0.001, + 0.001, + "Primary", + "Server Components \u269b", + "primary-light" + )); + } + function getIOColor(functionName) { + switch (functionName.charCodeAt(0) % 3) { + case 0: + return "tertiary-light"; + case 1: + return "tertiary"; + default: + return "tertiary-dark"; + } + } + function getIOLongName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + description = + "" === description ? ioInfo : ioInfo + " (" + description + ")"; + return env === rootEnv || void 0 === env + ? description + : description + " [" + env + "]"; + } + function getIOShortName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + env = env === rootEnv || void 0 === env ? "" : " [" + env + "]"; + var desc = ""; + rootEnv = 30 - ioInfo.length - env.length; + if (1 < rootEnv) { + var l = description.length; + if (0 < l && l <= rootEnv) desc = " (" + description + ")"; + else if ( + description.startsWith("http://") || + description.startsWith("https://") || + description.startsWith("/") + ) { + var queryIdx = description.indexOf("?"); + -1 === queryIdx && (queryIdx = description.length); + 47 === description.charCodeAt(queryIdx - 1) && queryIdx--; + desc = description.lastIndexOf("/", queryIdx - 1); + queryIdx - desc < rootEnv + ? (desc = " (\u2026" + description.slice(desc, queryIdx) + ")") + : ((l = description.slice(desc, desc + rootEnv / 2)), + (description = description.slice( + queryIdx - rootEnv / 2, + queryIdx + )), + (desc = + " (" + + (0 < desc ? "\u2026" : "") + + l + + "\u2026" + + description + + ")")); + } + } + return ioInfo + desc + env; + } + function logComponentAwait( + asyncInfo, + trackIdx, + startTime, + endTime, + rootEnv, + value + ) { + if (supportsUserTiming && 0 < endTime) { + var description = getIODescription(value), + name = getIOShortName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ), + entryName = "await " + name; + name = getIOColor(name); + var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("awaited value", value, properties, 0, ""); + asyncInfo = getIOLongName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: name, + track: trackNames[trackIdx], + trackGroup: "Server Components \u269b", + properties: properties, + tooltipText: asyncInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + trackNames[trackIdx], + "Server Components \u269b", + name + ); + } + } + function logIOInfoErrored(ioInfo, rootEnv, error) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(error), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + debugTask + ? ((error = [ + [ + "rejected with", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]), + (ioInfo = + getIOLongName(ioInfo, description, ioInfo.env, rootEnv) + + " Rejected"), + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: "Server Requests \u269b", + properties: error, + tooltipText: ioInfo + } + } + }) + ), + performance.clearMeasures(entryName)) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + "error" + ); + } + } + function logIOInfo(ioInfo, rootEnv, value) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(value), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + color = getIOColor(entryName), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("Resolved", value, properties, 0, ""); + ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: color, + track: "Server Requests \u269b", + properties: properties, + tooltipText: ioInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + color + ); + } + } + function ReactPromise(status, value, reason) { + this.status = status; + this.value = value; + this.reason = reason; + this._children = []; + this._debugChunk = null; + this._debugInfo = []; + } + function unwrapWeakResponse(weakResponse) { + weakResponse = weakResponse.weak.deref(); + if (void 0 === weakResponse) + throw Error( + "We did not expect to receive new data after GC:ing the response." + ); + return weakResponse; + } + function closeDebugChannel(debugChannel) { + debugChannel.callback && debugChannel.callback(""); + } + function readChunk(chunk) { + switch (chunk.status) { + case "resolved_model": + initializeModelChunk(chunk); + break; + case "resolved_module": + initializeModuleChunk(chunk); + } + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "pending": + case "blocked": + case "halted": + throw chunk; + default: + throw chunk.reason; + } + } + function getRoot(weakResponse) { + weakResponse = unwrapWeakResponse(weakResponse); + return getChunk(weakResponse, 0); + } + function createPendingChunk(response) { + 0 === response._pendingChunks++ && + ((response._weakResponse.response = response), + null !== response._pendingInitialRender && + (clearTimeout(response._pendingInitialRender), + (response._pendingInitialRender = null))); + return new ReactPromise("pending", null, null); + } + function releasePendingChunk(response, chunk) { + "pending" === chunk.status && + 0 === --response._pendingChunks && + ((response._weakResponse.response = null), + (response._pendingInitialRender = setTimeout( + flushInitialRenderPerformance.bind(null, response), + 100 + ))); + } + function moveDebugInfoFromChunkToInnerValue(chunk, value) { + value = resolveLazy(value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) || + ((chunk = chunk._debugInfo.splice(0)), + isArrayImpl(value._debugInfo) + ? value._debugInfo.unshift.apply(value._debugInfo, chunk) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: chunk + })); + } + function wakeChunk(listeners, value, chunk) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + moveDebugInfoFromChunkToInnerValue(chunk, value); + } + function rejectChunk(listeners, error) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(error) + : rejectReference(listener, error); + } + } + function resolveBlockedCycle(resolvedChunk, reference) { + var referencedChunk = reference.handler.chunk; + if (null === referencedChunk) return null; + if (referencedChunk === resolvedChunk) return reference.handler; + reference = referencedChunk.value; + if (null !== reference) + for ( + referencedChunk = 0; + referencedChunk < reference.length; + referencedChunk++ + ) { + var listener = reference[referencedChunk]; + if ( + "function" !== typeof listener && + ((listener = resolveBlockedCycle(resolvedChunk, listener)), + null !== listener) + ) + return listener; + } + return null; + } + function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) { + switch (chunk.status) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + break; + case "blocked": + for (var i = 0; i < resolveListeners.length; i++) { + var listener = resolveListeners[i]; + if ("function" !== typeof listener) { + var cyclicHandler = resolveBlockedCycle(chunk, listener); + if (null !== cyclicHandler) + switch ( + (fulfillReference(listener, cyclicHandler.value, chunk), + resolveListeners.splice(i, 1), + i--, + null !== rejectListeners && + ((listener = rejectListeners.indexOf(listener)), + -1 !== listener && rejectListeners.splice(listener, 1)), + chunk.status) + ) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + return; + case "rejected": + null !== rejectListeners && + rejectChunk(rejectListeners, chunk.reason); + return; + } + } + } + case "pending": + if (chunk.value) + for (i = 0; i < resolveListeners.length; i++) + chunk.value.push(resolveListeners[i]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for ( + resolveListeners = 0; + resolveListeners < rejectListeners.length; + resolveListeners++ + ) + chunk.reason.push(rejectListeners[resolveListeners]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && rejectChunk(rejectListeners, chunk.reason); + } + } + function triggerErrorOnChunk(response, chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + releasePendingChunk(response, chunk); + var listeners = chunk.reason; + if ("pending" === chunk.status && null != chunk._debugChunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + initializeDebugChunk(response, chunk); + } finally { + (initializingHandler = prevHandler), + (initializingChunk = prevChunk); + } + } + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && rejectChunk(listeners, error); + } + } + function createResolvedModelChunk(response, value) { + return new ReactPromise("resolved_model", value, response); + } + function createResolvedIteratorResultChunk(response, value, done) { + return new ReactPromise( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + response + ); + } + function resolveIteratorResultChunk(response, chunk, value, done) { + resolveModelChunk( + response, + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}" + ); + } + function resolveModelChunk(response, chunk, value) { + if ("pending" !== chunk.status) chunk.reason.enqueueModel(value); + else { + releasePendingChunk(response, chunk); + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = response; + null !== resolveListeners && + (initializeModelChunk(chunk), + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners)); + } + } + function resolveModuleChunk(response, chunk, value) { + if ("pending" === chunk.status || "blocked" === chunk.status) { + releasePendingChunk(response, chunk); + response = chunk.value; + var rejectListeners = chunk.reason; + chunk.status = "resolved_module"; + chunk.value = value; + value = value[1]; + for (var debugInfo = [], i = 0; i < value.length; ) { + var chunkFilename = value[i++], + href = void 0, + target = debugInfo, + ioInfo = chunkIOInfoCache.get(chunkFilename); + if (void 0 === ioInfo) { + try { + href = new URL(chunkFilename, document.baseURI).href; + } catch (_) { + href = chunkFilename; + } + var end = (ioInfo = -1), + byteSize = 0; + if ("function" === typeof performance.getEntriesByType) + for ( + var resourceEntries = performance.getEntriesByType("resource"), + i$jscomp$0 = 0; + i$jscomp$0 < resourceEntries.length; + i$jscomp$0++ + ) { + var resourceEntry = resourceEntries[i$jscomp$0]; + resourceEntry.name === href && + ((ioInfo = resourceEntry.startTime), + (end = ioInfo + resourceEntry.duration), + (byteSize = resourceEntry.transferSize || 0)); + } + resourceEntries = Promise.resolve(href); + resourceEntries.status = "fulfilled"; + resourceEntries.value = href; + i$jscomp$0 = Error("react-stack-top-frame"); + i$jscomp$0.stack.startsWith("Error: react-stack-top-frame") + ? (i$jscomp$0.stack = + "Error: react-stack-top-frame\n at Client Component Bundle (" + + href + + ":1:1)\n at Client Component Bundle (" + + href + + ":1:1)") + : (i$jscomp$0.stack = + "Client Component Bundle@" + + href + + ":1:1\nClient Component Bundle@" + + href + + ":1:1"); + ioInfo = { + name: "script", + start: ioInfo, + end: end, + value: resourceEntries, + debugStack: i$jscomp$0 + }; + 0 < byteSize && (ioInfo.byteSize = byteSize); + chunkIOInfoCache.set(chunkFilename, ioInfo); + } + target.push({ awaited: ioInfo }); + } + null !== debugInfo && + chunk._debugInfo.push.apply(chunk._debugInfo, debugInfo); + null !== response && + (initializeModuleChunk(chunk), + wakeChunkIfInitialized(chunk, response, rejectListeners)); + } + } + function initializeDebugChunk(response, chunk) { + var debugChunk = chunk._debugChunk; + if (null !== debugChunk) { + var debugInfo = chunk._debugInfo; + try { + if ("resolved_model" === debugChunk.status) { + for ( + var idx = debugInfo.length, c = debugChunk._debugChunk; + null !== c; + + ) + "fulfilled" !== c.status && idx++, (c = c._debugChunk); + initializeModelChunk(debugChunk); + switch (debugChunk.status) { + case "fulfilled": + debugInfo[idx] = initializeDebugInfo( + response, + debugChunk.value + ); + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + debugInfo, + "" + idx, + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } else + switch (debugChunk.status) { + case "fulfilled": + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + {}, + "debug", + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } catch (error) { + triggerErrorOnChunk(response, chunk, error); + } + } + } + function initializeModelChunk(chunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + var resolvedModel = chunk.value, + response = chunk.reason; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + initializeDebugChunk(response, chunk); + try { + var value = JSON.parse(resolvedModel, response._fromJSON), + resolveListeners = chunk.value; + if (null !== resolveListeners) + for ( + chunk.value = null, chunk.reason = null, resolvedModel = 0; + resolvedModel < resolveListeners.length; + resolvedModel++ + ) { + var listener = resolveListeners[resolvedModel]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + if (null !== initializingHandler) { + if (initializingHandler.errored) throw initializingHandler.reason; + if (0 < initializingHandler.deps) { + initializingHandler.value = value; + initializingHandler.chunk = chunk; + return; + } + } + chunk.status = "fulfilled"; + chunk.value = value; + moveDebugInfoFromChunkToInnerValue(chunk, value); + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingHandler = prevHandler), (initializingChunk = prevChunk); + } + } + function initializeModuleChunk(chunk) { + try { + var value = requireModule(chunk.value); + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } + } + function reportGlobalError(weakResponse, error) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse); + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && + triggerErrorOnChunk(response, chunk, error); + }); + weakResponse = response._debugChannel; + void 0 !== weakResponse && + (closeDebugChannel(weakResponse), + (response._debugChannel = void 0), + null !== debugChannelRegistry && + debugChannelRegistry.unregister(response)); + } + } + function nullRefGetter() { + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("function" === typeof type) return '"use client"'; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return type._init === readChunk ? '"use client"' : "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function initializeElement(response, element, lazyNode) { + var stack = element._debugStack, + owner = element._owner; + null === owner && (element._owner = response._debugRootOwner); + var env = response._rootEnvironmentName; + null !== owner && null != owner.env && (env = owner.env); + var normalizedStackTrace = null; + null === owner && null != response._debugRootStack + ? (normalizedStackTrace = response._debugRootStack) + : null !== stack && + (normalizedStackTrace = createFakeJSXCallStackInDEV( + response, + stack, + env + )); + element._debugStack = normalizedStackTrace; + normalizedStackTrace = null; + supportsCreateTask && + null !== stack && + ((normalizedStackTrace = console.createTask.bind( + console, + getTaskName(element.type) + )), + (stack = buildFakeCallStack( + response, + stack, + env, + !1, + normalizedStackTrace + )), + (env = null === owner ? null : initializeFakeTask(response, owner)), + null === env + ? ((env = response._debugRootTask), + (normalizedStackTrace = null != env ? env.run(stack) : stack())) + : (normalizedStackTrace = env.run(stack))); + element._debugTask = normalizedStackTrace; + null !== owner && initializeFakeStack(response, owner); + null !== lazyNode && + (lazyNode._store && + lazyNode._store.validated && + !element._store.validated && + (element._store.validated = lazyNode._store.validated), + "fulfilled" === lazyNode._payload.status && + lazyNode._debugInfo && + ((response = lazyNode._debugInfo.splice(0)), + element._debugInfo + ? element._debugInfo.unshift.apply(element._debugInfo, response) + : Object.defineProperty(element, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: response + }))); + Object.freeze(element.props); + } + function createLazyChunkWrapper(chunk, validated) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: chunk, + _init: readChunk + }; + lazyType._debugInfo = chunk._debugInfo; + lazyType._store = { validated: validated }; + return lazyType; + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._closed + ? new ReactPromise("rejected", null, response._closedReason) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function fulfillReference(reference, value, fulfilledChunk) { + for ( + var response = reference.response, + handler = reference.handler, + parentObject = reference.parentObject, + key = reference.key, + map = reference.map, + path = reference.path, + i = 1; + i < path.length; + i++ + ) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((value = value._payload), value === handler.chunk)) + value = handler.value; + else { + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + continue; + case "blocked": + var cyclicHandler = resolveBlockedCycle(value, reference); + if (null !== cyclicHandler) { + value = cyclicHandler.value; + continue; + } + case "pending": + path.splice(0, i - 1); + null === value.value + ? (value.value = [reference]) + : value.value.push(reference); + null === value.reason + ? (value.reason = [reference]) + : value.reason.push(reference); + return; + case "halted": + return; + default: + rejectReference(reference, value.reason); + return; + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((path = value._payload), path === handler.chunk)) + value = handler.value; + else { + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + parentObject[key] = response; + "" === key && null === handler.value && (handler.value = response); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((reference = handler.value), key)) { + case "3": + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + reference.props = response; + break; + case "4": + reference._owner = response; + break; + case "5": + reference._debugStack = response; + break; + default: + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + } + else + reference.isDebug || + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + handler.deps--; + 0 === handler.deps && + ((fulfilledChunk = handler.chunk), + null !== fulfilledChunk && + "blocked" === fulfilledChunk.status && + ((key = fulfilledChunk.value), + (fulfilledChunk.status = "fulfilled"), + (fulfilledChunk.value = handler.value), + (fulfilledChunk.reason = handler.reason), + null !== key + ? wakeChunk(key, handler.value, fulfilledChunk) + : moveDebugInfoFromChunkToInnerValue( + fulfilledChunk, + handler.value + ))); + } + function rejectReference(reference, error) { + var handler = reference.handler; + reference = reference.response; + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + handler = handler.chunk; + if (null !== handler && "blocked" === handler.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + handler._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(reference, handler, error); + } + } + } + function waitForReference( + referencedChunk, + parentObject, + key, + response, + map, + path, + isAwaitingDebugInfo + ) { + if ( + !( + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + "pending" !== referencedChunk.status || + parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key) + ) + ) + return null; + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + parentObject = { + response: response, + handler: handler, + parentObject: parentObject, + key: key, + map: map, + path: path + }; + parentObject.isDebug = isAwaitingDebugInfo; + null === referencedChunk.value + ? (referencedChunk.value = [parentObject]) + : referencedChunk.value.push(parentObject); + null === referencedChunk.reason + ? (referencedChunk.reason = [parentObject]) + : referencedChunk.reason.push(parentObject); + return null; + } + function loadServerReference(response, metaData, parentObject, key) { + if (!response._serverReferenceConfig) + return createBoundServerReference( + metaData, + response._callServer, + response._encodeFormAction, + response._debugFindSourceMapURL + ); + var serverReference = resolveServerReference( + response._serverReferenceConfig, + metaData.id + ), + promise = preloadModule(serverReference); + if (promise) + metaData.bound && (promise = Promise.all([promise, metaData.bound])); + else if (metaData.bound) promise = Promise.resolve(metaData.bound); + else + return ( + (promise = requireModule(serverReference)), + registerBoundServerReference(promise, metaData.id, metaData.bound), + promise + ); + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + promise.then( + function () { + var resolvedValue = requireModule(serverReference); + if (metaData.bound) { + var boundArgs = metaData.bound.value.slice(0); + boundArgs.unshift(null); + resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs); + } + registerBoundServerReference( + resolvedValue, + metaData.id, + metaData.bound + ); + parentObject[key] = resolvedValue; + "" === key && + null === handler.value && + (handler.value = resolvedValue); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((boundArgs = handler.value), key)) { + case "3": + boundArgs.props = resolvedValue; + break; + case "4": + boundArgs._owner = resolvedValue; + } + handler.deps--; + 0 === handler.deps && + ((resolvedValue = handler.chunk), + null !== resolvedValue && + "blocked" === resolvedValue.status && + ((boundArgs = resolvedValue.value), + (resolvedValue.status = "fulfilled"), + (resolvedValue.value = handler.value), + null !== boundArgs + ? wakeChunk(boundArgs, handler.value, resolvedValue) + : moveDebugInfoFromChunkToInnerValue( + resolvedValue, + handler.value + ))); + }, + function (error) { + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + var chunk = handler.chunk; + if (null !== chunk && "blocked" === chunk.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + chunk._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(response, chunk, error); + } + } + } + ); + return null; + } + function resolveLazy(value) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + var payload = value._payload; + if ("fulfilled" === payload.status) value = payload.value; + else break; + } + return value; + } + function transferReferencedDebugInfo(parentChunk, referencedChunk) { + if (null !== parentChunk) { + referencedChunk = referencedChunk._debugInfo; + parentChunk = parentChunk._debugInfo; + for (var i = 0; i < referencedChunk.length; ++i) { + var debugInfoEntry = referencedChunk[i]; + null == debugInfoEntry.name && parentChunk.push(debugInfoEntry); + } + } + } + function getOutlinedModel(response, reference, parentObject, key, map) { + var path = reference.split(":"); + reference = parseInt(path[0], 16); + reference = getChunk(response, reference); + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(reference); + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + for (var value = reference.value, i = 1; i < path.length; i++) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + value = value._payload; + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + break; + case "blocked": + case "pending": + return waitForReference( + value, + parentObject, + key, + response, + map, + path.slice(i - 1), + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), + parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = value.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: value.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + path = value._payload; + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + (parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key)) && + transferReferencedDebugInfo(initializingChunk, reference); + return response; + case "pending": + case "blocked": + return waitForReference( + reference, + parentObject, + key, + response, + map, + path, + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = reference.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: reference.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function createBlob(response, model) { + return new Blob(model.slice(1), { type: model[0] }); + } + function createFormData(response, model) { + response = new FormData(); + for (var i = 0; i < model.length; i++) + response.append(model[i][0], model[i][1]); + return response; + } + function applyConstructor(response, model, parentObject) { + Object.setPrototypeOf(parentObject, model.prototype); + } + function defineLazyGetter(response, chunk, parentObject, key) { + Object.defineProperty(parentObject, key, { + get: function () { + "resolved_model" === chunk.status && initializeModelChunk(chunk); + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "rejected": + throw chunk.reason; + } + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function getInferredFunctionApproximate(code) { + code = code.startsWith("Object.defineProperty(") + ? code.slice(22) + : code.startsWith("(") + ? code.slice(1) + : code; + if (code.startsWith("async function")) { + var idx = code.indexOf("(", 14); + if (-1 !== idx) + return ( + (code = code.slice(14, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":async function(){}})")[ + code + ] + ); + } else if (code.startsWith("function")) { + if (((idx = code.indexOf("(", 8)), -1 !== idx)) + return ( + (code = code.slice(8, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":function(){}})")[code] + ); + } else if ( + code.startsWith("class") && + ((idx = code.indexOf("{", 5)), -1 !== idx) + ) + return ( + (code = code.slice(5, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":class{}})")[code] + ); + return function () {}; + } + function parseModelString(response, parentObject, key, value) { + if ("$" === value[0]) { + if ("$" === value) + return ( + null !== initializingHandler && + "0" === key && + (initializingHandler = { + parent: initializingHandler, + chunk: null, + value: null, + reason: null, + deps: 0, + errored: !1 + }), + REACT_ELEMENT_TYPE + ); + switch (value[1]) { + case "$": + return value.slice(1); + case "L": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + createLazyChunkWrapper(response, 0) + ); + case "@": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + response + ); + case "S": + return Symbol.for(value.slice(2)); + case "F": + var ref = value.slice(2); + return getOutlinedModel( + response, + ref, + parentObject, + key, + loadServerReference + ); + case "T": + parentObject = "$" + value.slice(2); + response = response._tempRefs; + if (null == response) + throw Error( + "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply." + ); + return response.get(parentObject); + case "Q": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createMap) + ); + case "W": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createSet) + ); + case "B": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createBlob) + ); + case "K": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createFormData) + ); + case "Z": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + resolveErrorDev + ) + ); + case "i": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + extractIterator + ) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + case "P": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + applyConstructor + ) + ); + case "E": + response = value.slice(2); + try { + if (!mightHaveStaticConstructor.test(response)) + return (0, eval)(response); + } catch (x) {} + try { + if ( + ((ref = getInferredFunctionApproximate(response)), + response.startsWith("Object.defineProperty(")) + ) { + var idx = response.lastIndexOf(',"name",{value:"'); + if (-1 !== idx) { + var name = JSON.parse( + response.slice(idx + 16 - 1, response.length - 2) + ); + Object.defineProperty(ref, "name", { value: name }); + } + } + } catch (_) { + ref = function () {}; + } + return ref; + case "Y": + if ( + 2 < value.length && + (ref = response._debugChannel && response._debugChannel.callback) + ) { + if ("@" === value[2]) + return ( + (parentObject = value.slice(3)), + (key = parseInt(parentObject, 16)), + response._chunks.has(key) || ref("P:" + parentObject), + getChunk(response, key) + ); + value = value.slice(2); + idx = parseInt(value, 16); + response._chunks.has(idx) || ref("Q:" + value); + ref = getChunk(response, idx); + return "fulfilled" === ref.status + ? ref.value + : defineLazyGetter(response, ref, parentObject, key); + } + Object.defineProperty(parentObject, key, { + get: function () { + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + default: + return ( + (ref = value.slice(1)), + getOutlinedModel(response, ref, parentObject, key, createModel) + ); + } + } + return value; + } + function missingCall() { + throw Error( + 'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.' + ); + } + function markIOStarted() { + this._debugIOStarted = !0; + } + function ResponseInstance( + bundlerConfig, + serverReferenceConfig, + moduleLoading, + callServer, + encodeFormAction, + nonce, + temporaryReferences, + findSourceMapURL, + replayConsole, + environmentName, + debugStartTime, + debugChannel + ) { + var chunks = new Map(); + this._bundlerConfig = bundlerConfig; + this._serverReferenceConfig = serverReferenceConfig; + this._moduleLoading = moduleLoading; + this._callServer = void 0 !== callServer ? callServer : missingCall; + this._encodeFormAction = encodeFormAction; + this._nonce = nonce; + this._chunks = chunks; + this._stringDecoder = new TextDecoder(); + this._fromJSON = null; + this._closed = !1; + this._closedReason = null; + this._tempRefs = temporaryReferences; + this._timeOrigin = 0; + this._pendingInitialRender = null; + this._pendingChunks = 0; + this._weakResponse = { weak: new WeakRef(this), response: this }; + this._debugRootOwner = bundlerConfig = + void 0 === ReactSharedInteralsServer || + null === ReactSharedInteralsServer.A + ? null + : ReactSharedInteralsServer.A.getOwner(); + this._debugRootStack = + null !== bundlerConfig ? Error("react-stack-top-frame") : null; + environmentName = void 0 === environmentName ? "Server" : environmentName; + supportsCreateTask && + (this._debugRootTask = console.createTask( + '"use ' + environmentName.toLowerCase() + '"' + )); + this._debugStartTime = + null == debugStartTime ? performance.now() : debugStartTime; + this._debugIOStarted = !1; + setTimeout(markIOStarted.bind(this), 0); + this._debugFindSourceMapURL = findSourceMapURL; + this._debugChannel = debugChannel; + this._blockedConsole = null; + this._replayConsole = replayConsole; + this._rootEnvironmentName = environmentName; + debugChannel && + (null === debugChannelRegistry + ? (closeDebugChannel(debugChannel), (this._debugChannel = void 0)) + : debugChannelRegistry.register(this, debugChannel, this)); + replayConsole && markAllTracksInOrder(); + this._fromJSON = createFromJSONCallback(this); + } + function createStreamState(weakResponse, streamDebugValue) { + var streamState = { + _rowState: 0, + _rowID: 0, + _rowTag: 0, + _rowLength: 0, + _buffer: [] + }; + weakResponse = unwrapWeakResponse(weakResponse); + var debugValuePromise = Promise.resolve(streamDebugValue); + debugValuePromise.status = "fulfilled"; + debugValuePromise.value = streamDebugValue; + streamState._debugInfo = { + name: "rsc stream", + start: weakResponse._debugStartTime, + end: weakResponse._debugStartTime, + byteSize: 0, + value: debugValuePromise, + owner: weakResponse._debugRootOwner, + debugStack: weakResponse._debugRootStack, + debugTask: weakResponse._debugRootTask + }; + streamState._debugTargetChunkSize = MIN_CHUNK_SIZE; + return streamState; + } + function incrementChunkDebugInfo(streamState, chunkLength) { + var debugInfo = streamState._debugInfo, + endTime = performance.now(), + previousEndTime = debugInfo.end; + chunkLength = debugInfo.byteSize + chunkLength; + chunkLength > streamState._debugTargetChunkSize || + endTime > previousEndTime + 10 + ? ((streamState._debugInfo = { + name: debugInfo.name, + start: debugInfo.start, + end: endTime, + byteSize: chunkLength, + value: debugInfo.value, + owner: debugInfo.owner, + debugStack: debugInfo.debugStack, + debugTask: debugInfo.debugTask + }), + (streamState._debugTargetChunkSize = chunkLength + MIN_CHUNK_SIZE)) + : ((debugInfo.end = endTime), (debugInfo.byteSize = chunkLength)); + } + function addAsyncInfo(chunk, asyncInfo) { + var value = resolveLazy(chunk.value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) + ? chunk._debugInfo.push(asyncInfo) + : isArrayImpl(value._debugInfo) + ? value._debugInfo.push(asyncInfo) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: [asyncInfo] + }); + } + function resolveChunkDebugInfo(response, streamState, chunk) { + response._debugIOStarted && + ((response = { awaited: streamState._debugInfo }), + "pending" === chunk.status || "blocked" === chunk.status + ? ((response = addAsyncInfo.bind(null, chunk, response)), + chunk.then(response, response)) + : addAsyncInfo(chunk, response)); + } + function resolveBuffer(response, id, buffer, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : (chunk && releasePendingChunk(response, chunk), + (buffer = new ReactPromise("fulfilled", buffer, null)), + resolveChunkDebugInfo(response, streamState, buffer), + chunks.set(id, buffer)); + } + function resolveModule(response, id, model, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + model = JSON.parse(model, response._fromJSON); + var clientReference = resolveClientReference( + response._bundlerConfig, + model + ); + if ((model = preloadModule(clientReference))) { + if (chunk) { + releasePendingChunk(response, chunk); + var blockedChunk = chunk; + blockedChunk.status = "blocked"; + } else + (blockedChunk = new ReactPromise("blocked", null, null)), + chunks.set(id, blockedChunk); + resolveChunkDebugInfo(response, streamState, blockedChunk); + model.then( + function () { + return resolveModuleChunk(response, blockedChunk, clientReference); + }, + function (error) { + return triggerErrorOnChunk(response, blockedChunk, error); + } + ); + } else + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModuleChunk(response, chunk, clientReference)) + : ((chunk = new ReactPromise( + "resolved_module", + clientReference, + null + )), + resolveChunkDebugInfo(response, streamState, chunk), + chunks.set(id, chunk)); + } + function resolveStream(response, id, stream, controller, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + if (chunk) { + if ( + (resolveChunkDebugInfo(response, streamState, chunk), + "pending" === chunk.status) + ) { + releasePendingChunk(response, chunk); + id = chunk.value; + if (null != chunk._debugChunk) { + streamState = initializingHandler; + chunks = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + if ( + (initializeDebugChunk(response, chunk), + null !== initializingHandler && + !initializingHandler.errored && + 0 < initializingHandler.deps) + ) { + initializingHandler.value = stream; + initializingHandler.reason = controller; + initializingHandler.chunk = chunk; + return; + } + } finally { + (initializingHandler = streamState), (initializingChunk = chunks); + } + } + chunk.status = "fulfilled"; + chunk.value = stream; + chunk.reason = controller; + null !== id + ? wakeChunk(id, chunk.value, chunk) + : moveDebugInfoFromChunkToInnerValue(chunk, stream); + } + } else + (stream = new ReactPromise("fulfilled", stream, controller)), + resolveChunkDebugInfo(response, streamState, stream), + chunks.set(id, stream); + } + function startReadableStream(response, id, type, streamState) { + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream( + response, + id, + type, + { + enqueueValue: function (value) { + null === previousBlockedChunk + ? controller.enqueue(value) + : previousBlockedChunk.then(function () { + controller.enqueue(value); + }); + }, + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = createResolvedModelChunk(response, json); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk3 = createPendingChunk(response); + _chunk3.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk3; + chunk.then(function () { + previousBlockedChunk === _chunk3 && + (previousBlockedChunk = null); + resolveModelChunk(response, _chunk3, json); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }, + streamState + ); + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function startAsyncIterable(response, id, iterator, streamState) { + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = {}; + iterable[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new ReactPromise( + "fulfilled", + { done: !0, value: void 0 }, + null + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }; + resolveStream( + response, + id, + iterator ? iterable[ASYNC_ITERATOR]() : iterable, + { + enqueueValue: function (value) { + if (nextWriteIndex === buffer.length) + buffer[nextWriteIndex] = new ReactPromise( + "fulfilled", + { done: !1, value: value }, + null + ); + else { + var chunk = buffer[nextWriteIndex], + resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "fulfilled"; + chunk.value = { done: !1, value: value }; + null !== resolveListeners && + wakeChunkIfInitialized( + chunk, + resolveListeners, + rejectListeners + ); + } + nextWriteIndex++; + }, + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !1 + ); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !0 + ); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + response, + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(response, buffer[nextWriteIndex++], error); + } + }, + streamState + ); + } + function resolveErrorDev(response, errorInfo) { + var name = errorInfo.name, + env = errorInfo.env; + var error = buildFakeCallStack( + response, + errorInfo.stack, + env, + !1, + Error.bind( + null, + errorInfo.message || + "An error occurred in the Server Components render but no message was provided" + ) + ); + var ownerTask = null; + null != errorInfo.owner && + ((errorInfo = errorInfo.owner.slice(1)), + (errorInfo = getOutlinedModel( + response, + errorInfo, + {}, + "", + createModel + )), + null !== errorInfo && + (ownerTask = initializeFakeTask(response, errorInfo))); + null === ownerTask + ? ((response = getRootTask(response, env)), + (error = null != response ? response.run(error) : error())) + : (error = ownerTask.run(error)); + error.name = name; + error.environmentName = env; + return error; + } + function createFakeFunction( + name, + filename, + sourceMap, + line, + col, + enclosingLine, + enclosingCol, + environmentName + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--; + 1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--; + 1 > line ? (line = 0) : line--; + 1 > col ? (col = 0) : col--; + if ( + line < enclosingLine || + (line === enclosingLine && col < enclosingCol) + ) + enclosingCol = enclosingLine = 0; + 1 > line + ? ((line = encodedName.length + 3), + (enclosingCol -= line), + 0 > enclosingCol && (enclosingCol = 0), + (col = col - enclosingCol - line - 3), + 0 > col && (col = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : 1 > enclosingLine + ? ((enclosingCol -= encodedName.length + 3), + 0 > enclosingCol && (enclosingCol = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})")) + : enclosingLine === line + ? ((col = col - enclosingCol - 3), + 0 > col && (col = 0), + (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})"); + encodedName = + 1 > enclosingLine + ? encodedName + + "\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + : "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + + encodedName; + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((encodedName += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?" + + fakeFunctionIdx++), + (encodedName += "\n//# sourceMappingURL=" + sourceMap)) + : (encodedName = filename + ? encodedName + ("\n//# sourceURL=" + encodeURI(filename)) + : encodedName + "\n//# sourceURL="); + try { + var fn = (0, eval)(encodedName)[name]; + } catch (x) { + fn = function (_) { + return _(); + }; + } + return fn; + } + function buildFakeCallStack( + response, + stack, + environmentName, + useEnclosingLine, + innerCall + ) { + for (var i = 0; i < stack.length; i++) { + var frame = stack[i], + frameKey = + frame.join("-") + + "-" + + environmentName + + (useEnclosingLine ? "-e" : "-n"), + fn = fakeFunctionCache.get(frameKey); + if (void 0 === fn) { + fn = frame[0]; + var filename = frame[1], + line = frame[2], + col = frame[3], + enclosingLine = frame[4]; + frame = frame[5]; + var findSourceMapURL = response._debugFindSourceMapURL; + findSourceMapURL = findSourceMapURL + ? findSourceMapURL(filename, environmentName) + : null; + fn = createFakeFunction( + fn, + filename, + findSourceMapURL, + line, + col, + useEnclosingLine ? line : enclosingLine, + useEnclosingLine ? col : frame, + environmentName + ); + fakeFunctionCache.set(frameKey, fn); + } + innerCall = fn.bind(null, innerCall); + } + return innerCall; + } + function getRootTask(response, childEnvironmentName) { + var rootTask = response._debugRootTask; + return rootTask + ? response._rootEnvironmentName !== childEnvironmentName + ? ((response = console.createTask.bind( + console, + '"use ' + childEnvironmentName.toLowerCase() + '"' + )), + rootTask.run(response)) + : rootTask + : null; + } + function initializeFakeTask(response, debugInfo) { + if (!supportsCreateTask || null == debugInfo.stack) return null; + var cachedEntry = debugInfo.debugTask; + if (void 0 !== cachedEntry) return cachedEntry; + var useEnclosingLine = void 0 === debugInfo.key, + stack = debugInfo.stack, + env = + null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env; + cachedEntry = + null == debugInfo.owner || null == debugInfo.owner.env + ? response._rootEnvironmentName + : debugInfo.owner.env; + var ownerTask = + null == debugInfo.owner + ? null + : initializeFakeTask(response, debugInfo.owner); + env = + env !== cachedEntry + ? '"use ' + env.toLowerCase() + '"' + : void 0 !== debugInfo.key + ? "<" + (debugInfo.name || "...") + ">" + : void 0 !== debugInfo.name + ? debugInfo.name || "unknown" + : "await " + (debugInfo.awaited.name || "unknown"); + env = console.createTask.bind(console, env); + useEnclosingLine = buildFakeCallStack( + response, + stack, + cachedEntry, + useEnclosingLine, + env + ); + null === ownerTask + ? ((response = getRootTask(response, cachedEntry)), + (response = + null != response + ? response.run(useEnclosingLine) + : useEnclosingLine())) + : (response = ownerTask.run(useEnclosingLine)); + return (debugInfo.debugTask = response); + } + function fakeJSXCallSite() { + return Error("react-stack-top-frame"); + } + function initializeFakeStack(response, debugInfo) { + if (void 0 === debugInfo.debugStack) { + null != debugInfo.stack && + (debugInfo.debugStack = createFakeJSXCallStackInDEV( + response, + debugInfo.stack, + null == debugInfo.env ? "" : debugInfo.env + )); + var owner = debugInfo.owner; + null != owner && + (initializeFakeStack(response, owner), + void 0 === owner.debugLocation && + null != debugInfo.debugStack && + (owner.debugLocation = debugInfo.debugStack)); + } + } + function initializeDebugInfo(response, debugInfo) { + void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo); + if (null == debugInfo.owner && null != response._debugRootOwner) { + var _componentInfoOrAsyncInfo = debugInfo; + _componentInfoOrAsyncInfo.owner = response._debugRootOwner; + _componentInfoOrAsyncInfo.stack = null; + _componentInfoOrAsyncInfo.debugStack = response._debugRootStack; + _componentInfoOrAsyncInfo.debugTask = response._debugRootTask; + } else + void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo); + "number" === typeof debugInfo.time && + (debugInfo = { time: debugInfo.time + response._timeOrigin }); + return debugInfo; + } + function getCurrentStackInDEV() { + var owner = currentOwnerInDEV; + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function resolveConsoleEntry(response, json) { + if (response._replayConsole) { + var blockedChunk = response._blockedConsole; + if (null == blockedChunk) + (blockedChunk = createResolvedModelChunk(response, json)), + initializeModelChunk(blockedChunk), + "fulfilled" === blockedChunk.status + ? replayConsoleWithCallStackInDEV(response, blockedChunk.value) + : (blockedChunk.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ), + (response._blockedConsole = blockedChunk)); + else { + var _chunk4 = createPendingChunk(response); + _chunk4.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ); + response._blockedConsole = _chunk4; + var unblock = function () { + response._blockedConsole === _chunk4 && + (response._blockedConsole = null); + resolveModelChunk(response, _chunk4, json); + }; + blockedChunk.then(unblock, unblock); + } + } + } + function initializeIOInfo(response, ioInfo) { + void 0 !== ioInfo.stack && + (initializeFakeTask(response, ioInfo), + initializeFakeStack(response, ioInfo)); + ioInfo.start += response._timeOrigin; + ioInfo.end += response._timeOrigin; + if (response._replayConsole) { + response = response._rootEnvironmentName; + var promise = ioInfo.value; + if (promise) + switch (promise.status) { + case "fulfilled": + logIOInfo(ioInfo, response, promise.value); + break; + case "rejected": + logIOInfoErrored(ioInfo, response, promise.reason); + break; + default: + promise.then( + logIOInfo.bind(null, ioInfo, response), + logIOInfoErrored.bind(null, ioInfo, response) + ); + } + else logIOInfo(ioInfo, response, void 0); + } + } + function resolveIOInfo(response, id, model) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk + ? (resolveModelChunk(response, chunk, model), + "resolved_model" === chunk.status && initializeModelChunk(chunk)) + : ((chunk = createResolvedModelChunk(response, model)), + chunks.set(id, chunk), + initializeModelChunk(chunk)); + "fulfilled" === chunk.status + ? initializeIOInfo(response, chunk.value) + : chunk.then( + function (v) { + initializeIOInfo(response, v); + }, + function () {} + ); + } + function mergeBuffer(buffer, lastChunk) { + for ( + var l = buffer.length, byteLength = lastChunk.length, i = 0; + i < l; + i++ + ) + byteLength += buffer[i].byteLength; + byteLength = new Uint8Array(byteLength); + for (var _i3 = (i = 0); _i3 < l; _i3++) { + var chunk = buffer[_i3]; + byteLength.set(chunk, i); + i += chunk.byteLength; + } + byteLength.set(lastChunk, i); + return byteLength; + } + function resolveTypedArray( + response, + id, + buffer, + lastChunk, + constructor, + bytesPerElement, + streamState + ) { + buffer = + 0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement + ? lastChunk + : mergeBuffer(buffer, lastChunk); + constructor = new constructor( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength / bytesPerElement + ); + resolveBuffer(response, id, constructor, streamState); + } + function flushComponentPerformance( + response$jscomp$0, + root, + trackIdx$jscomp$6, + trackTime, + parentEndTime + ) { + if (!isArrayImpl(root._children)) { + var previousResult = root._children, + previousEndTime = previousResult.endTime; + if ( + -Infinity < parentEndTime && + parentEndTime < previousEndTime && + null !== previousResult.component + ) { + var componentInfo = previousResult.component, + trackIdx = trackIdx$jscomp$6, + startTime = parentEndTime; + if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) { + var color = + componentInfo.env === response$jscomp$0._rootEnvironmentName + ? "primary-light" + : "secondary-light", + entryName = componentInfo.name + " [deduped]", + debugTask = componentInfo.debugTask; + debugTask + ? debugTask.run( + console.timeStamp.bind( + console, + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ) + ) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ); + } + } + previousResult.track = trackIdx$jscomp$6; + return previousResult; + } + var children = root._children; + var debugInfo = root._debugInfo; + if (0 === debugInfo.length && "fulfilled" === root.status) { + var resolvedValue = resolveLazy(root.value); + "object" === typeof resolvedValue && + null !== resolvedValue && + (isArrayImpl(resolvedValue) || + "function" === typeof resolvedValue[ASYNC_ITERATOR] || + resolvedValue.$$typeof === REACT_ELEMENT_TYPE || + resolvedValue.$$typeof === REACT_LAZY_TYPE) && + isArrayImpl(resolvedValue._debugInfo) && + (debugInfo = resolvedValue._debugInfo); + } + if (debugInfo) { + for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + "number" === typeof info.time && (startTime$jscomp$0 = info.time); + if ("string" === typeof info.name) { + startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++; + trackTime = startTime$jscomp$0; + break; + } + } + for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) { + var _info = debugInfo[_i4]; + if ("number" === typeof _info.time && _info.time > parentEndTime) { + parentEndTime = _info.time; + break; + } + } + } + var result = { + track: trackIdx$jscomp$6, + endTime: -Infinity, + component: null + }; + root._children = result; + for ( + var childrenEndTime = -Infinity, + childTrackIdx = trackIdx$jscomp$6, + childTrackTime = trackTime, + _i5 = 0; + _i5 < children.length; + _i5++ + ) { + var childResult = flushComponentPerformance( + response$jscomp$0, + children[_i5], + childTrackIdx, + childTrackTime, + parentEndTime + ); + null !== childResult.component && + (result.component = childResult.component); + childTrackIdx = childResult.track; + var childEndTime = childResult.endTime; + childEndTime > childTrackTime && (childTrackTime = childEndTime); + childEndTime > childrenEndTime && (childrenEndTime = childEndTime); + } + if (debugInfo) + for ( + var componentEndTime = 0, + isLastComponent = !0, + endTime = -1, + endTimeIdx = -1, + _i6 = debugInfo.length - 1; + 0 <= _i6; + _i6-- + ) { + var _info2 = debugInfo[_i6]; + if ("number" === typeof _info2.time) { + 0 === componentEndTime && (componentEndTime = _info2.time); + var time = _info2.time; + if (-1 < endTimeIdx) + for (var j = endTimeIdx - 1; j > _i6; j--) { + var candidateInfo = debugInfo[j]; + if ("string" === typeof candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var componentInfo$jscomp$0 = candidateInfo, + response = response$jscomp$0, + componentInfo$jscomp$1 = componentInfo$jscomp$0, + trackIdx$jscomp$0 = trackIdx$jscomp$6, + startTime$jscomp$1 = time, + componentEndTime$jscomp$0 = componentEndTime, + childrenEndTime$jscomp$0 = childrenEndTime; + if ( + isLastComponent && + "rejected" === root.status && + root.reason !== response._closedReason + ) { + var componentInfo$jscomp$2 = componentInfo$jscomp$1, + trackIdx$jscomp$1 = trackIdx$jscomp$0, + startTime$jscomp$2 = startTime$jscomp$1, + childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0, + error = root.reason; + if (supportsUserTiming) { + var env = componentInfo$jscomp$2.env, + name = componentInfo$jscomp$2.name, + entryName$jscomp$0 = + env === response._rootEnvironmentName || + void 0 === env + ? name + : name + " [" + env + "]", + measureName = "\u200b" + entryName$jscomp$0, + properties = [ + [ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]; + null != componentInfo$jscomp$2.key && + addValueToProperties( + "key", + componentInfo$jscomp$2.key, + properties, + 0, + "" + ); + null != componentInfo$jscomp$2.props && + addObjectToProperties( + componentInfo$jscomp$2.props, + properties, + 0, + "" + ); + performance.measure(measureName, { + start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2, + end: childrenEndTime$jscomp$1, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$1], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$0 + " Errored", + properties: properties + } + } + }); + performance.clearMeasures(measureName); + } + } else { + var componentInfo$jscomp$3 = componentInfo$jscomp$1, + trackIdx$jscomp$2 = trackIdx$jscomp$0, + startTime$jscomp$3 = startTime$jscomp$1, + childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0; + if ( + supportsUserTiming && + 0 <= childrenEndTime$jscomp$2 && + 10 > trackIdx$jscomp$2 + ) { + var env$jscomp$0 = componentInfo$jscomp$3.env, + name$jscomp$0 = componentInfo$jscomp$3.name, + isPrimaryEnv = + env$jscomp$0 === response._rootEnvironmentName, + selfTime = + componentEndTime$jscomp$0 - startTime$jscomp$3, + color$jscomp$0 = + 0.5 > selfTime + ? isPrimaryEnv + ? "primary-light" + : "secondary-light" + : 50 > selfTime + ? isPrimaryEnv + ? "primary" + : "secondary" + : 500 > selfTime + ? isPrimaryEnv + ? "primary-dark" + : "secondary-dark" + : "error", + debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask, + measureName$jscomp$0 = + "\u200b" + + (isPrimaryEnv || void 0 === env$jscomp$0 + ? name$jscomp$0 + : name$jscomp$0 + " [" + env$jscomp$0 + "]"); + if (debugTask$jscomp$0) { + var properties$jscomp$0 = []; + null != componentInfo$jscomp$3.key && + addValueToProperties( + "key", + componentInfo$jscomp$3.key, + properties$jscomp$0, + 0, + "" + ); + null != componentInfo$jscomp$3.props && + addObjectToProperties( + componentInfo$jscomp$3.props, + properties$jscomp$0, + 0, + "" + ); + debugTask$jscomp$0.run( + performance.measure.bind( + performance, + measureName$jscomp$0, + { + start: + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + end: childrenEndTime$jscomp$2, + detail: { + devtools: { + color: color$jscomp$0, + track: trackNames[trackIdx$jscomp$2], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(measureName$jscomp$0); + } else + console.timeStamp( + measureName$jscomp$0, + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + childrenEndTime$jscomp$2, + trackNames[trackIdx$jscomp$2], + "Server Components \u269b", + color$jscomp$0 + ); + } + } + componentEndTime = time; + result.component = componentInfo$jscomp$0; + isLastComponent = !1; + } else if ( + candidateInfo.awaited && + null != candidateInfo.awaited.env + ) { + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo = candidateInfo, + env$jscomp$1 = response$jscomp$0._rootEnvironmentName, + promise = asyncInfo.awaited.value; + if (promise) { + var thenable = promise; + switch (thenable.status) { + case "fulfilled": + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + thenable.value + ); + break; + case "rejected": + var asyncInfo$jscomp$0 = asyncInfo, + trackIdx$jscomp$3 = trackIdx$jscomp$6, + startTime$jscomp$4 = time, + endTime$jscomp$0 = endTime, + rootEnv = env$jscomp$1, + error$jscomp$0 = thenable.reason; + if (supportsUserTiming && 0 < endTime$jscomp$0) { + var description = getIODescription(error$jscomp$0), + entryName$jscomp$1 = + "await " + + getIOShortName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ), + debugTask$jscomp$1 = + asyncInfo$jscomp$0.debugTask || + asyncInfo$jscomp$0.awaited.debugTask; + if (debugTask$jscomp$1) { + var properties$jscomp$1 = [ + [ + "Rejected", + "object" === typeof error$jscomp$0 && + null !== error$jscomp$0 && + "string" === typeof error$jscomp$0.message + ? String(error$jscomp$0.message) + : String(error$jscomp$0) + ] + ], + tooltipText = + getIOLongName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ) + " Rejected"; + debugTask$jscomp$1.run( + performance.measure.bind( + performance, + entryName$jscomp$1, + { + start: + 0 > startTime$jscomp$4 + ? 0 + : startTime$jscomp$4, + end: endTime$jscomp$0, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$3], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$1, + tooltipText: tooltipText + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$1); + } else + console.timeStamp( + entryName$jscomp$1, + 0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4, + endTime$jscomp$0, + trackNames[trackIdx$jscomp$3], + "Server Components \u269b", + "error" + ); + } + break; + default: + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } else + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } + else { + endTime = time; + for (var _j = debugInfo.length - 1; _j > _i6; _j--) { + var _candidateInfo = debugInfo[_j]; + if ("string" === typeof _candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var _componentInfo = _candidateInfo, + _env = response$jscomp$0._rootEnvironmentName, + componentInfo$jscomp$4 = _componentInfo, + trackIdx$jscomp$4 = trackIdx$jscomp$6, + startTime$jscomp$5 = time, + childrenEndTime$jscomp$3 = childrenEndTime; + if (supportsUserTiming) { + var env$jscomp$2 = componentInfo$jscomp$4.env, + name$jscomp$1 = componentInfo$jscomp$4.name, + entryName$jscomp$2 = + env$jscomp$2 === _env || void 0 === env$jscomp$2 + ? name$jscomp$1 + : name$jscomp$1 + " [" + env$jscomp$2 + "]", + measureName$jscomp$1 = "\u200b" + entryName$jscomp$2, + properties$jscomp$2 = [ + [ + "Aborted", + "The stream was aborted before this Component finished rendering." + ] + ]; + null != componentInfo$jscomp$4.key && + addValueToProperties( + "key", + componentInfo$jscomp$4.key, + properties$jscomp$2, + 0, + "" + ); + null != componentInfo$jscomp$4.props && + addObjectToProperties( + componentInfo$jscomp$4.props, + properties$jscomp$2, + 0, + "" + ); + performance.measure(measureName$jscomp$1, { + start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5, + end: childrenEndTime$jscomp$3, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$4], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$2 + " Aborted", + properties: properties$jscomp$2 + } + } + }); + performance.clearMeasures(measureName$jscomp$1); + } + componentEndTime = time; + result.component = _componentInfo; + isLastComponent = !1; + } else if ( + _candidateInfo.awaited && + null != _candidateInfo.awaited.env + ) { + var _asyncInfo = _candidateInfo, + _env2 = response$jscomp$0._rootEnvironmentName; + _asyncInfo.awaited.end > endTime && + (endTime = _asyncInfo.awaited.end); + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo$jscomp$1 = _asyncInfo, + trackIdx$jscomp$5 = trackIdx$jscomp$6, + startTime$jscomp$6 = time, + endTime$jscomp$1 = endTime, + rootEnv$jscomp$0 = _env2; + if (supportsUserTiming && 0 < endTime$jscomp$1) { + var entryName$jscomp$3 = + "await " + + getIOShortName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ), + debugTask$jscomp$2 = + asyncInfo$jscomp$1.debugTask || + asyncInfo$jscomp$1.awaited.debugTask; + if (debugTask$jscomp$2) { + var tooltipText$jscomp$0 = + getIOLongName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ) + " Aborted"; + debugTask$jscomp$2.run( + performance.measure.bind( + performance, + entryName$jscomp$3, + { + start: + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + end: endTime$jscomp$1, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$5], + trackGroup: "Server Components \u269b", + properties: [ + [ + "Aborted", + "The stream was aborted before this Promise resolved." + ] + ], + tooltipText: tooltipText$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$3); + } else + console.timeStamp( + entryName$jscomp$3, + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + endTime$jscomp$1, + trackNames[trackIdx$jscomp$5], + "Server Components \u269b", + "warning" + ); + } + } + } + } + endTime = time; + endTimeIdx = _i6; + } + } + result.endTime = childrenEndTime; + return result; + } + function flushInitialRenderPerformance(response) { + if (response._replayConsole) { + var rootChunk = getChunk(response, 0); + isArrayImpl(rootChunk._children) && + (markAllTracksInOrder(), + flushComponentPerformance( + response, + rootChunk, + 0, + -Infinity, + -Infinity + )); + } + } + function processFullBinaryRow( + response, + streamState, + id, + tag, + buffer, + chunk + ) { + switch (tag) { + case 65: + resolveBuffer( + response, + id, + mergeBuffer(buffer, chunk).buffer, + streamState + ); + return; + case 79: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int8Array, + 1, + streamState + ); + return; + case 111: + resolveBuffer( + response, + id, + 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk), + streamState + ); + return; + case 85: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint8ClampedArray, + 1, + streamState + ); + return; + case 83: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int16Array, + 2, + streamState + ); + return; + case 115: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint16Array, + 2, + streamState + ); + return; + case 76: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int32Array, + 4, + streamState + ); + return; + case 108: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint32Array, + 4, + streamState + ); + return; + case 71: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float32Array, + 4, + streamState + ); + return; + case 103: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float64Array, + 8, + streamState + ); + return; + case 77: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigInt64Array, + 8, + streamState + ); + return; + case 109: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigUint64Array, + 8, + streamState + ); + return; + case 86: + resolveTypedArray( + response, + id, + buffer, + chunk, + DataView, + 1, + streamState + ); + return; + } + for ( + var stringDecoder = response._stringDecoder, row = "", i = 0; + i < buffer.length; + i++ + ) + row += stringDecoder.decode(buffer[i], decoderOptions); + row += stringDecoder.decode(chunk); + processFullStringRow(response, streamState, id, tag, row); + } + function processFullStringRow(response, streamState, id, tag, row) { + switch (tag) { + case 73: + resolveModule(response, id, row, streamState); + break; + case 72: + id = row[0]; + streamState = row.slice(1); + response = JSON.parse(streamState, response._fromJSON); + streamState = ReactDOMSharedInternals.d; + switch (id) { + case "D": + streamState.D(response); + break; + case "C": + "string" === typeof response + ? streamState.C(response) + : streamState.C(response[0], response[1]); + break; + case "L": + id = response[0]; + row = response[1]; + 3 === response.length + ? streamState.L(id, row, response[2]) + : streamState.L(id, row); + break; + case "m": + "string" === typeof response + ? streamState.m(response) + : streamState.m(response[0], response[1]); + break; + case "X": + "string" === typeof response + ? streamState.X(response) + : streamState.X(response[0], response[1]); + break; + case "S": + "string" === typeof response + ? streamState.S(response) + : streamState.S( + response[0], + 0 === response[1] ? void 0 : response[1], + 3 === response.length ? response[2] : void 0 + ); + break; + case "M": + "string" === typeof response + ? streamState.M(response) + : streamState.M(response[0], response[1]); + } + break; + case 69: + tag = response._chunks; + var chunk = tag.get(id); + row = JSON.parse(row); + var error = resolveErrorDev(response, row); + error.digest = row.digest; + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + triggerErrorOnChunk(response, chunk, error)) + : ((row = new ReactPromise("rejected", null, error)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 84: + tag = response._chunks; + (chunk = tag.get(id)) && "pending" !== chunk.status + ? chunk.reason.enqueueValue(row) + : (chunk && releasePendingChunk(response, chunk), + (row = new ReactPromise("fulfilled", row, null)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 78: + response._timeOrigin = +row - performance.timeOrigin; + break; + case 68: + id = getChunk(response, id); + "fulfilled" !== id.status && + "rejected" !== id.status && + "halted" !== id.status && + "blocked" !== id.status && + "resolved_module" !== id.status && + ((streamState = id._debugChunk), + (tag = createResolvedModelChunk(response, row)), + (tag._debugChunk = streamState), + (id._debugChunk = tag), + initializeDebugChunk(response, id), + "blocked" !== tag.status || + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + '"' !== row[0] || + "$" !== row[1] || + ((streamState = row.slice(2, row.length - 1).split(":")), + (streamState = parseInt(streamState[0], 16)), + "pending" === getChunk(response, streamState).status && + (id._debugChunk = null))); + break; + case 74: + resolveIOInfo(response, id, row); + break; + case 87: + resolveConsoleEntry(response, row); + break; + case 82: + startReadableStream(response, id, void 0, streamState); + break; + case 114: + startReadableStream(response, id, "bytes", streamState); + break; + case 88: + startAsyncIterable(response, id, !1, streamState); + break; + case 120: + startAsyncIterable(response, id, !0, streamState); + break; + case 67: + (response = response._chunks.get(id)) && + "fulfilled" === response.status && + response.reason.close("" === row ? '"$undefined"' : row); + break; + default: + if ("" === row) { + if ( + ((streamState = response._chunks), + (row = streamState.get(id)) || + streamState.set(id, (row = createPendingChunk(response))), + "pending" === row.status || "blocked" === row.status) + ) + releasePendingChunk(response, row), + (response = row), + (response.status = "halted"), + (response.value = null), + (response.reason = null); + } else + (tag = response._chunks), + (chunk = tag.get(id)) + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModelChunk(response, chunk, row)) + : ((row = createResolvedModelChunk(response, row)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + } + } + function processBinaryChunk(weakResponse, streamState, chunk) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse), + i = 0, + rowState = streamState._rowState; + weakResponse = streamState._rowID; + var rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + for ( + incrementChunkDebugInfo(streamState, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk[i++]; + 58 === lastIdx + ? (rowState = 1) + : (weakResponse = + (weakResponse << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk[i]; + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 35 === rowState || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk[i++]; + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf(10, i); + break; + case 4: + (lastIdx = i + rowLength), + lastIdx > chunk.length && (lastIdx = -1); + } + var offset = chunk.byteOffset + i; + if (-1 < lastIdx) + (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)), + processFullBinaryRow( + response, + streamState, + weakResponse, + rowTag, + buffer, + rowLength + ), + (i = lastIdx), + 3 === rowState && i++, + (rowLength = weakResponse = rowTag = rowState = 0), + (buffer.length = 0); + else { + chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i); + buffer.push(chunk); + rowLength -= chunk.byteLength; + break; + } + } + streamState._rowState = rowState; + streamState._rowID = weakResponse; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + } + } + function createFromJSONCallback(response) { + return function (key, value) { + if ("string" === typeof value) + return parseModelString(response, this, key, value); + if ("object" === typeof value && null !== value) { + if (value[0] === REACT_ELEMENT_TYPE) + b: { + var owner = value[4], + stack = value[5]; + key = value[6]; + value = { + $$typeof: REACT_ELEMENT_TYPE, + type: value[1], + key: value[2], + props: value[3], + _owner: void 0 === owner ? null : owner + }; + Object.defineProperty(value, "ref", { + enumerable: !1, + get: nullRefGetter + }); + value._store = {}; + Object.defineProperty(value._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: key + }); + Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + Object.defineProperty(value, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: void 0 === stack ? null : stack + }); + Object.defineProperty(value, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + if (null !== initializingHandler) { + owner = initializingHandler; + initializingHandler = owner.parent; + if (owner.errored) { + stack = new ReactPromise("rejected", null, owner.reason); + initializeElement(response, value, null); + owner = { + name: getComponentNameFromType(value.type) || "", + owner: value._owner + }; + owner.debugStack = value._debugStack; + supportsCreateTask && (owner.debugTask = value._debugTask); + stack._debugInfo = [owner]; + key = createLazyChunkWrapper(stack, key); + break b; + } + if (0 < owner.deps) { + stack = new ReactPromise("blocked", null, null); + owner.value = value; + owner.chunk = stack; + key = createLazyChunkWrapper(stack, key); + value = initializeElement.bind(null, response, value, key); + stack.then(value, value); + break b; + } + } + initializeElement(response, value, null); + key = value; + } + else key = value; + return key; + } + return value; + }; + } + function close(weakResponse) { + reportGlobalError(weakResponse, Error("Connection closed.")); + } + function createDebugCallbackFromWritableStream(debugWritable) { + var textEncoder = new TextEncoder(), + writer = debugWritable.getWriter(); + return function (message) { + "" === message + ? writer.close() + : writer + .write(textEncoder.encode(message + "\n")) + .catch(console.error); + }; + } + function createResponseFromOptions(options) { + var debugChannel = + options && void 0 !== options.debugChannel + ? { + hasReadable: void 0 !== options.debugChannel.readable, + callback: + void 0 !== options.debugChannel.writable + ? createDebugCallbackFromWritableStream( + options.debugChannel.writable + ) + : null + } + : void 0; + return new ResponseInstance( + null, + null, + null, + options && options.callServer ? options.callServer : void 0, + void 0, + void 0, + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + options && options.findSourceMapURL ? options.findSourceMapURL : void 0, + options ? !1 !== options.replayConsoleLogs : !0, + options && options.environmentName ? options.environmentName : void 0, + options && null != options.startTime ? options.startTime : void 0, + debugChannel + )._weakResponse; + } + function startReadingFromUniversalStream( + response$jscomp$0, + stream, + onDone + ) { + function progress(_ref) { + var value = _ref.value; + if (_ref.done) return onDone(); + if (value instanceof ArrayBuffer) + processBinaryChunk( + response$jscomp$0, + streamState, + new Uint8Array(value) + ); + else if ("string" === typeof value) { + if ( + ((_ref = streamState), void 0 !== response$jscomp$0.weak.deref()) + ) { + var response = unwrapWeakResponse(response$jscomp$0), + i = 0, + rowState = _ref._rowState, + rowID = _ref._rowID, + rowTag = _ref._rowTag, + rowLength = _ref._rowLength, + buffer = _ref._buffer, + chunkLength = value.length; + for ( + incrementChunkDebugInfo(_ref, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = value.charCodeAt(i++); + 58 === lastIdx + ? (rowState = 1) + : (rowID = + (rowID << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = value.charCodeAt(i); + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = value.charCodeAt(i++); + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = value.indexOf("\n", i); + break; + case 4: + if (84 !== rowTag) + throw Error( + "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams." + ); + if (rowLength < value.length || value.length > 3 * rowLength) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + lastIdx = value.length; + } + if (-1 < lastIdx) { + if (0 < buffer.length) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + i = value.slice(i, lastIdx); + processFullStringRow(response, _ref, rowID, rowTag, i); + i = lastIdx; + 3 === rowState && i++; + rowLength = rowID = rowTag = rowState = 0; + buffer.length = 0; + } else if (value.length !== i) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + } + _ref._rowState = rowState; + _ref._rowID = rowID; + _ref._rowTag = rowTag; + _ref._rowLength = rowLength; + } + } else processBinaryChunk(response$jscomp$0, streamState, value); + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response$jscomp$0, e); + } + var streamState = createStreamState(response$jscomp$0, stream), + reader = stream.getReader(); + reader.read().then(progress).catch(error); + } + function startReadingFromStream(response, stream, onDone, debugValue) { + function progress(_ref2) { + var value = _ref2.value; + if (_ref2.done) return onDone(); + processBinaryChunk(response, streamState, value); + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response, e); + } + var streamState = createStreamState(response, debugValue), + reader = stream.getReader(); + reader.read().then(progress).catch(error); + } + var React = require("react"), + ReactDOM = require("react-dom"), + decoderOptions = { stream: !0 }, + bind = Function.prototype.bind, + instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(), + chunkIOInfoCache = new Map(), + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_PORTAL_TYPE = Symbol.for("react.portal"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), + REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + ObjectPrototype = Object.prototype, + knownServerReferences = new WeakMap(), + fakeServerFunctionIdx = 0, + v8FrameRegExp = + /^ {3} at (?:(.+) \((.+):(\d+):(\d+)\)|(?:async )?(.+):(\d+):(\d+))$/, + jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\d+):(\d+)/, + hasOwnProperty = Object.prototype.hasOwnProperty, + REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + supportsUserTiming = + "undefined" !== typeof console && + "function" === typeof console.timeStamp && + "undefined" !== typeof performance && + "function" === typeof performance.measure, + trackNames = + "Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split( + " " + ), + prefix, + suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var ReactSharedInteralsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE || + ReactSharedInteralsServer; + ReactPromise.prototype = Object.create(Promise.prototype); + ReactPromise.prototype.then = function (resolve, reject) { + var _this = this; + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + break; + case "resolved_module": + initializeModuleChunk(this); + } + var resolveCallback = resolve, + rejectCallback = reject, + wrapperPromise = new Promise(function (res, rej) { + resolve = function (value) { + wrapperPromise._debugInfo = _this._debugInfo; + res(value); + }; + reject = function (reason) { + wrapperPromise._debugInfo = _this._debugInfo; + rej(reason); + }; + }); + wrapperPromise.then(resolveCallback, rejectCallback); + switch (this.status) { + case "fulfilled": + "function" === typeof resolve && resolve(this.value); + break; + case "pending": + case "blocked": + "function" === typeof resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + "function" === typeof reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + case "halted": + break; + default: + "function" === typeof reject && reject(this.reason); + } + }; + var debugChannelRegistry = + "function" === typeof FinalizationRegistry + ? new FinalizationRegistry(closeDebugChannel) + : null, + initializingHandler = null, + initializingChunk = null, + mightHaveStaticConstructor = /\bclass\b.*\bstatic\b/, + MIN_CHUNK_SIZE = 65536, + supportsCreateTask = !!console.createTask, + fakeFunctionCache = new Map(), + fakeFunctionIdx = 0, + createFakeJSXCallStack = { + react_stack_bottom_frame: function (response, stack, environmentName) { + return buildFakeCallStack( + response, + stack, + environmentName, + !1, + fakeJSXCallSite + )(); + } + }, + createFakeJSXCallStackInDEV = + createFakeJSXCallStack.react_stack_bottom_frame.bind( + createFakeJSXCallStack + ), + currentOwnerInDEV = null, + replayConsoleWithCallStack = { + react_stack_bottom_frame: function (response, payload) { + var methodName = payload[0], + stackTrace = payload[1], + owner = payload[2], + env = payload[3]; + payload = payload.slice(4); + var prevStack = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; + currentOwnerInDEV = null === owner ? response._debugRootOwner : owner; + try { + a: { + var offset = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + var JSCompiler_inline_result = bind.apply( + console[methodName], + [console].concat(payload) + ); + break a; + case "assert": + offset = 1; + } + var newArgs = payload.slice(0); + "string" === typeof newArgs[offset] + ? newArgs.splice( + offset, + 1, + "%c%s%c " + newArgs[offset], + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ) + : newArgs.splice( + offset, + 0, + "%c%s%c", + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ); + newArgs.unshift(console); + JSCompiler_inline_result = bind.apply( + console[methodName], + newArgs + ); + } + var callStack = buildFakeCallStack( + response, + stackTrace, + env, + !1, + JSCompiler_inline_result + ); + if (null != owner) { + var task = initializeFakeTask(response, owner); + initializeFakeStack(response, owner); + if (null !== task) { + task.run(callStack); + return; + } + } + var rootTask = getRootTask(response, env); + null != rootTask ? rootTask.run(callStack) : callStack(); + } finally { + (currentOwnerInDEV = null), + (ReactSharedInternals.getCurrentStack = prevStack); + } + } + }, + replayConsoleWithCallStackInDEV = + replayConsoleWithCallStack.react_stack_bottom_frame.bind( + replayConsoleWithCallStack + ); + (function (internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled || !hook.supportsFlight) return !0; + try { + hook.inject(internals); + } catch (err) { + console.error("React instrumentation encountered an error: %o.", err); + } + return hook.checkDCE ? !0 : !1; + })({ + bundleType: 1, + version: "19.3.0-canary-b4455a6e-20251027", + rendererPackageName: "react-server-dom-turbopack", + currentDispatcherRef: ReactSharedInternals, + reconcilerVersion: "19.3.0-canary-b4455a6e-20251027", + getCurrentComponentInfo: function () { + return currentOwnerInDEV; + } + }); + exports.createFromFetch = function (promiseForResponse, options) { + var response = createResponseFromOptions(options); + promiseForResponse.then( + function (r) { + if ( + options && + options.debugChannel && + options.debugChannel.readable + ) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromUniversalStream( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream(response, r.body, handleDone, r); + } else + startReadingFromStream( + response, + r.body, + close.bind(null, response), + r + ); + }, + function (e) { + reportGlobalError(response, e); + } + ); + return getRoot(response); + }; + exports.createFromReadableStream = function (stream, options) { + var response = createResponseFromOptions(options); + if (options && options.debugChannel && options.debugChannel.readable) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromUniversalStream( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream(response, stream, handleDone, stream); + } else + startReadingFromStream( + response, + stream, + close.bind(null, response), + stream + ); + return getRoot(response); + }; + exports.createServerReference = function ( + id, + callServer, + encodeFormAction, + findSourceMapURL, + functionName + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return callServer(id, args); + } + var location = parseStackLocation(Error("react-stack-top-frame")); + if (null !== location) { + encodeFormAction = location[1]; + var line = location[2]; + location = location[3]; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(encodeFormAction, "Client"); + action = createFakeServerFunction( + functionName || "", + encodeFormAction, + findSourceMapURL, + line, + location, + "Client", + action + ); + } + registerBoundServerReference(action, id, null); + return action; + }; + exports.createTemporaryReferenceSet = function () { + return new Map(); + }; + exports.encodeReply = function (value, options) { + return new Promise(function (resolve, reject) { + var abort = processReply( + value, + "", + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + resolve, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(signal.reason); + else { + var listener = function () { + abort(signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + }); + }; + exports.registerServerReference = function (reference, id) { + registerBoundServerReference(reference, id, null); + return reference; + }; + })(); diff --git a/.socket/blob/3769db71ce345cbc2e2acdd31341294bf40a8617d6500150572a725e9819095f b/.socket/blob/3769db71ce345cbc2e2acdd31341294bf40a8617d6500150572a725e9819095f new file mode 100644 index 0000000..59c8fe0 --- /dev/null +++ b/.socket/blob/3769db71ce345cbc2e2acdd31341294bf40a8617d6500150572a725e9819095f @@ -0,0 +1,5080 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +/** + * @license React + * react-server-dom-turbopack-client.browser.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 strict"; +"production" !== process.env.NODE_ENV && + (function () { + function resolveClientReference(bundlerConfig, metadata) { + if (bundlerConfig) { + var moduleExports = bundlerConfig[metadata[0]]; + if ((bundlerConfig = moduleExports && (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0))) + moduleExports = bundlerConfig.name; + else { + bundlerConfig = moduleExports && moduleExports["*"]; + if (!bundlerConfig) + throw Error( + 'Could not find the module "' + + metadata[0] + + '" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.' + ); + moduleExports = metadata[2]; + } + return 4 === metadata.length + ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1] + : [bundlerConfig.id, bundlerConfig.chunks, moduleExports]; + } + return metadata; + } + function resolveServerReference(bundlerConfig, id) { + var name = "", + resolvedModuleData = bundlerConfig[id]; + if (resolvedModuleData) name = resolvedModuleData.name; + else { + var idx = id.lastIndexOf("#"); + -1 !== idx && + ((name = id.slice(idx + 1)), + (resolvedModuleData = bundlerConfig[id.slice(0, idx)])); + if (!resolvedModuleData) + throw Error( + 'Could not find the module "' + + id + + '" in the React Server Manifest. This is probably a bug in the React Server Components bundler.' + ); + } + return resolvedModuleData.async + ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1] + : [resolvedModuleData.id, resolvedModuleData.chunks, name]; + } + function requireAsyncModule(id) { + var promise = __turbopack_require__(id); + if ("function" !== typeof promise.then || "fulfilled" === promise.status) + return null; + promise.then( + function (value) { + promise.status = "fulfilled"; + promise.value = value; + }, + function (reason) { + promise.status = "rejected"; + promise.reason = reason; + } + ); + return promise; + } + function ignoreReject() {} + function preloadModule(metadata) { + for ( + var chunks = metadata[1], promises = [], i = 0; + i < chunks.length; + i++ + ) { + var thenable = __turbopack_load_by_url__(chunks[i]); + loadedChunks.has(thenable) || promises.push(thenable); + if (!instrumentedChunks.has(thenable)) { + var resolve = loadedChunks.add.bind(loadedChunks, thenable); + thenable.then(resolve, ignoreReject); + instrumentedChunks.add(thenable); + } + } + return 4 === metadata.length + ? 0 === promises.length + ? requireAsyncModule(metadata[0]) + : Promise.all(promises).then(function () { + return requireAsyncModule(metadata[0]); + }) + : 0 < promises.length + ? Promise.all(promises) + : null; + } + function requireModule(metadata) { + var moduleExports = __turbopack_require__(metadata[0]); + if (4 === metadata.length && "function" === typeof moduleExports.then) + if ("fulfilled" === moduleExports.status) + moduleExports = moduleExports.value; + else throw moduleExports.reason; + return "*" === metadata[2] + ? moduleExports + : "" === metadata[2] + ? moduleExports.__esModule + ? moduleExports.default + : moduleExports + : (Object.prototype.hasOwnProperty.call(moduleExports, metadata[2]) ? moduleExports[metadata[2]] : void 0); + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function isObjectPrototype(object) { + if (!object) return !1; + var ObjectPrototype = Object.prototype; + if (object === ObjectPrototype) return !0; + if (getPrototypeOf(object)) return !1; + object = Object.getOwnPropertyNames(object); + for (var i = 0; i < object.length; i++) + if (!(object[i] in ObjectPrototype)) return !1; + return !0; + } + function isSimpleObject(object) { + if (!isObjectPrototype(getPrototypeOf(object))) return !1; + for ( + var names = Object.getOwnPropertyNames(object), i = 0; + i < names.length; + i++ + ) { + var descriptor = Object.getOwnPropertyDescriptor(object, names[i]); + if ( + !descriptor || + (!descriptor.enumerable && + (("key" !== names[i] && "ref" !== names[i]) || + "function" !== typeof descriptor.get)) + ) + return !1; + } + return !0; + } + function objectName(object) { + object = Object.prototype.toString.call(object); + return object.slice(8, object.length - 1); + } + function describeKeyForErrorMessage(key) { + var encodedKey = JSON.stringify(key); + return '"' + key + '"' === encodedKey ? key : encodedKey; + } + function describeValueForErrorMessage(value) { + switch (typeof value) { + case "string": + return JSON.stringify( + 10 >= value.length ? value : value.slice(0, 10) + "..." + ); + case "object": + if (isArrayImpl(value)) return "[...]"; + if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG) + return "client"; + value = objectName(value); + return "Object" === value ? "{...}" : value; + case "function": + return value.$$typeof === CLIENT_REFERENCE_TAG + ? "client" + : (value = value.displayName || value.name) + ? "function " + value + : "function"; + default: + return String(value); + } + } + function describeElementType(type) { + if ("string" === typeof type) return type; + switch (type) { + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeElementType(type.render); + case REACT_MEMO_TYPE: + return describeElementType(type.type); + case REACT_LAZY_TYPE: + var payload = type._payload; + type = type._init; + try { + return describeElementType(type(payload)); + } catch (x) {} + } + return ""; + } + function describeObjectForErrorMessage(objectOrArray, expandedName) { + var objKind = objectName(objectOrArray); + if ("Object" !== objKind && "Array" !== objKind) return objKind; + var start = -1, + length = 0; + if (isArrayImpl(objectOrArray)) + if (jsxChildrenParents.has(objectOrArray)) { + var type = jsxChildrenParents.get(objectOrArray); + objKind = "<" + describeElementType(type) + ">"; + for (var i = 0; i < objectOrArray.length; i++) { + var value = objectOrArray[i]; + value = + "string" === typeof value + ? value + : "object" === typeof value && null !== value + ? "{" + describeObjectForErrorMessage(value) + "}" + : "{" + describeValueForErrorMessage(value) + "}"; + "" + i === expandedName + ? ((start = objKind.length), + (length = value.length), + (objKind += value)) + : (objKind = + 15 > value.length && 40 > objKind.length + value.length + ? objKind + value + : objKind + "{...}"); + } + objKind += ""; + } else { + objKind = "["; + for (type = 0; type < objectOrArray.length; type++) + 0 < type && (objKind += ", "), + (i = objectOrArray[type]), + (i = + "object" === typeof i && null !== i + ? describeObjectForErrorMessage(i) + : describeValueForErrorMessage(i)), + "" + type === expandedName + ? ((start = objKind.length), + (length = i.length), + (objKind += i)) + : (objKind = + 10 > i.length && 40 > objKind.length + i.length + ? objKind + i + : objKind + "..."); + objKind += "]"; + } + else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) + objKind = "<" + describeElementType(objectOrArray.type) + "/>"; + else { + if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return "client"; + if (jsxPropsParents.has(objectOrArray)) { + objKind = jsxPropsParents.get(objectOrArray); + objKind = "<" + (describeElementType(objKind) || "..."); + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) { + objKind += " "; + value = type[i]; + objKind += describeKeyForErrorMessage(value) + "="; + var _value2 = objectOrArray[value]; + var _substr2 = + value === expandedName && + "object" === typeof _value2 && + null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2); + "string" !== typeof _value2 && (_substr2 = "{" + _substr2 + "}"); + value === expandedName + ? ((start = objKind.length), + (length = _substr2.length), + (objKind += _substr2)) + : (objKind = + 10 > _substr2.length && 40 > objKind.length + _substr2.length + ? objKind + _substr2 + : objKind + "..."); + } + objKind += ">"; + } else { + objKind = "{"; + type = Object.keys(objectOrArray); + for (i = 0; i < type.length; i++) + 0 < i && (objKind += ", "), + (value = type[i]), + (objKind += describeKeyForErrorMessage(value) + ": "), + (_value2 = objectOrArray[value]), + (_value2 = + "object" === typeof _value2 && null !== _value2 + ? describeObjectForErrorMessage(_value2) + : describeValueForErrorMessage(_value2)), + value === expandedName + ? ((start = objKind.length), + (length = _value2.length), + (objKind += _value2)) + : (objKind = + 10 > _value2.length && 40 > objKind.length + _value2.length + ? objKind + _value2 + : objKind + "..."); + objKind += "}"; + } + } + return void 0 === expandedName + ? objKind + : -1 < start && 0 < length + ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)), + "\n " + objKind + "\n " + objectOrArray) + : "\n " + objKind; + } + function serializeNumber(number) { + return Number.isFinite(number) + ? 0 === number && -Infinity === 1 / number + ? "$-0" + : number + : Infinity === number + ? "$Infinity" + : -Infinity === number + ? "$-Infinity" + : "$NaN"; + } + function processReply( + root, + formFieldPrefix, + temporaryReferences, + resolve, + reject + ) { + function serializeTypedArray(tag, typedArray) { + typedArray = new Blob([ + new Uint8Array( + typedArray.buffer, + typedArray.byteOffset, + typedArray.byteLength + ) + ]); + var blobId = nextPartId++; + null === formData && (formData = new FormData()); + formData.append(formFieldPrefix + blobId, typedArray); + return "$" + tag + blobId.toString(16); + } + function serializeBinaryReader(reader) { + function progress(entry) { + entry.done + ? ((entry = nextPartId++), + data.append(formFieldPrefix + entry, new Blob(buffer)), + data.append( + formFieldPrefix + streamId, + '"$o' + entry.toString(16) + '"' + ), + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data)) + : (buffer.push(entry.value), + reader.read(new Uint8Array(1024)).then(progress, reject)); + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++, + buffer = []; + reader.read(new Uint8Array(1024)).then(progress, reject); + return "$r" + streamId.toString(16); + } + function serializeReader(reader) { + function progress(entry) { + if (entry.done) + data.append(formFieldPrefix + streamId, "C"), + pendingParts--, + 0 === pendingParts && resolve(data); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, partJSON); + reader.read().then(progress, reject); + } catch (x) { + reject(x); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + reader.read().then(progress, reject); + return "$R" + streamId.toString(16); + } + function serializeReadableStream(stream) { + try { + var binaryReader = stream.getReader({ mode: "byob" }); + } catch (x) { + return serializeReader(stream.getReader()); + } + return serializeBinaryReader(binaryReader); + } + function serializeAsyncIterable(iterable, iterator) { + function progress(entry) { + if (entry.done) { + if (void 0 === entry.value) + data.append(formFieldPrefix + streamId, "C"); + else + try { + var partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, "C" + partJSON); + } catch (x) { + reject(x); + return; + } + pendingParts--; + 0 === pendingParts && resolve(data); + } else + try { + var _partJSON = JSON.stringify(entry.value, resolveToJSON); + data.append(formFieldPrefix + streamId, _partJSON); + iterator.next().then(progress, reject); + } catch (x$0) { + reject(x$0); + } + } + null === formData && (formData = new FormData()); + var data = formData; + pendingParts++; + var streamId = nextPartId++; + iterable = iterable === iterator; + iterator.next().then(progress, reject); + return "$" + (iterable ? "x" : "X") + streamId.toString(16); + } + function resolveToJSON(key, value) { + var originalValue = this[key]; + "object" !== typeof originalValue || + originalValue === value || + originalValue instanceof Date || + ("Object" !== objectName(originalValue) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(originalValue), + describeObjectForErrorMessage(this, key) + ) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s", + describeObjectForErrorMessage(this, key) + )); + if (null === value) return null; + if ("object" === typeof value) { + switch (value.$$typeof) { + case REACT_ELEMENT_TYPE: + if (void 0 !== temporaryReferences && -1 === key.indexOf(":")) { + var parentReference = writtenObjects.get(this); + if (void 0 !== parentReference) + return ( + temporaryReferences.set(parentReference + ":" + key, value), + "$T" + ); + } + throw Error( + "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + case REACT_LAZY_TYPE: + originalValue = value._payload; + var init = value._init; + null === formData && (formData = new FormData()); + pendingParts++; + try { + parentReference = init(originalValue); + var lazyId = nextPartId++, + partJSON = serializeModel(parentReference, lazyId); + formData.append(formFieldPrefix + lazyId, partJSON); + return "$" + lazyId.toString(16); + } catch (x) { + if ( + "object" === typeof x && + null !== x && + "function" === typeof x.then + ) { + pendingParts++; + var _lazyId = nextPartId++; + parentReference = function () { + try { + var _partJSON2 = serializeModel(value, _lazyId), + _data = formData; + _data.append(formFieldPrefix + _lazyId, _partJSON2); + pendingParts--; + 0 === pendingParts && resolve(_data); + } catch (reason) { + reject(reason); + } + }; + x.then(parentReference, parentReference); + return "$" + _lazyId.toString(16); + } + reject(x); + return null; + } finally { + pendingParts--; + } + } + if ("function" === typeof value.then) { + null === formData && (formData = new FormData()); + pendingParts++; + var promiseId = nextPartId++; + value.then(function (partValue) { + try { + var _partJSON3 = serializeModel(partValue, promiseId); + partValue = formData; + partValue.append(formFieldPrefix + promiseId, _partJSON3); + pendingParts--; + 0 === pendingParts && resolve(partValue); + } catch (reason) { + reject(reason); + } + }, reject); + return "$@" + promiseId.toString(16); + } + parentReference = writtenObjects.get(value); + if (void 0 !== parentReference) + if (modelRoot === value) modelRoot = null; + else return parentReference; + else + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference && + ((parentReference = parentReference + ":" + key), + writtenObjects.set(value, parentReference), + void 0 !== temporaryReferences && + temporaryReferences.set(parentReference, value))); + if (isArrayImpl(value)) return value; + if (value instanceof FormData) { + null === formData && (formData = new FormData()); + var _data3 = formData; + key = nextPartId++; + var prefix = formFieldPrefix + key + "_"; + value.forEach(function (originalValue, originalKey) { + _data3.append(prefix + originalKey, originalValue); + }); + return "$K" + key.toString(16); + } + if (value instanceof Map) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$Q" + key.toString(16) + ); + if (value instanceof Set) + return ( + (key = nextPartId++), + (parentReference = serializeModel(Array.from(value), key)), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$W" + key.toString(16) + ); + if (value instanceof ArrayBuffer) + return ( + (key = new Blob([value])), + (parentReference = nextPartId++), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + parentReference, key), + "$A" + parentReference.toString(16) + ); + if (value instanceof Int8Array) + return serializeTypedArray("O", value); + if (value instanceof Uint8Array) + return serializeTypedArray("o", value); + if (value instanceof Uint8ClampedArray) + return serializeTypedArray("U", value); + if (value instanceof Int16Array) + return serializeTypedArray("S", value); + if (value instanceof Uint16Array) + return serializeTypedArray("s", value); + if (value instanceof Int32Array) + return serializeTypedArray("L", value); + if (value instanceof Uint32Array) + return serializeTypedArray("l", value); + if (value instanceof Float32Array) + return serializeTypedArray("G", value); + if (value instanceof Float64Array) + return serializeTypedArray("g", value); + if (value instanceof BigInt64Array) + return serializeTypedArray("M", value); + if (value instanceof BigUint64Array) + return serializeTypedArray("m", value); + if (value instanceof DataView) return serializeTypedArray("V", value); + if ("function" === typeof Blob && value instanceof Blob) + return ( + null === formData && (formData = new FormData()), + (key = nextPartId++), + formData.append(formFieldPrefix + key, value), + "$B" + key.toString(16) + ); + if ((parentReference = getIteratorFn(value))) + return ( + (parentReference = parentReference.call(value)), + parentReference === value + ? ((key = nextPartId++), + (parentReference = serializeModel( + Array.from(parentReference), + key + )), + null === formData && (formData = new FormData()), + formData.append(formFieldPrefix + key, parentReference), + "$i" + key.toString(16)) + : Array.from(parentReference) + ); + if ( + "function" === typeof ReadableStream && + value instanceof ReadableStream + ) + return serializeReadableStream(value); + parentReference = value[ASYNC_ITERATOR]; + if ("function" === typeof parentReference) + return serializeAsyncIterable(value, parentReference.call(value)); + parentReference = getPrototypeOf(value); + if ( + parentReference !== ObjectPrototype && + (null === parentReference || + null !== getPrototypeOf(parentReference)) + ) { + if (void 0 === temporaryReferences) + throw Error( + "Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." + + describeObjectForErrorMessage(this, key) + ); + return "$T"; + } + value.$$typeof === REACT_CONTEXT_TYPE + ? console.error( + "React Context Providers cannot be passed to Server Functions from the Client.%s", + describeObjectForErrorMessage(this, key) + ) + : "Object" !== objectName(value) + ? console.error( + "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s", + objectName(value), + describeObjectForErrorMessage(this, key) + ) + : isSimpleObject(value) + ? Object.getOwnPropertySymbols && + ((parentReference = Object.getOwnPropertySymbols(value)), + 0 < parentReference.length && + console.error( + "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s", + parentReference[0].description, + describeObjectForErrorMessage(this, key) + )) + : console.error( + "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s", + describeObjectForErrorMessage(this, key) + ); + return value; + } + if ("string" === typeof value) { + if ("Z" === value[value.length - 1] && this[key] instanceof Date) + return "$D" + value; + key = "$" === value[0] ? "$" + value : value; + return key; + } + if ("boolean" === typeof value) return value; + if ("number" === typeof value) return serializeNumber(value); + if ("undefined" === typeof value) return "$undefined"; + if ("function" === typeof value) { + parentReference = knownServerReferences.get(value); + if (void 0 !== parentReference) + return ( + (key = JSON.stringify( + { id: parentReference.id, bound: parentReference.bound }, + resolveToJSON + )), + null === formData && (formData = new FormData()), + (parentReference = nextPartId++), + formData.set(formFieldPrefix + parentReference, key), + "$F" + parentReference.toString(16) + ); + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again." + ); + } + if ("symbol" === typeof value) { + if ( + void 0 !== temporaryReferences && + -1 === key.indexOf(":") && + ((parentReference = writtenObjects.get(this)), + void 0 !== parentReference) + ) + return ( + temporaryReferences.set(parentReference + ":" + key, value), "$T" + ); + throw Error( + "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options." + + describeObjectForErrorMessage(this, key) + ); + } + if ("bigint" === typeof value) return "$n" + value.toString(10); + throw Error( + "Type " + + typeof value + + " is not supported as an argument to a Server Function." + ); + } + function serializeModel(model, id) { + "object" === typeof model && + null !== model && + ((id = "$" + id.toString(16)), + writtenObjects.set(model, id), + void 0 !== temporaryReferences && temporaryReferences.set(id, model)); + modelRoot = model; + return JSON.stringify(model, resolveToJSON); + } + var nextPartId = 1, + pendingParts = 0, + formData = null, + writtenObjects = new WeakMap(), + modelRoot = root, + json = serializeModel(root, 0); + null === formData + ? resolve(json) + : (formData.set(formFieldPrefix + "0", json), + 0 === pendingParts && resolve(formData)); + return function () { + 0 < pendingParts && + ((pendingParts = 0), + null === formData ? resolve(json) : resolve(formData)); + }; + } + function createFakeServerFunction( + name, + filename, + sourceMap, + line, + col, + environmentName, + innerFunction + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 >= line + ? ((line = encodedName.length + 7), + (col = + "s=>({" + + encodedName + + " ".repeat(col < line ? 0 : col - line) + + ":(...args) => s(...args)})\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */")) + : (col = + "/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */" + + "\n".repeat(line - 2) + + "server=>({" + + encodedName + + ":\n" + + " ".repeat(1 > col ? 0 : col - 1) + + "(...args) => server(...args)})"); + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((col += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?s" + + fakeServerFunctionIdx++), + (col += "\n//# sourceMappingURL=" + sourceMap)) + : filename && (col += "\n//# sourceURL=" + filename); + try { + return (0, eval)(col)(innerFunction)[name]; + } catch (x) { + return innerFunction; + } + } + function registerBoundServerReference(reference, id, bound) { + knownServerReferences.has(reference) || + knownServerReferences.set(reference, { + id: id, + originalBind: reference.bind, + bound: bound + }); + } + function createBoundServerReference( + metaData, + callServer, + encodeFormAction, + findSourceMapURL + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return bound + ? "fulfilled" === bound.status + ? callServer(id, bound.value.concat(args)) + : Promise.resolve(bound).then(function (boundArgs) { + return callServer(id, boundArgs.concat(args)); + }) + : callServer(id, args); + } + var id = metaData.id, + bound = metaData.bound, + location = metaData.location; + if (location) { + encodeFormAction = metaData.name || ""; + var filename = location[1], + line = location[2]; + location = location[3]; + metaData = metaData.env || "Server"; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(filename, metaData); + action = createFakeServerFunction( + encodeFormAction, + filename, + findSourceMapURL, + line, + location, + metaData, + action + ); + } + registerBoundServerReference(action, id, bound); + return action; + } + function parseStackLocation(error) { + error = error.stack; + error.startsWith("Error: react-stack-top-frame\n") && + (error = error.slice(29)); + var endOfFirst = error.indexOf("\n"); + if (-1 !== endOfFirst) { + var endOfSecond = error.indexOf("\n", endOfFirst + 1); + endOfFirst = + -1 === endOfSecond + ? error.slice(endOfFirst + 1) + : error.slice(endOfFirst + 1, endOfSecond); + } else endOfFirst = error; + error = v8FrameRegExp.exec(endOfFirst); + if ( + !error && + ((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error) + ) + return null; + endOfFirst = error[1] || ""; + "" === endOfFirst && (endOfFirst = ""); + endOfSecond = error[2] || error[5] || ""; + "" === endOfSecond && (endOfSecond = ""); + return [ + endOfFirst, + endOfSecond, + +(error[3] || error[6]), + +(error[4] || error[7]) + ]; + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE + ? null + : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + 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"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ( + ("number" === typeof type.tag && + console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), + type.$$typeof) + ) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: + return ( + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" + ); + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) {} + } + return null; + } + function getArrayKind(array) { + for (var kind = 0, i = 0; i < array.length && 100 > i; i++) { + var value = array[i]; + if ("object" === typeof value && null !== value) + if ( + isArrayImpl(value) && + 2 === value.length && + "string" === typeof value[0] + ) { + if (0 !== kind && 3 !== kind) return 1; + kind = 3; + } else return 1; + else { + if ( + "function" === typeof value || + ("string" === typeof value && 50 < value.length) || + (0 !== kind && 2 !== kind) + ) + return 1; + kind = 2; + } + } + return kind; + } + function addObjectToProperties(object, properties, indent, prefix) { + var addedProperties = 0, + key; + for (key in object) + if ( + hasOwnProperty.call(object, key) && + "_" !== key[0] && + (addedProperties++, + addValueToProperties(key, object[key], properties, indent, prefix), + 100 <= addedProperties) + ) { + properties.push([ + prefix + + "\u00a0\u00a0".repeat(indent) + + "Only 100 properties are shown. React will not log more properties of this object.", + "" + ]); + break; + } + } + function addValueToProperties( + propertyName, + value, + properties, + indent, + prefix + ) { + switch (typeof value) { + case "object": + if (null === value) { + value = "null"; + break; + } else { + if (value.$$typeof === REACT_ELEMENT_TYPE) { + var typeName = getComponentNameFromType(value.type) || "\u2026", + key = value.key; + value = value.props; + var propsKeys = Object.keys(value), + propsLength = propsKeys.length; + if (null == key && 0 === propsLength) { + value = "<" + typeName + " />"; + break; + } + if ( + 3 > indent || + (1 === propsLength && + "children" === propsKeys[0] && + null == key) + ) { + value = "<" + typeName + " \u2026 />"; + break; + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "<" + typeName + ]); + null !== key && + addValueToProperties( + "key", + key, + properties, + indent + 1, + prefix + ); + propertyName = !1; + key = 0; + for (var propKey in value) + if ( + (key++, + "children" === propKey + ? null != value.children && + (!isArrayImpl(value.children) || + 0 < value.children.length) && + (propertyName = !0) + : hasOwnProperty.call(value, propKey) && + "_" !== propKey[0] && + addValueToProperties( + propKey, + value[propKey], + properties, + indent + 1, + prefix + ), + 100 <= key) + ) + break; + properties.push([ + "", + propertyName ? ">\u2026" : "/>" + ]); + return; + } + typeName = Object.prototype.toString.call(value); + propKey = typeName.slice(8, typeName.length - 1); + if ("Array" === propKey) + if ( + ((typeName = 100 < value.length), + (key = getArrayKind(value)), + 2 === key || 0 === key) + ) { + value = JSON.stringify( + typeName ? value.slice(0, 100).concat("\u2026") : value + ); + break; + } else if (3 === key) { + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "" + ]); + for ( + propertyName = 0; + propertyName < value.length && 100 > propertyName; + propertyName++ + ) + (propKey = value[propertyName]), + addValueToProperties( + propKey[0], + propKey[1], + properties, + indent + 1, + prefix + ); + typeName && + addValueToProperties( + (100).toString(), + "\u2026", + properties, + indent + 1, + prefix + ); + return; + } + if ("Promise" === propKey) { + if ("fulfilled" === value.status) { + if ( + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.value, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = + "Promise<" + (properties[1] || "Object") + ">"; + return; + } + } else if ( + "rejected" === value.status && + ((typeName = properties.length), + addValueToProperties( + propertyName, + value.reason, + properties, + indent, + prefix + ), + properties.length > typeName) + ) { + properties = properties[typeName]; + properties[1] = "Rejected Promise<" + properties[1] + ">"; + return; + } + properties.push([ + "\u00a0\u00a0".repeat(indent) + propertyName, + "Promise" + ]); + return; + } + "Object" === propKey && + (typeName = Object.getPrototypeOf(value)) && + "function" === typeof typeName.constructor && + (propKey = typeName.constructor.name); + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + "Object" === propKey ? (3 > indent ? "" : "\u2026") : propKey + ]); + 3 > indent && + addObjectToProperties(value, properties, indent + 1, prefix); + return; + } + case "function": + value = "" === value.name ? "() => {}" : value.name + "() {}"; + break; + case "string": + value = + "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects." === + value + ? "\u2026" + : JSON.stringify(value); + break; + case "undefined": + value = "undefined"; + break; + case "boolean": + value = value ? "true" : "false"; + break; + default: + value = String(value); + } + properties.push([ + prefix + "\u00a0\u00a0".repeat(indent) + propertyName, + value + ]); + } + function getIODescription(value) { + try { + switch (typeof value) { + case "function": + return value.name || ""; + case "object": + if (null === value) return ""; + if (value instanceof Error) return String(value.message); + if ("string" === typeof value.url) return value.url; + if ("string" === typeof value.href) return value.href; + if ("string" === typeof value.src) return value.src; + if ("string" === typeof value.currentSrc) return value.currentSrc; + if ("string" === typeof value.command) return value.command; + if ( + "object" === typeof value.request && + null !== value.request && + "string" === typeof value.request.url + ) + return value.request.url; + if ( + "object" === typeof value.response && + null !== value.response && + "string" === typeof value.response.url + ) + return value.response.url; + if ( + "string" === typeof value.id || + "number" === typeof value.id || + "bigint" === typeof value.id + ) + return String(value.id); + if ("string" === typeof value.name) return value.name; + var str = value.toString(); + return str.startsWith("[object ") || + 5 > str.length || + 500 < str.length + ? "" + : str; + case "string": + return 5 > value.length || 500 < value.length ? "" : value; + case "number": + case "bigint": + return String(value); + default: + return ""; + } + } catch (x) { + return ""; + } + } + function markAllTracksInOrder() { + supportsUserTiming && + (console.timeStamp( + "Server Requests Track", + 0.001, + 0.001, + "Server Requests \u269b", + void 0, + "primary-light" + ), + console.timeStamp( + "Server Components Track", + 0.001, + 0.001, + "Primary", + "Server Components \u269b", + "primary-light" + )); + } + function getIOColor(functionName) { + switch (functionName.charCodeAt(0) % 3) { + case 0: + return "tertiary-light"; + case 1: + return "tertiary"; + default: + return "tertiary-dark"; + } + } + function getIOLongName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + description = + "" === description ? ioInfo : ioInfo + " (" + description + ")"; + return env === rootEnv || void 0 === env + ? description + : description + " [" + env + "]"; + } + function getIOShortName(ioInfo, description, env, rootEnv) { + ioInfo = ioInfo.name; + env = env === rootEnv || void 0 === env ? "" : " [" + env + "]"; + var desc = ""; + rootEnv = 30 - ioInfo.length - env.length; + if (1 < rootEnv) { + var l = description.length; + if (0 < l && l <= rootEnv) desc = " (" + description + ")"; + else if ( + description.startsWith("http://") || + description.startsWith("https://") || + description.startsWith("/") + ) { + var queryIdx = description.indexOf("?"); + -1 === queryIdx && (queryIdx = description.length); + 47 === description.charCodeAt(queryIdx - 1) && queryIdx--; + desc = description.lastIndexOf("/", queryIdx - 1); + queryIdx - desc < rootEnv + ? (desc = " (\u2026" + description.slice(desc, queryIdx) + ")") + : ((l = description.slice(desc, desc + rootEnv / 2)), + (description = description.slice( + queryIdx - rootEnv / 2, + queryIdx + )), + (desc = + " (" + + (0 < desc ? "\u2026" : "") + + l + + "\u2026" + + description + + ")")); + } + } + return ioInfo + desc + env; + } + function logComponentAwait( + asyncInfo, + trackIdx, + startTime, + endTime, + rootEnv, + value + ) { + if (supportsUserTiming && 0 < endTime) { + var description = getIODescription(value), + name = getIOShortName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ), + entryName = "await " + name; + name = getIOColor(name); + var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("awaited value", value, properties, 0, ""); + asyncInfo = getIOLongName( + asyncInfo.awaited, + description, + asyncInfo.env, + rootEnv + ); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: name, + track: trackNames[trackIdx], + trackGroup: "Server Components \u269b", + properties: properties, + tooltipText: asyncInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + trackNames[trackIdx], + "Server Components \u269b", + name + ); + } + } + function logIOInfoErrored(ioInfo, rootEnv, error) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(error), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + debugTask + ? ((error = [ + [ + "rejected with", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]), + (ioInfo = + getIOLongName(ioInfo, description, ioInfo.env, rootEnv) + + " Rejected"), + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: "Server Requests \u269b", + properties: error, + tooltipText: ioInfo + } + } + }) + ), + performance.clearMeasures(entryName)) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + "error" + ); + } + } + function logIOInfo(ioInfo, rootEnv, value) { + var startTime = ioInfo.start, + endTime = ioInfo.end; + if (supportsUserTiming && 0 <= endTime) { + var description = getIODescription(value), + entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv), + color = getIOColor(entryName), + debugTask = ioInfo.debugTask; + entryName = "\u200b" + entryName; + if (debugTask) { + var properties = []; + "object" === typeof value && null !== value + ? addObjectToProperties(value, properties, 0, "") + : void 0 !== value && + addValueToProperties("Resolved", value, properties, 0, ""); + ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv); + debugTask.run( + performance.measure.bind(performance, entryName, { + start: 0 > startTime ? 0 : startTime, + end: endTime, + detail: { + devtools: { + color: color, + track: "Server Requests \u269b", + properties: properties, + tooltipText: ioInfo + } + } + }) + ); + performance.clearMeasures(entryName); + } else + console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + endTime, + "Server Requests \u269b", + void 0, + color + ); + } + } + function ReactPromise(status, value, reason) { + this.status = status; + this.value = value; + this.reason = reason; + this._children = []; + this._debugChunk = null; + this._debugInfo = []; + } + function unwrapWeakResponse(weakResponse) { + weakResponse = weakResponse.weak.deref(); + if (void 0 === weakResponse) + throw Error( + "We did not expect to receive new data after GC:ing the response." + ); + return weakResponse; + } + function closeDebugChannel(debugChannel) { + debugChannel.callback && debugChannel.callback(""); + } + function readChunk(chunk) { + switch (chunk.status) { + case "resolved_model": + initializeModelChunk(chunk); + break; + case "resolved_module": + initializeModuleChunk(chunk); + } + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "pending": + case "blocked": + case "halted": + throw chunk; + default: + throw chunk.reason; + } + } + function getRoot(weakResponse) { + weakResponse = unwrapWeakResponse(weakResponse); + return getChunk(weakResponse, 0); + } + function createPendingChunk(response) { + 0 === response._pendingChunks++ && + ((response._weakResponse.response = response), + null !== response._pendingInitialRender && + (clearTimeout(response._pendingInitialRender), + (response._pendingInitialRender = null))); + return new ReactPromise("pending", null, null); + } + function releasePendingChunk(response, chunk) { + "pending" === chunk.status && + 0 === --response._pendingChunks && + ((response._weakResponse.response = null), + (response._pendingInitialRender = setTimeout( + flushInitialRenderPerformance.bind(null, response), + 100 + ))); + } + function createErrorChunk(response, error) { + return new ReactPromise("rejected", null, error); + } + function moveDebugInfoFromChunkToInnerValue(chunk, value) { + value = resolveLazy(value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) || + ((chunk = chunk._debugInfo.splice(0)), + isArrayImpl(value._debugInfo) + ? value._debugInfo.unshift.apply(value._debugInfo, chunk) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: chunk + })); + } + function wakeChunk(listeners, value, chunk) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + moveDebugInfoFromChunkToInnerValue(chunk, value); + } + function rejectChunk(listeners, error) { + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + "function" === typeof listener + ? listener(error) + : rejectReference(listener, error); + } + } + function resolveBlockedCycle(resolvedChunk, reference) { + var referencedChunk = reference.handler.chunk; + if (null === referencedChunk) return null; + if (referencedChunk === resolvedChunk) return reference.handler; + reference = referencedChunk.value; + if (null !== reference) + for ( + referencedChunk = 0; + referencedChunk < reference.length; + referencedChunk++ + ) { + var listener = reference[referencedChunk]; + if ( + "function" !== typeof listener && + ((listener = resolveBlockedCycle(resolvedChunk, listener)), + null !== listener) + ) + return listener; + } + return null; + } + function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) { + switch (chunk.status) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + break; + case "blocked": + for (var i = 0; i < resolveListeners.length; i++) { + var listener = resolveListeners[i]; + if ("function" !== typeof listener) { + var cyclicHandler = resolveBlockedCycle(chunk, listener); + if (null !== cyclicHandler) + switch ( + (fulfillReference(listener, cyclicHandler.value, chunk), + resolveListeners.splice(i, 1), + i--, + null !== rejectListeners && + ((listener = rejectListeners.indexOf(listener)), + -1 !== listener && rejectListeners.splice(listener, 1)), + chunk.status) + ) { + case "fulfilled": + wakeChunk(resolveListeners, chunk.value, chunk); + return; + case "rejected": + null !== rejectListeners && + rejectChunk(rejectListeners, chunk.reason); + return; + } + } + } + case "pending": + if (chunk.value) + for (i = 0; i < resolveListeners.length; i++) + chunk.value.push(resolveListeners[i]); + else chunk.value = resolveListeners; + if (chunk.reason) { + if (rejectListeners) + for ( + resolveListeners = 0; + resolveListeners < rejectListeners.length; + resolveListeners++ + ) + chunk.reason.push(rejectListeners[resolveListeners]); + } else chunk.reason = rejectListeners; + break; + case "rejected": + rejectListeners && rejectChunk(rejectListeners, chunk.reason); + } + } + function triggerErrorOnChunk(response, chunk, error) { + if ("pending" !== chunk.status && "blocked" !== chunk.status) + chunk.reason.error(error); + else { + releasePendingChunk(response, chunk); + var listeners = chunk.reason; + if ("pending" === chunk.status && null != chunk._debugChunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + initializeDebugChunk(response, chunk); + } finally { + (initializingHandler = prevHandler), + (initializingChunk = prevChunk); + } + } + chunk.status = "rejected"; + chunk.reason = error; + null !== listeners && rejectChunk(listeners, error); + } + } + function createResolvedModelChunk(response, value) { + return new ReactPromise("resolved_model", value, response); + } + function createResolvedIteratorResultChunk(response, value, done) { + return new ReactPromise( + "resolved_model", + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}", + response + ); + } + function resolveIteratorResultChunk(response, chunk, value, done) { + resolveModelChunk( + response, + chunk, + (done ? '{"done":true,"value":' : '{"done":false,"value":') + + value + + "}" + ); + } + function resolveModelChunk(response, chunk, value) { + if ("pending" !== chunk.status) chunk.reason.enqueueModel(value); + else { + releasePendingChunk(response, chunk); + var resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "resolved_model"; + chunk.value = value; + chunk.reason = response; + null !== resolveListeners && + (initializeModelChunk(chunk), + wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners)); + } + } + function resolveModuleChunk(response, chunk, value) { + if ("pending" === chunk.status || "blocked" === chunk.status) { + releasePendingChunk(response, chunk); + response = chunk.value; + var rejectListeners = chunk.reason; + chunk.status = "resolved_module"; + chunk.value = value; + value = value[1]; + for (var debugInfo = [], i = 0; i < value.length; ) { + var chunkFilename = value[i++], + href = void 0, + target = debugInfo, + ioInfo = chunkIOInfoCache.get(chunkFilename); + if (void 0 === ioInfo) { + try { + href = new URL(chunkFilename, document.baseURI).href; + } catch (_) { + href = chunkFilename; + } + var end = (ioInfo = -1), + byteSize = 0; + if ("function" === typeof performance.getEntriesByType) + for ( + var resourceEntries = performance.getEntriesByType("resource"), + i$jscomp$0 = 0; + i$jscomp$0 < resourceEntries.length; + i$jscomp$0++ + ) { + var resourceEntry = resourceEntries[i$jscomp$0]; + resourceEntry.name === href && + ((ioInfo = resourceEntry.startTime), + (end = ioInfo + resourceEntry.duration), + (byteSize = resourceEntry.transferSize || 0)); + } + resourceEntries = Promise.resolve(href); + resourceEntries.status = "fulfilled"; + resourceEntries.value = href; + i$jscomp$0 = Error("react-stack-top-frame"); + i$jscomp$0.stack.startsWith("Error: react-stack-top-frame") + ? (i$jscomp$0.stack = + "Error: react-stack-top-frame\n at Client Component Bundle (" + + href + + ":1:1)\n at Client Component Bundle (" + + href + + ":1:1)") + : (i$jscomp$0.stack = + "Client Component Bundle@" + + href + + ":1:1\nClient Component Bundle@" + + href + + ":1:1"); + ioInfo = { + name: "script", + start: ioInfo, + end: end, + value: resourceEntries, + debugStack: i$jscomp$0 + }; + 0 < byteSize && (ioInfo.byteSize = byteSize); + chunkIOInfoCache.set(chunkFilename, ioInfo); + } + target.push({ awaited: ioInfo }); + } + null !== debugInfo && + chunk._debugInfo.push.apply(chunk._debugInfo, debugInfo); + null !== response && + (initializeModuleChunk(chunk), + wakeChunkIfInitialized(chunk, response, rejectListeners)); + } + } + function initializeDebugChunk(response, chunk) { + var debugChunk = chunk._debugChunk; + if (null !== debugChunk) { + var debugInfo = chunk._debugInfo; + try { + if ("resolved_model" === debugChunk.status) { + for ( + var idx = debugInfo.length, c = debugChunk._debugChunk; + null !== c; + + ) + "fulfilled" !== c.status && idx++, (c = c._debugChunk); + initializeModelChunk(debugChunk); + switch (debugChunk.status) { + case "fulfilled": + debugInfo[idx] = initializeDebugInfo( + response, + debugChunk.value + ); + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + debugInfo, + "" + idx, + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } else + switch (debugChunk.status) { + case "fulfilled": + break; + case "blocked": + case "pending": + waitForReference( + debugChunk, + {}, + "debug", + response, + initializeDebugInfo, + [""], + !0 + ); + break; + default: + throw debugChunk.reason; + } + } catch (error) { + triggerErrorOnChunk(response, chunk, error); + } + } + } + function initializeModelChunk(chunk) { + var prevHandler = initializingHandler, + prevChunk = initializingChunk; + initializingHandler = null; + var resolvedModel = chunk.value, + response = chunk.reason; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + initializeDebugChunk(response, chunk); + try { + var value = JSON.parse(resolvedModel, response._fromJSON), + resolveListeners = chunk.value; + if (null !== resolveListeners) + for ( + chunk.value = null, chunk.reason = null, resolvedModel = 0; + resolvedModel < resolveListeners.length; + resolvedModel++ + ) { + var listener = resolveListeners[resolvedModel]; + "function" === typeof listener + ? listener(value) + : fulfillReference(listener, value, chunk); + } + if (null !== initializingHandler) { + if (initializingHandler.errored) throw initializingHandler.reason; + if (0 < initializingHandler.deps) { + initializingHandler.value = value; + initializingHandler.chunk = chunk; + return; + } + } + chunk.status = "fulfilled"; + chunk.value = value; + moveDebugInfoFromChunkToInnerValue(chunk, value); + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } finally { + (initializingHandler = prevHandler), (initializingChunk = prevChunk); + } + } + function initializeModuleChunk(chunk) { + try { + var value = requireModule(chunk.value); + chunk.status = "fulfilled"; + chunk.value = value; + } catch (error) { + (chunk.status = "rejected"), (chunk.reason = error); + } + } + function reportGlobalError(weakResponse, error) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse); + response._closed = !0; + response._closedReason = error; + response._chunks.forEach(function (chunk) { + "pending" === chunk.status && + triggerErrorOnChunk(response, chunk, error); + }); + weakResponse = response._debugChannel; + void 0 !== weakResponse && + (closeDebugChannel(weakResponse), + (response._debugChannel = void 0), + null !== debugChannelRegistry && + debugChannelRegistry.unregister(response)); + } + } + function nullRefGetter() { + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("function" === typeof type) return '"use client"'; + if ( + "object" === typeof type && + null !== type && + type.$$typeof === REACT_LAZY_TYPE + ) + return type._init === readChunk ? '"use client"' : "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function initializeElement(response, element, lazyNode) { + var stack = element._debugStack, + owner = element._owner; + null === owner && (element._owner = response._debugRootOwner); + var env = response._rootEnvironmentName; + null !== owner && null != owner.env && (env = owner.env); + var normalizedStackTrace = null; + null === owner && null != response._debugRootStack + ? (normalizedStackTrace = response._debugRootStack) + : null !== stack && + (normalizedStackTrace = createFakeJSXCallStackInDEV( + response, + stack, + env + )); + element._debugStack = normalizedStackTrace; + normalizedStackTrace = null; + supportsCreateTask && + null !== stack && + ((normalizedStackTrace = console.createTask.bind( + console, + getTaskName(element.type) + )), + (stack = buildFakeCallStack( + response, + stack, + env, + !1, + normalizedStackTrace + )), + (env = null === owner ? null : initializeFakeTask(response, owner)), + null === env + ? ((env = response._debugRootTask), + (normalizedStackTrace = null != env ? env.run(stack) : stack())) + : (normalizedStackTrace = env.run(stack))); + element._debugTask = normalizedStackTrace; + null !== owner && initializeFakeStack(response, owner); + null !== lazyNode && + (lazyNode._store && + lazyNode._store.validated && + !element._store.validated && + (element._store.validated = lazyNode._store.validated), + "fulfilled" === lazyNode._payload.status && + lazyNode._debugInfo && + ((response = lazyNode._debugInfo.splice(0)), + element._debugInfo + ? element._debugInfo.unshift.apply(element._debugInfo, response) + : Object.defineProperty(element, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: response + }))); + Object.freeze(element.props); + } + function createLazyChunkWrapper(chunk, validated) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: chunk, + _init: readChunk + }; + lazyType._debugInfo = chunk._debugInfo; + lazyType._store = { validated: validated }; + return lazyType; + } + function getChunk(response, id) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk || + ((chunk = response._closed + ? createErrorChunk(response, response._closedReason) + : createPendingChunk(response)), + chunks.set(id, chunk)); + return chunk; + } + function fulfillReference(reference, value, fulfilledChunk) { + for ( + var response = reference.response, + handler = reference.handler, + parentObject = reference.parentObject, + key = reference.key, + map = reference.map, + path = reference.path, + i = 1; + i < path.length; + i++ + ) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((value = value._payload), value === handler.chunk)) + value = handler.value; + else { + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + continue; + case "blocked": + var cyclicHandler = resolveBlockedCycle(value, reference); + if (null !== cyclicHandler) { + value = cyclicHandler.value; + continue; + } + case "pending": + path.splice(0, i - 1); + null === value.value + ? (value.value = [reference]) + : value.value.push(reference); + null === value.reason + ? (value.reason = [reference]) + : value.reason.push(reference); + return; + case "halted": + return; + default: + rejectReference(reference, value.reason); + return; + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) + if (((path = value._payload), path === handler.chunk)) + value = handler.value; + else { + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + parentObject[key] = response; + "" === key && null === handler.value && (handler.value = response); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((reference = handler.value), key)) { + case "3": + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + reference.props = response; + break; + case "4": + reference._owner = response; + break; + case "5": + reference._debugStack = response; + break; + default: + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + } + else + reference.isDebug || + transferReferencedDebugInfo(handler.chunk, fulfilledChunk); + handler.deps--; + 0 === handler.deps && + ((fulfilledChunk = handler.chunk), + null !== fulfilledChunk && + "blocked" === fulfilledChunk.status && + ((key = fulfilledChunk.value), + (fulfilledChunk.status = "fulfilled"), + (fulfilledChunk.value = handler.value), + (fulfilledChunk.reason = handler.reason), + null !== key + ? wakeChunk(key, handler.value, fulfilledChunk) + : moveDebugInfoFromChunkToInnerValue( + fulfilledChunk, + handler.value + ))); + } + function rejectReference(reference, error) { + var handler = reference.handler; + reference = reference.response; + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + handler = handler.chunk; + if (null !== handler && "blocked" === handler.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + handler._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(reference, handler, error); + } + } + } + function waitForReference( + referencedChunk, + parentObject, + key, + response, + map, + path, + isAwaitingDebugInfo + ) { + if ( + !( + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + "pending" !== referencedChunk.status || + parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key) + ) + ) + return null; + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + parentObject = { + response: response, + handler: handler, + parentObject: parentObject, + key: key, + map: map, + path: path + }; + parentObject.isDebug = isAwaitingDebugInfo; + null === referencedChunk.value + ? (referencedChunk.value = [parentObject]) + : referencedChunk.value.push(parentObject); + null === referencedChunk.reason + ? (referencedChunk.reason = [parentObject]) + : referencedChunk.reason.push(parentObject); + return null; + } + function loadServerReference(response, metaData, parentObject, key) { + if (!response._serverReferenceConfig) + return createBoundServerReference( + metaData, + response._callServer, + response._encodeFormAction, + response._debugFindSourceMapURL + ); + var serverReference = resolveServerReference( + response._serverReferenceConfig, + metaData.id + ), + promise = preloadModule(serverReference); + if (promise) + metaData.bound && (promise = Promise.all([promise, metaData.bound])); + else if (metaData.bound) promise = Promise.resolve(metaData.bound); + else + return ( + (promise = requireModule(serverReference)), + registerBoundServerReference(promise, metaData.id, metaData.bound), + promise + ); + if (initializingHandler) { + var handler = initializingHandler; + handler.deps++; + } else + handler = initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }; + promise.then( + function () { + var resolvedValue = requireModule(serverReference); + if (metaData.bound) { + var boundArgs = metaData.bound.value.slice(0); + boundArgs.unshift(null); + resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs); + } + registerBoundServerReference( + resolvedValue, + metaData.id, + metaData.bound + ); + parentObject[key] = resolvedValue; + "" === key && + null === handler.value && + (handler.value = resolvedValue); + if ( + parentObject[0] === REACT_ELEMENT_TYPE && + "object" === typeof handler.value && + null !== handler.value && + handler.value.$$typeof === REACT_ELEMENT_TYPE + ) + switch (((boundArgs = handler.value), key)) { + case "3": + boundArgs.props = resolvedValue; + break; + case "4": + boundArgs._owner = resolvedValue; + } + handler.deps--; + 0 === handler.deps && + ((resolvedValue = handler.chunk), + null !== resolvedValue && + "blocked" === resolvedValue.status && + ((boundArgs = resolvedValue.value), + (resolvedValue.status = "fulfilled"), + (resolvedValue.value = handler.value), + null !== boundArgs + ? wakeChunk(boundArgs, handler.value, resolvedValue) + : moveDebugInfoFromChunkToInnerValue( + resolvedValue, + handler.value + ))); + }, + function (error) { + if (!handler.errored) { + var blockedValue = handler.value; + handler.errored = !0; + handler.value = null; + handler.reason = error; + var chunk = handler.chunk; + if (null !== chunk && "blocked" === chunk.status) { + if ( + "object" === typeof blockedValue && + null !== blockedValue && + blockedValue.$$typeof === REACT_ELEMENT_TYPE + ) { + var erroredComponent = { + name: getComponentNameFromType(blockedValue.type) || "", + owner: blockedValue._owner + }; + erroredComponent.debugStack = blockedValue._debugStack; + supportsCreateTask && + (erroredComponent.debugTask = blockedValue._debugTask); + chunk._debugInfo.push(erroredComponent); + } + triggerErrorOnChunk(response, chunk, error); + } + } + } + ); + return null; + } + function resolveLazy(value) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + var payload = value._payload; + if ("fulfilled" === payload.status) value = payload.value; + else break; + } + return value; + } + function transferReferencedDebugInfo(parentChunk, referencedChunk) { + if (null !== parentChunk) { + referencedChunk = referencedChunk._debugInfo; + parentChunk = parentChunk._debugInfo; + for (var i = 0; i < referencedChunk.length; ++i) { + var debugInfoEntry = referencedChunk[i]; + null == debugInfoEntry.name && parentChunk.push(debugInfoEntry); + } + } + } + function getOutlinedModel(response, reference, parentObject, key, map) { + var path = reference.split(":"); + reference = parseInt(path[0], 16); + reference = getChunk(response, reference); + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(reference); + switch (reference.status) { + case "resolved_model": + initializeModelChunk(reference); + break; + case "resolved_module": + initializeModuleChunk(reference); + } + switch (reference.status) { + case "fulfilled": + for (var value = reference.value, i = 1; i < path.length; i++) { + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + value = value._payload; + switch (value.status) { + case "resolved_model": + initializeModelChunk(value); + break; + case "resolved_module": + initializeModuleChunk(value); + } + switch (value.status) { + case "fulfilled": + value = value.value; + break; + case "blocked": + case "pending": + return waitForReference( + value, + parentObject, + key, + response, + map, + path.slice(i - 1), + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), + parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = value.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: value.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + (typeof value === "object" && value !== null && Object.prototype.hasOwnProperty.call(value, path[i]) ? value = value[path[i]] : (value = undefined)); + } + for ( + ; + "object" === typeof value && + null !== value && + value.$$typeof === REACT_LAZY_TYPE; + + ) { + path = value._payload; + switch (path.status) { + case "resolved_model": + initializeModelChunk(path); + break; + case "resolved_module": + initializeModuleChunk(path); + } + switch (path.status) { + case "fulfilled": + value = path.value; + continue; + } + break; + } + response = map(response, value, parentObject, key); + (parentObject[0] !== REACT_ELEMENT_TYPE || + ("4" !== key && "5" !== key)) && + transferReferencedDebugInfo(initializingChunk, reference); + return response; + case "pending": + case "blocked": + return waitForReference( + reference, + parentObject, + key, + response, + map, + path, + !1 + ); + case "halted": + return ( + initializingHandler + ? ((parentObject = initializingHandler), parentObject.deps++) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: null, + deps: 1, + errored: !1 + }), + null + ); + default: + return ( + initializingHandler + ? ((initializingHandler.errored = !0), + (initializingHandler.value = null), + (initializingHandler.reason = reference.reason)) + : (initializingHandler = { + parent: null, + chunk: null, + value: null, + reason: reference.reason, + deps: 0, + errored: !0 + }), + null + ); + } + } + function createMap(response, model) { + return new Map(model); + } + function createSet(response, model) { + return new Set(model); + } + function createBlob(response, model) { + return new Blob(model.slice(1), { type: model[0] }); + } + function createFormData(response, model) { + response = new FormData(); + for (var i = 0; i < model.length; i++) + response.append(model[i][0], model[i][1]); + return response; + } + function applyConstructor(response, model, parentObject) { + Object.setPrototypeOf(parentObject, model.prototype); + } + function defineLazyGetter(response, chunk, parentObject, key) { + Object.defineProperty(parentObject, key, { + get: function () { + "resolved_model" === chunk.status && initializeModelChunk(chunk); + switch (chunk.status) { + case "fulfilled": + return chunk.value; + case "rejected": + throw chunk.reason; + } + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + } + function extractIterator(response, model) { + return model[Symbol.iterator](); + } + function createModel(response, model) { + return model; + } + function getInferredFunctionApproximate(code) { + code = code.startsWith("Object.defineProperty(") + ? code.slice(22) + : code.startsWith("(") + ? code.slice(1) + : code; + if (code.startsWith("async function")) { + var idx = code.indexOf("(", 14); + if (-1 !== idx) + return ( + (code = code.slice(14, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":async function(){}})")[ + code + ] + ); + } else if (code.startsWith("function")) { + if (((idx = code.indexOf("(", 8)), -1 !== idx)) + return ( + (code = code.slice(8, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":function(){}})")[code] + ); + } else if ( + code.startsWith("class") && + ((idx = code.indexOf("{", 5)), -1 !== idx) + ) + return ( + (code = code.slice(5, idx).trim()), + (0, eval)("({" + JSON.stringify(code) + ":class{}})")[code] + ); + return function () {}; + } + function parseModelString(response, parentObject, key, value) { + if ("$" === value[0]) { + if ("$" === value) + return ( + null !== initializingHandler && + "0" === key && + (initializingHandler = { + parent: initializingHandler, + chunk: null, + value: null, + reason: null, + deps: 0, + errored: !1 + }), + REACT_ELEMENT_TYPE + ); + switch (value[1]) { + case "$": + return value.slice(1); + case "L": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + createLazyChunkWrapper(response, 0) + ); + case "@": + return ( + (parentObject = parseInt(value.slice(2), 16)), + (response = getChunk(response, parentObject)), + null !== initializingChunk && + isArrayImpl(initializingChunk._children) && + initializingChunk._children.push(response), + response + ); + case "S": + return Symbol.for(value.slice(2)); + case "F": + var ref = value.slice(2); + return getOutlinedModel( + response, + ref, + parentObject, + key, + loadServerReference + ); + case "T": + parentObject = "$" + value.slice(2); + response = response._tempRefs; + if (null == response) + throw Error( + "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply." + ); + return response.get(parentObject); + case "Q": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createMap) + ); + case "W": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createSet) + ); + case "B": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createBlob) + ); + case "K": + return ( + (ref = value.slice(2)), + getOutlinedModel(response, ref, parentObject, key, createFormData) + ); + case "Z": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + resolveErrorDev + ) + ); + case "i": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + extractIterator + ) + ); + case "I": + return Infinity; + case "-": + return "$-0" === value ? -0 : -Infinity; + case "N": + return NaN; + case "u": + return; + case "D": + return new Date(Date.parse(value.slice(2))); + case "n": + return BigInt(value.slice(2)); + case "P": + return ( + (ref = value.slice(2)), + getOutlinedModel( + response, + ref, + parentObject, + key, + applyConstructor + ) + ); + case "E": + response = value.slice(2); + try { + if (!mightHaveStaticConstructor.test(response)) + return (0, eval)(response); + } catch (x) {} + try { + if ( + ((ref = getInferredFunctionApproximate(response)), + response.startsWith("Object.defineProperty(")) + ) { + var idx = response.lastIndexOf(',"name",{value:"'); + if (-1 !== idx) { + var name = JSON.parse( + response.slice(idx + 16 - 1, response.length - 2) + ); + Object.defineProperty(ref, "name", { value: name }); + } + } + } catch (_) { + ref = function () {}; + } + return ref; + case "Y": + if ( + 2 < value.length && + (ref = response._debugChannel && response._debugChannel.callback) + ) { + if ("@" === value[2]) + return ( + (parentObject = value.slice(3)), + (key = parseInt(parentObject, 16)), + response._chunks.has(key) || ref("P:" + parentObject), + getChunk(response, key) + ); + value = value.slice(2); + idx = parseInt(value, 16); + response._chunks.has(idx) || ref("Q:" + value); + ref = getChunk(response, idx); + return "fulfilled" === ref.status + ? ref.value + : defineLazyGetter(response, ref, parentObject, key); + } + Object.defineProperty(parentObject, key, { + get: function () { + return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."; + }, + enumerable: !0, + configurable: !1 + }); + return null; + default: + return ( + (ref = value.slice(1)), + getOutlinedModel(response, ref, parentObject, key, createModel) + ); + } + } + return value; + } + function missingCall() { + throw Error( + 'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.' + ); + } + function markIOStarted() { + this._debugIOStarted = !0; + } + function ResponseInstance( + bundlerConfig, + serverReferenceConfig, + moduleLoading, + callServer, + encodeFormAction, + nonce, + temporaryReferences, + findSourceMapURL, + replayConsole, + environmentName, + debugStartTime, + debugChannel + ) { + var chunks = new Map(); + this._bundlerConfig = bundlerConfig; + this._serverReferenceConfig = serverReferenceConfig; + this._moduleLoading = moduleLoading; + this._callServer = void 0 !== callServer ? callServer : missingCall; + this._encodeFormAction = encodeFormAction; + this._nonce = nonce; + this._chunks = chunks; + this._stringDecoder = new TextDecoder(); + this._fromJSON = null; + this._closed = !1; + this._closedReason = null; + this._tempRefs = temporaryReferences; + this._timeOrigin = 0; + this._pendingInitialRender = null; + this._pendingChunks = 0; + this._weakResponse = { weak: new WeakRef(this), response: this }; + this._debugRootOwner = bundlerConfig = + void 0 === ReactSharedInteralsServer || + null === ReactSharedInteralsServer.A + ? null + : ReactSharedInteralsServer.A.getOwner(); + this._debugRootStack = + null !== bundlerConfig ? Error("react-stack-top-frame") : null; + environmentName = void 0 === environmentName ? "Server" : environmentName; + supportsCreateTask && + (this._debugRootTask = console.createTask( + '"use ' + environmentName.toLowerCase() + '"' + )); + this._debugStartTime = + null == debugStartTime ? performance.now() : debugStartTime; + this._debugIOStarted = !1; + setTimeout(markIOStarted.bind(this), 0); + this._debugFindSourceMapURL = findSourceMapURL; + this._debugChannel = debugChannel; + this._blockedConsole = null; + this._replayConsole = replayConsole; + this._rootEnvironmentName = environmentName; + debugChannel && + (null === debugChannelRegistry + ? (closeDebugChannel(debugChannel), (this._debugChannel = void 0)) + : debugChannelRegistry.register(this, debugChannel, this)); + replayConsole && markAllTracksInOrder(); + this._fromJSON = createFromJSONCallback(this); + } + function createStreamState(weakResponse, streamDebugValue) { + var streamState = { + _rowState: 0, + _rowID: 0, + _rowTag: 0, + _rowLength: 0, + _buffer: [] + }; + weakResponse = unwrapWeakResponse(weakResponse); + var debugValuePromise = Promise.resolve(streamDebugValue); + debugValuePromise.status = "fulfilled"; + debugValuePromise.value = streamDebugValue; + streamState._debugInfo = { + name: "rsc stream", + start: weakResponse._debugStartTime, + end: weakResponse._debugStartTime, + byteSize: 0, + value: debugValuePromise, + owner: weakResponse._debugRootOwner, + debugStack: weakResponse._debugRootStack, + debugTask: weakResponse._debugRootTask + }; + streamState._debugTargetChunkSize = MIN_CHUNK_SIZE; + return streamState; + } + function incrementChunkDebugInfo(streamState, chunkLength) { + var debugInfo = streamState._debugInfo, + endTime = performance.now(), + previousEndTime = debugInfo.end; + chunkLength = debugInfo.byteSize + chunkLength; + chunkLength > streamState._debugTargetChunkSize || + endTime > previousEndTime + 10 + ? ((streamState._debugInfo = { + name: debugInfo.name, + start: debugInfo.start, + end: endTime, + byteSize: chunkLength, + value: debugInfo.value, + owner: debugInfo.owner, + debugStack: debugInfo.debugStack, + debugTask: debugInfo.debugTask + }), + (streamState._debugTargetChunkSize = chunkLength + MIN_CHUNK_SIZE)) + : ((debugInfo.end = endTime), (debugInfo.byteSize = chunkLength)); + } + function addAsyncInfo(chunk, asyncInfo) { + var value = resolveLazy(chunk.value); + "object" !== typeof value || + null === value || + (!isArrayImpl(value) && + "function" !== typeof value[ASYNC_ITERATOR] && + value.$$typeof !== REACT_ELEMENT_TYPE && + value.$$typeof !== REACT_LAZY_TYPE) + ? chunk._debugInfo.push(asyncInfo) + : isArrayImpl(value._debugInfo) + ? value._debugInfo.push(asyncInfo) + : Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: [asyncInfo] + }); + } + function resolveChunkDebugInfo(response, streamState, chunk) { + response._debugIOStarted && + ((response = { awaited: streamState._debugInfo }), + "pending" === chunk.status || "blocked" === chunk.status + ? ((response = addAsyncInfo.bind(null, chunk, response)), + chunk.then(response, response)) + : addAsyncInfo(chunk, response)); + } + function resolveBuffer(response, id, buffer, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk && "pending" !== chunk.status + ? chunk.reason.enqueueValue(buffer) + : (chunk && releasePendingChunk(response, chunk), + (buffer = new ReactPromise("fulfilled", buffer, null)), + resolveChunkDebugInfo(response, streamState, buffer), + chunks.set(id, buffer)); + } + function resolveModule(response, id, model, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + model = JSON.parse(model, response._fromJSON); + var clientReference = resolveClientReference( + response._bundlerConfig, + model + ); + if ((model = preloadModule(clientReference))) { + if (chunk) { + releasePendingChunk(response, chunk); + var blockedChunk = chunk; + blockedChunk.status = "blocked"; + } else + (blockedChunk = new ReactPromise("blocked", null, null)), + chunks.set(id, blockedChunk); + resolveChunkDebugInfo(response, streamState, blockedChunk); + model.then( + function () { + return resolveModuleChunk(response, blockedChunk, clientReference); + }, + function (error) { + return triggerErrorOnChunk(response, blockedChunk, error); + } + ); + } else + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModuleChunk(response, chunk, clientReference)) + : ((chunk = new ReactPromise( + "resolved_module", + clientReference, + null + )), + resolveChunkDebugInfo(response, streamState, chunk), + chunks.set(id, chunk)); + } + function resolveStream(response, id, stream, controller, streamState) { + var chunks = response._chunks, + chunk = chunks.get(id); + if (chunk) { + if ( + (resolveChunkDebugInfo(response, streamState, chunk), + "pending" === chunk.status) + ) { + releasePendingChunk(response, chunk); + id = chunk.value; + if (null != chunk._debugChunk) { + streamState = initializingHandler; + chunks = initializingChunk; + initializingHandler = null; + chunk.status = "blocked"; + chunk.value = null; + chunk.reason = null; + initializingChunk = chunk; + try { + if ( + (initializeDebugChunk(response, chunk), + null !== initializingHandler && + !initializingHandler.errored && + 0 < initializingHandler.deps) + ) { + initializingHandler.value = stream; + initializingHandler.reason = controller; + initializingHandler.chunk = chunk; + return; + } + } finally { + (initializingHandler = streamState), (initializingChunk = chunks); + } + } + chunk.status = "fulfilled"; + chunk.value = stream; + chunk.reason = controller; + null !== id + ? wakeChunk(id, chunk.value, chunk) + : moveDebugInfoFromChunkToInnerValue(chunk, stream); + } + } else + (stream = new ReactPromise("fulfilled", stream, controller)), + resolveChunkDebugInfo(response, streamState, stream), + chunks.set(id, stream); + } + function startReadableStream(response, id, type, streamState) { + var controller = null; + type = new ReadableStream({ + type: type, + start: function (c) { + controller = c; + } + }); + var previousBlockedChunk = null; + resolveStream( + response, + id, + type, + { + enqueueValue: function (value) { + null === previousBlockedChunk + ? controller.enqueue(value) + : previousBlockedChunk.then(function () { + controller.enqueue(value); + }); + }, + enqueueModel: function (json) { + if (null === previousBlockedChunk) { + var chunk = createResolvedModelChunk(response, json); + initializeModelChunk(chunk); + "fulfilled" === chunk.status + ? controller.enqueue(chunk.value) + : (chunk.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ), + (previousBlockedChunk = chunk)); + } else { + chunk = previousBlockedChunk; + var _chunk3 = createPendingChunk(response); + _chunk3.then( + function (v) { + return controller.enqueue(v); + }, + function (e) { + return controller.error(e); + } + ); + previousBlockedChunk = _chunk3; + chunk.then(function () { + previousBlockedChunk === _chunk3 && + (previousBlockedChunk = null); + resolveModelChunk(response, _chunk3, json); + }); + } + }, + close: function () { + if (null === previousBlockedChunk) controller.close(); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.close(); + }); + } + }, + error: function (error) { + if (null === previousBlockedChunk) controller.error(error); + else { + var blockedChunk = previousBlockedChunk; + previousBlockedChunk = null; + blockedChunk.then(function () { + return controller.error(error); + }); + } + } + }, + streamState + ); + } + function asyncIterator() { + return this; + } + function createIterator(next) { + next = { next: next }; + next[ASYNC_ITERATOR] = asyncIterator; + return next; + } + function startAsyncIterable(response, id, iterator, streamState) { + var buffer = [], + closed = !1, + nextWriteIndex = 0, + iterable = {}; + iterable[ASYNC_ITERATOR] = function () { + var nextReadIndex = 0; + return createIterator(function (arg) { + if (void 0 !== arg) + throw Error( + "Values cannot be passed to next() of AsyncIterables passed to Client Components." + ); + if (nextReadIndex === buffer.length) { + if (closed) + return new ReactPromise( + "fulfilled", + { done: !0, value: void 0 }, + null + ); + buffer[nextReadIndex] = createPendingChunk(response); + } + return buffer[nextReadIndex++]; + }); + }; + resolveStream( + response, + id, + iterator ? iterable[ASYNC_ITERATOR]() : iterable, + { + enqueueValue: function (value) { + if (nextWriteIndex === buffer.length) + buffer[nextWriteIndex] = new ReactPromise( + "fulfilled", + { done: !1, value: value }, + null + ); + else { + var chunk = buffer[nextWriteIndex], + resolveListeners = chunk.value, + rejectListeners = chunk.reason; + chunk.status = "fulfilled"; + chunk.value = { done: !1, value: value }; + null !== resolveListeners && + wakeChunkIfInitialized( + chunk, + resolveListeners, + rejectListeners + ); + } + nextWriteIndex++; + }, + enqueueModel: function (value) { + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !1 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !1 + ); + nextWriteIndex++; + }, + close: function (value) { + closed = !0; + nextWriteIndex === buffer.length + ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk( + response, + value, + !0 + )) + : resolveIteratorResultChunk( + response, + buffer[nextWriteIndex], + value, + !0 + ); + for (nextWriteIndex++; nextWriteIndex < buffer.length; ) + resolveIteratorResultChunk( + response, + buffer[nextWriteIndex++], + '"$undefined"', + !0 + ); + }, + error: function (error) { + closed = !0; + for ( + nextWriteIndex === buffer.length && + (buffer[nextWriteIndex] = createPendingChunk(response)); + nextWriteIndex < buffer.length; + + ) + triggerErrorOnChunk(response, buffer[nextWriteIndex++], error); + } + }, + streamState + ); + } + function resolveErrorDev(response, errorInfo) { + var name = errorInfo.name, + env = errorInfo.env; + var error = buildFakeCallStack( + response, + errorInfo.stack, + env, + !1, + Error.bind( + null, + errorInfo.message || + "An error occurred in the Server Components render but no message was provided" + ) + ); + var ownerTask = null; + null != errorInfo.owner && + ((errorInfo = errorInfo.owner.slice(1)), + (errorInfo = getOutlinedModel( + response, + errorInfo, + {}, + "", + createModel + )), + null !== errorInfo && + (ownerTask = initializeFakeTask(response, errorInfo))); + null === ownerTask + ? ((response = getRootTask(response, env)), + (error = null != response ? response.run(error) : error())) + : (error = ownerTask.run(error)); + error.name = name; + error.environmentName = env; + return error; + } + function createFakeFunction( + name, + filename, + sourceMap, + line, + col, + enclosingLine, + enclosingCol, + environmentName + ) { + name || (name = ""); + var encodedName = JSON.stringify(name); + 1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--; + 1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--; + 1 > line ? (line = 0) : line--; + 1 > col ? (col = 0) : col--; + if ( + line < enclosingLine || + (line === enclosingLine && col < enclosingCol) + ) + enclosingCol = enclosingLine = 0; + 1 > line + ? ((line = encodedName.length + 3), + (enclosingCol -= line), + 0 > enclosingCol && (enclosingCol = 0), + (col = col - enclosingCol - line - 3), + 0 > col && (col = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : 1 > enclosingLine + ? ((enclosingCol -= encodedName.length + 3), + 0 > enclosingCol && (enclosingCol = 0), + (encodedName = + "({" + + encodedName + + ":" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})")) + : enclosingLine === line + ? ((col = col - enclosingCol - 3), + 0 > col && (col = 0), + (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + " ".repeat(col) + + "_()})")) + : (encodedName = + "\n".repeat(enclosingLine - 1) + + "({" + + encodedName + + ":\n" + + " ".repeat(enclosingCol) + + "_=>" + + "\n".repeat(line - enclosingLine) + + " ".repeat(col) + + "_()})"); + encodedName = + 1 > enclosingLine + ? encodedName + + "\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + : "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" + + encodedName; + filename.startsWith("/") && (filename = "file://" + filename); + sourceMap + ? ((encodedName += + "\n//# sourceURL=about://React/" + + encodeURIComponent(environmentName) + + "/" + + encodeURI(filename) + + "?" + + fakeFunctionIdx++), + (encodedName += "\n//# sourceMappingURL=" + sourceMap)) + : (encodedName = filename + ? encodedName + ("\n//# sourceURL=" + encodeURI(filename)) + : encodedName + "\n//# sourceURL="); + try { + var fn = (0, eval)(encodedName)[name]; + } catch (x) { + fn = function (_) { + return _(); + }; + } + return fn; + } + function buildFakeCallStack( + response, + stack, + environmentName, + useEnclosingLine, + innerCall + ) { + for (var i = 0; i < stack.length; i++) { + var frame = stack[i], + frameKey = + frame.join("-") + + "-" + + environmentName + + (useEnclosingLine ? "-e" : "-n"), + fn = fakeFunctionCache.get(frameKey); + if (void 0 === fn) { + fn = frame[0]; + var filename = frame[1], + line = frame[2], + col = frame[3], + enclosingLine = frame[4]; + frame = frame[5]; + var findSourceMapURL = response._debugFindSourceMapURL; + findSourceMapURL = findSourceMapURL + ? findSourceMapURL(filename, environmentName) + : null; + fn = createFakeFunction( + fn, + filename, + findSourceMapURL, + line, + col, + useEnclosingLine ? line : enclosingLine, + useEnclosingLine ? col : frame, + environmentName + ); + fakeFunctionCache.set(frameKey, fn); + } + innerCall = fn.bind(null, innerCall); + } + return innerCall; + } + function getRootTask(response, childEnvironmentName) { + var rootTask = response._debugRootTask; + return rootTask + ? response._rootEnvironmentName !== childEnvironmentName + ? ((response = console.createTask.bind( + console, + '"use ' + childEnvironmentName.toLowerCase() + '"' + )), + rootTask.run(response)) + : rootTask + : null; + } + function initializeFakeTask(response, debugInfo) { + if (!supportsCreateTask || null == debugInfo.stack) return null; + var cachedEntry = debugInfo.debugTask; + if (void 0 !== cachedEntry) return cachedEntry; + var useEnclosingLine = void 0 === debugInfo.key, + stack = debugInfo.stack, + env = + null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env; + cachedEntry = + null == debugInfo.owner || null == debugInfo.owner.env + ? response._rootEnvironmentName + : debugInfo.owner.env; + var ownerTask = + null == debugInfo.owner + ? null + : initializeFakeTask(response, debugInfo.owner); + env = + env !== cachedEntry + ? '"use ' + env.toLowerCase() + '"' + : void 0 !== debugInfo.key + ? "<" + (debugInfo.name || "...") + ">" + : void 0 !== debugInfo.name + ? debugInfo.name || "unknown" + : "await " + (debugInfo.awaited.name || "unknown"); + env = console.createTask.bind(console, env); + useEnclosingLine = buildFakeCallStack( + response, + stack, + cachedEntry, + useEnclosingLine, + env + ); + null === ownerTask + ? ((response = getRootTask(response, cachedEntry)), + (response = + null != response + ? response.run(useEnclosingLine) + : useEnclosingLine())) + : (response = ownerTask.run(useEnclosingLine)); + return (debugInfo.debugTask = response); + } + function fakeJSXCallSite() { + return Error("react-stack-top-frame"); + } + function initializeFakeStack(response, debugInfo) { + if (void 0 === debugInfo.debugStack) { + null != debugInfo.stack && + (debugInfo.debugStack = createFakeJSXCallStackInDEV( + response, + debugInfo.stack, + null == debugInfo.env ? "" : debugInfo.env + )); + var owner = debugInfo.owner; + null != owner && + (initializeFakeStack(response, owner), + void 0 === owner.debugLocation && + null != debugInfo.debugStack && + (owner.debugLocation = debugInfo.debugStack)); + } + } + function initializeDebugInfo(response, debugInfo) { + void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo); + if (null == debugInfo.owner && null != response._debugRootOwner) { + var _componentInfoOrAsyncInfo = debugInfo; + _componentInfoOrAsyncInfo.owner = response._debugRootOwner; + _componentInfoOrAsyncInfo.stack = null; + _componentInfoOrAsyncInfo.debugStack = response._debugRootStack; + _componentInfoOrAsyncInfo.debugTask = response._debugRootTask; + } else + void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo); + "number" === typeof debugInfo.time && + (debugInfo = { time: debugInfo.time + response._timeOrigin }); + return debugInfo; + } + function getCurrentStackInDEV() { + var owner = currentOwnerInDEV; + if (null === owner) return ""; + try { + var info = ""; + if (owner.owner || "string" !== typeof owner.name) { + for (; owner; ) { + var ownerStack = owner.debugStack; + if (null != ownerStack) { + if ((owner = owner.owner)) { + var JSCompiler_temp_const = info; + var error = ownerStack, + prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var stack = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var idx = stack.indexOf("\n"); + -1 !== idx && (stack = stack.slice(idx + 1)); + idx = stack.indexOf("react_stack_bottom_frame"); + -1 !== idx && (idx = stack.lastIndexOf("\n", idx)); + var JSCompiler_inline_result = + -1 !== idx ? (stack = stack.slice(0, idx)) : ""; + info = + JSCompiler_temp_const + ("\n" + JSCompiler_inline_result); + } + } else break; + } + var JSCompiler_inline_result$jscomp$0 = info; + } else { + JSCompiler_temp_const = owner.name; + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + (prefix = + ((error = x.stack.trim().match(/\n( *(at )?)/)) && error[1]) || + ""), + (suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""); + } + JSCompiler_inline_result$jscomp$0 = + "\n" + prefix + JSCompiler_temp_const + suffix; + } + } catch (x) { + JSCompiler_inline_result$jscomp$0 = + "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result$jscomp$0; + } + function resolveConsoleEntry(response, json) { + if (response._replayConsole) { + var blockedChunk = response._blockedConsole; + if (null == blockedChunk) + (blockedChunk = createResolvedModelChunk(response, json)), + initializeModelChunk(blockedChunk), + "fulfilled" === blockedChunk.status + ? replayConsoleWithCallStackInDEV(response, blockedChunk.value) + : (blockedChunk.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ), + (response._blockedConsole = blockedChunk)); + else { + var _chunk4 = createPendingChunk(response); + _chunk4.then( + function (v) { + return replayConsoleWithCallStackInDEV(response, v); + }, + function () {} + ); + response._blockedConsole = _chunk4; + var unblock = function () { + response._blockedConsole === _chunk4 && + (response._blockedConsole = null); + resolveModelChunk(response, _chunk4, json); + }; + blockedChunk.then(unblock, unblock); + } + } + } + function initializeIOInfo(response, ioInfo) { + void 0 !== ioInfo.stack && + (initializeFakeTask(response, ioInfo), + initializeFakeStack(response, ioInfo)); + ioInfo.start += response._timeOrigin; + ioInfo.end += response._timeOrigin; + if (response._replayConsole) { + response = response._rootEnvironmentName; + var promise = ioInfo.value; + if (promise) + switch (promise.status) { + case "fulfilled": + logIOInfo(ioInfo, response, promise.value); + break; + case "rejected": + logIOInfoErrored(ioInfo, response, promise.reason); + break; + default: + promise.then( + logIOInfo.bind(null, ioInfo, response), + logIOInfoErrored.bind(null, ioInfo, response) + ); + } + else logIOInfo(ioInfo, response, void 0); + } + } + function resolveIOInfo(response, id, model) { + var chunks = response._chunks, + chunk = chunks.get(id); + chunk + ? (resolveModelChunk(response, chunk, model), + "resolved_model" === chunk.status && initializeModelChunk(chunk)) + : ((chunk = createResolvedModelChunk(response, model)), + chunks.set(id, chunk), + initializeModelChunk(chunk)); + "fulfilled" === chunk.status + ? initializeIOInfo(response, chunk.value) + : chunk.then( + function (v) { + initializeIOInfo(response, v); + }, + function () {} + ); + } + function mergeBuffer(buffer, lastChunk) { + for ( + var l = buffer.length, byteLength = lastChunk.length, i = 0; + i < l; + i++ + ) + byteLength += buffer[i].byteLength; + byteLength = new Uint8Array(byteLength); + for (var _i3 = (i = 0); _i3 < l; _i3++) { + var chunk = buffer[_i3]; + byteLength.set(chunk, i); + i += chunk.byteLength; + } + byteLength.set(lastChunk, i); + return byteLength; + } + function resolveTypedArray( + response, + id, + buffer, + lastChunk, + constructor, + bytesPerElement, + streamState + ) { + buffer = + 0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement + ? lastChunk + : mergeBuffer(buffer, lastChunk); + constructor = new constructor( + buffer.buffer, + buffer.byteOffset, + buffer.byteLength / bytesPerElement + ); + resolveBuffer(response, id, constructor, streamState); + } + function flushComponentPerformance( + response$jscomp$0, + root, + trackIdx$jscomp$6, + trackTime, + parentEndTime + ) { + if (!isArrayImpl(root._children)) { + var previousResult = root._children, + previousEndTime = previousResult.endTime; + if ( + -Infinity < parentEndTime && + parentEndTime < previousEndTime && + null !== previousResult.component + ) { + var componentInfo = previousResult.component, + trackIdx = trackIdx$jscomp$6, + startTime = parentEndTime; + if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) { + var color = + componentInfo.env === response$jscomp$0._rootEnvironmentName + ? "primary-light" + : "secondary-light", + entryName = componentInfo.name + " [deduped]", + debugTask = componentInfo.debugTask; + debugTask + ? debugTask.run( + console.timeStamp.bind( + console, + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ) + ) + : console.timeStamp( + entryName, + 0 > startTime ? 0 : startTime, + previousEndTime, + trackNames[trackIdx], + "Server Components \u269b", + color + ); + } + } + previousResult.track = trackIdx$jscomp$6; + return previousResult; + } + var children = root._children; + var debugInfo = root._debugInfo; + if (0 === debugInfo.length && "fulfilled" === root.status) { + var resolvedValue = resolveLazy(root.value); + "object" === typeof resolvedValue && + null !== resolvedValue && + (isArrayImpl(resolvedValue) || + "function" === typeof resolvedValue[ASYNC_ITERATOR] || + resolvedValue.$$typeof === REACT_ELEMENT_TYPE || + resolvedValue.$$typeof === REACT_LAZY_TYPE) && + isArrayImpl(resolvedValue._debugInfo) && + (debugInfo = resolvedValue._debugInfo); + } + if (debugInfo) { + for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) { + var info = debugInfo[i]; + "number" === typeof info.time && (startTime$jscomp$0 = info.time); + if ("string" === typeof info.name) { + startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++; + trackTime = startTime$jscomp$0; + break; + } + } + for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) { + var _info = debugInfo[_i4]; + if ("number" === typeof _info.time && _info.time > parentEndTime) { + parentEndTime = _info.time; + break; + } + } + } + var result = { + track: trackIdx$jscomp$6, + endTime: -Infinity, + component: null + }; + root._children = result; + for ( + var childrenEndTime = -Infinity, + childTrackIdx = trackIdx$jscomp$6, + childTrackTime = trackTime, + _i5 = 0; + _i5 < children.length; + _i5++ + ) { + var childResult = flushComponentPerformance( + response$jscomp$0, + children[_i5], + childTrackIdx, + childTrackTime, + parentEndTime + ); + null !== childResult.component && + (result.component = childResult.component); + childTrackIdx = childResult.track; + var childEndTime = childResult.endTime; + childEndTime > childTrackTime && (childTrackTime = childEndTime); + childEndTime > childrenEndTime && (childrenEndTime = childEndTime); + } + if (debugInfo) + for ( + var componentEndTime = 0, + isLastComponent = !0, + endTime = -1, + endTimeIdx = -1, + _i6 = debugInfo.length - 1; + 0 <= _i6; + _i6-- + ) { + var _info2 = debugInfo[_i6]; + if ("number" === typeof _info2.time) { + 0 === componentEndTime && (componentEndTime = _info2.time); + var time = _info2.time; + if (-1 < endTimeIdx) + for (var j = endTimeIdx - 1; j > _i6; j--) { + var candidateInfo = debugInfo[j]; + if ("string" === typeof candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var componentInfo$jscomp$0 = candidateInfo, + response = response$jscomp$0, + componentInfo$jscomp$1 = componentInfo$jscomp$0, + trackIdx$jscomp$0 = trackIdx$jscomp$6, + startTime$jscomp$1 = time, + componentEndTime$jscomp$0 = componentEndTime, + childrenEndTime$jscomp$0 = childrenEndTime; + if ( + isLastComponent && + "rejected" === root.status && + root.reason !== response._closedReason + ) { + var componentInfo$jscomp$2 = componentInfo$jscomp$1, + trackIdx$jscomp$1 = trackIdx$jscomp$0, + startTime$jscomp$2 = startTime$jscomp$1, + childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0, + error = root.reason; + if (supportsUserTiming) { + var env = componentInfo$jscomp$2.env, + name = componentInfo$jscomp$2.name, + entryName$jscomp$0 = + env === response._rootEnvironmentName || + void 0 === env + ? name + : name + " [" + env + "]", + measureName = "\u200b" + entryName$jscomp$0, + properties = [ + [ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ] + ]; + null != componentInfo$jscomp$2.key && + addValueToProperties( + "key", + componentInfo$jscomp$2.key, + properties, + 0, + "" + ); + null != componentInfo$jscomp$2.props && + addObjectToProperties( + componentInfo$jscomp$2.props, + properties, + 0, + "" + ); + performance.measure(measureName, { + start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2, + end: childrenEndTime$jscomp$1, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$1], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$0 + " Errored", + properties: properties + } + } + }); + performance.clearMeasures(measureName); + } + } else { + var componentInfo$jscomp$3 = componentInfo$jscomp$1, + trackIdx$jscomp$2 = trackIdx$jscomp$0, + startTime$jscomp$3 = startTime$jscomp$1, + childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0; + if ( + supportsUserTiming && + 0 <= childrenEndTime$jscomp$2 && + 10 > trackIdx$jscomp$2 + ) { + var env$jscomp$0 = componentInfo$jscomp$3.env, + name$jscomp$0 = componentInfo$jscomp$3.name, + isPrimaryEnv = + env$jscomp$0 === response._rootEnvironmentName, + selfTime = + componentEndTime$jscomp$0 - startTime$jscomp$3, + color$jscomp$0 = + 0.5 > selfTime + ? isPrimaryEnv + ? "primary-light" + : "secondary-light" + : 50 > selfTime + ? isPrimaryEnv + ? "primary" + : "secondary" + : 500 > selfTime + ? isPrimaryEnv + ? "primary-dark" + : "secondary-dark" + : "error", + debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask, + measureName$jscomp$0 = + "\u200b" + + (isPrimaryEnv || void 0 === env$jscomp$0 + ? name$jscomp$0 + : name$jscomp$0 + " [" + env$jscomp$0 + "]"); + if (debugTask$jscomp$0) { + var properties$jscomp$0 = []; + null != componentInfo$jscomp$3.key && + addValueToProperties( + "key", + componentInfo$jscomp$3.key, + properties$jscomp$0, + 0, + "" + ); + null != componentInfo$jscomp$3.props && + addObjectToProperties( + componentInfo$jscomp$3.props, + properties$jscomp$0, + 0, + "" + ); + debugTask$jscomp$0.run( + performance.measure.bind( + performance, + measureName$jscomp$0, + { + start: + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + end: childrenEndTime$jscomp$2, + detail: { + devtools: { + color: color$jscomp$0, + track: trackNames[trackIdx$jscomp$2], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(measureName$jscomp$0); + } else + console.timeStamp( + measureName$jscomp$0, + 0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3, + childrenEndTime$jscomp$2, + trackNames[trackIdx$jscomp$2], + "Server Components \u269b", + color$jscomp$0 + ); + } + } + componentEndTime = time; + result.component = componentInfo$jscomp$0; + isLastComponent = !1; + } else if ( + candidateInfo.awaited && + null != candidateInfo.awaited.env + ) { + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo = candidateInfo, + env$jscomp$1 = response$jscomp$0._rootEnvironmentName, + promise = asyncInfo.awaited.value; + if (promise) { + var thenable = promise; + switch (thenable.status) { + case "fulfilled": + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + thenable.value + ); + break; + case "rejected": + var asyncInfo$jscomp$0 = asyncInfo, + trackIdx$jscomp$3 = trackIdx$jscomp$6, + startTime$jscomp$4 = time, + endTime$jscomp$0 = endTime, + rootEnv = env$jscomp$1, + error$jscomp$0 = thenable.reason; + if (supportsUserTiming && 0 < endTime$jscomp$0) { + var description = getIODescription(error$jscomp$0), + entryName$jscomp$1 = + "await " + + getIOShortName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ), + debugTask$jscomp$1 = + asyncInfo$jscomp$0.debugTask || + asyncInfo$jscomp$0.awaited.debugTask; + if (debugTask$jscomp$1) { + var properties$jscomp$1 = [ + [ + "Rejected", + "object" === typeof error$jscomp$0 && + null !== error$jscomp$0 && + "string" === typeof error$jscomp$0.message + ? String(error$jscomp$0.message) + : String(error$jscomp$0) + ] + ], + tooltipText = + getIOLongName( + asyncInfo$jscomp$0.awaited, + description, + asyncInfo$jscomp$0.env, + rootEnv + ) + " Rejected"; + debugTask$jscomp$1.run( + performance.measure.bind( + performance, + entryName$jscomp$1, + { + start: + 0 > startTime$jscomp$4 + ? 0 + : startTime$jscomp$4, + end: endTime$jscomp$0, + detail: { + devtools: { + color: "error", + track: trackNames[trackIdx$jscomp$3], + trackGroup: "Server Components \u269b", + properties: properties$jscomp$1, + tooltipText: tooltipText + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$1); + } else + console.timeStamp( + entryName$jscomp$1, + 0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4, + endTime$jscomp$0, + trackNames[trackIdx$jscomp$3], + "Server Components \u269b", + "error" + ); + } + break; + default: + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } else + logComponentAwait( + asyncInfo, + trackIdx$jscomp$6, + time, + endTime, + env$jscomp$1, + void 0 + ); + } + } + else { + endTime = time; + for (var _j = debugInfo.length - 1; _j > _i6; _j--) { + var _candidateInfo = debugInfo[_j]; + if ("string" === typeof _candidateInfo.name) { + componentEndTime > childrenEndTime && + (childrenEndTime = componentEndTime); + var _componentInfo = _candidateInfo, + _env = response$jscomp$0._rootEnvironmentName, + componentInfo$jscomp$4 = _componentInfo, + trackIdx$jscomp$4 = trackIdx$jscomp$6, + startTime$jscomp$5 = time, + childrenEndTime$jscomp$3 = childrenEndTime; + if (supportsUserTiming) { + var env$jscomp$2 = componentInfo$jscomp$4.env, + name$jscomp$1 = componentInfo$jscomp$4.name, + entryName$jscomp$2 = + env$jscomp$2 === _env || void 0 === env$jscomp$2 + ? name$jscomp$1 + : name$jscomp$1 + " [" + env$jscomp$2 + "]", + measureName$jscomp$1 = "\u200b" + entryName$jscomp$2, + properties$jscomp$2 = [ + [ + "Aborted", + "The stream was aborted before this Component finished rendering." + ] + ]; + null != componentInfo$jscomp$4.key && + addValueToProperties( + "key", + componentInfo$jscomp$4.key, + properties$jscomp$2, + 0, + "" + ); + null != componentInfo$jscomp$4.props && + addObjectToProperties( + componentInfo$jscomp$4.props, + properties$jscomp$2, + 0, + "" + ); + performance.measure(measureName$jscomp$1, { + start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5, + end: childrenEndTime$jscomp$3, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$4], + trackGroup: "Server Components \u269b", + tooltipText: entryName$jscomp$2 + " Aborted", + properties: properties$jscomp$2 + } + } + }); + performance.clearMeasures(measureName$jscomp$1); + } + componentEndTime = time; + result.component = _componentInfo; + isLastComponent = !1; + } else if ( + _candidateInfo.awaited && + null != _candidateInfo.awaited.env + ) { + var _asyncInfo = _candidateInfo, + _env2 = response$jscomp$0._rootEnvironmentName; + _asyncInfo.awaited.end > endTime && + (endTime = _asyncInfo.awaited.end); + endTime > childrenEndTime && (childrenEndTime = endTime); + var asyncInfo$jscomp$1 = _asyncInfo, + trackIdx$jscomp$5 = trackIdx$jscomp$6, + startTime$jscomp$6 = time, + endTime$jscomp$1 = endTime, + rootEnv$jscomp$0 = _env2; + if (supportsUserTiming && 0 < endTime$jscomp$1) { + var entryName$jscomp$3 = + "await " + + getIOShortName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ), + debugTask$jscomp$2 = + asyncInfo$jscomp$1.debugTask || + asyncInfo$jscomp$1.awaited.debugTask; + if (debugTask$jscomp$2) { + var tooltipText$jscomp$0 = + getIOLongName( + asyncInfo$jscomp$1.awaited, + "", + asyncInfo$jscomp$1.env, + rootEnv$jscomp$0 + ) + " Aborted"; + debugTask$jscomp$2.run( + performance.measure.bind( + performance, + entryName$jscomp$3, + { + start: + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + end: endTime$jscomp$1, + detail: { + devtools: { + color: "warning", + track: trackNames[trackIdx$jscomp$5], + trackGroup: "Server Components \u269b", + properties: [ + [ + "Aborted", + "The stream was aborted before this Promise resolved." + ] + ], + tooltipText: tooltipText$jscomp$0 + } + } + } + ) + ); + performance.clearMeasures(entryName$jscomp$3); + } else + console.timeStamp( + entryName$jscomp$3, + 0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6, + endTime$jscomp$1, + trackNames[trackIdx$jscomp$5], + "Server Components \u269b", + "warning" + ); + } + } + } + } + endTime = time; + endTimeIdx = _i6; + } + } + result.endTime = childrenEndTime; + return result; + } + function flushInitialRenderPerformance(response) { + if (response._replayConsole) { + var rootChunk = getChunk(response, 0); + isArrayImpl(rootChunk._children) && + (markAllTracksInOrder(), + flushComponentPerformance( + response, + rootChunk, + 0, + -Infinity, + -Infinity + )); + } + } + function processFullBinaryRow( + response, + streamState, + id, + tag, + buffer, + chunk + ) { + switch (tag) { + case 65: + resolveBuffer( + response, + id, + mergeBuffer(buffer, chunk).buffer, + streamState + ); + return; + case 79: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int8Array, + 1, + streamState + ); + return; + case 111: + resolveBuffer( + response, + id, + 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk), + streamState + ); + return; + case 85: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint8ClampedArray, + 1, + streamState + ); + return; + case 83: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int16Array, + 2, + streamState + ); + return; + case 115: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint16Array, + 2, + streamState + ); + return; + case 76: + resolveTypedArray( + response, + id, + buffer, + chunk, + Int32Array, + 4, + streamState + ); + return; + case 108: + resolveTypedArray( + response, + id, + buffer, + chunk, + Uint32Array, + 4, + streamState + ); + return; + case 71: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float32Array, + 4, + streamState + ); + return; + case 103: + resolveTypedArray( + response, + id, + buffer, + chunk, + Float64Array, + 8, + streamState + ); + return; + case 77: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigInt64Array, + 8, + streamState + ); + return; + case 109: + resolveTypedArray( + response, + id, + buffer, + chunk, + BigUint64Array, + 8, + streamState + ); + return; + case 86: + resolveTypedArray( + response, + id, + buffer, + chunk, + DataView, + 1, + streamState + ); + return; + } + for ( + var stringDecoder = response._stringDecoder, row = "", i = 0; + i < buffer.length; + i++ + ) + row += stringDecoder.decode(buffer[i], decoderOptions); + row += stringDecoder.decode(chunk); + processFullStringRow(response, streamState, id, tag, row); + } + function processFullStringRow(response, streamState, id, tag, row) { + switch (tag) { + case 73: + resolveModule(response, id, row, streamState); + break; + case 72: + id = row[0]; + streamState = row.slice(1); + response = JSON.parse(streamState, response._fromJSON); + streamState = ReactDOMSharedInternals.d; + switch (id) { + case "D": + streamState.D(response); + break; + case "C": + "string" === typeof response + ? streamState.C(response) + : streamState.C(response[0], response[1]); + break; + case "L": + id = response[0]; + row = response[1]; + 3 === response.length + ? streamState.L(id, row, response[2]) + : streamState.L(id, row); + break; + case "m": + "string" === typeof response + ? streamState.m(response) + : streamState.m(response[0], response[1]); + break; + case "X": + "string" === typeof response + ? streamState.X(response) + : streamState.X(response[0], response[1]); + break; + case "S": + "string" === typeof response + ? streamState.S(response) + : streamState.S( + response[0], + 0 === response[1] ? void 0 : response[1], + 3 === response.length ? response[2] : void 0 + ); + break; + case "M": + "string" === typeof response + ? streamState.M(response) + : streamState.M(response[0], response[1]); + } + break; + case 69: + tag = response._chunks; + var chunk = tag.get(id); + row = JSON.parse(row); + var error = resolveErrorDev(response, row); + error.digest = row.digest; + chunk + ? (resolveChunkDebugInfo(response, streamState, chunk), + triggerErrorOnChunk(response, chunk, error)) + : ((row = createErrorChunk(response, error)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 84: + tag = response._chunks; + (chunk = tag.get(id)) && "pending" !== chunk.status + ? chunk.reason.enqueueValue(row) + : (chunk && releasePendingChunk(response, chunk), + (row = new ReactPromise("fulfilled", row, null)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + break; + case 78: + response._timeOrigin = +row - performance.timeOrigin; + break; + case 68: + id = getChunk(response, id); + "fulfilled" !== id.status && + "rejected" !== id.status && + "halted" !== id.status && + "blocked" !== id.status && + "resolved_module" !== id.status && + ((streamState = id._debugChunk), + (tag = createResolvedModelChunk(response, row)), + (tag._debugChunk = streamState), + (id._debugChunk = tag), + initializeDebugChunk(response, id), + "blocked" !== tag.status || + (void 0 !== response._debugChannel && + response._debugChannel.hasReadable) || + '"' !== row[0] || + "$" !== row[1] || + ((streamState = row.slice(2, row.length - 1).split(":")), + (streamState = parseInt(streamState[0], 16)), + "pending" === getChunk(response, streamState).status && + (id._debugChunk = null))); + break; + case 74: + resolveIOInfo(response, id, row); + break; + case 87: + resolveConsoleEntry(response, row); + break; + case 82: + startReadableStream(response, id, void 0, streamState); + break; + case 114: + startReadableStream(response, id, "bytes", streamState); + break; + case 88: + startAsyncIterable(response, id, !1, streamState); + break; + case 120: + startAsyncIterable(response, id, !0, streamState); + break; + case 67: + (response = response._chunks.get(id)) && + "fulfilled" === response.status && + response.reason.close("" === row ? '"$undefined"' : row); + break; + case 80: + row = JSON.parse(row); + row = buildFakeCallStack( + response, + row.stack, + row.env, + !1, + Error.bind(null, row.reason || "") + ); + tag = response._debugRootTask; + tag = null != tag ? tag.run(row) : row(); + tag.$$typeof = REACT_POSTPONE_TYPE; + row = response._chunks; + (chunk = row.get(id)) + ? (resolveChunkDebugInfo(response, streamState, chunk), + triggerErrorOnChunk(response, chunk, tag)) + : ((tag = createErrorChunk(response, tag)), + resolveChunkDebugInfo(response, streamState, tag), + row.set(id, tag)); + break; + default: + if ("" === row) { + if ( + ((streamState = response._chunks), + (row = streamState.get(id)) || + streamState.set(id, (row = createPendingChunk(response))), + "pending" === row.status || "blocked" === row.status) + ) + releasePendingChunk(response, row), + (response = row), + (response.status = "halted"), + (response.value = null), + (response.reason = null); + } else + (tag = response._chunks), + (chunk = tag.get(id)) + ? (resolveChunkDebugInfo(response, streamState, chunk), + resolveModelChunk(response, chunk, row)) + : ((row = createResolvedModelChunk(response, row)), + resolveChunkDebugInfo(response, streamState, row), + tag.set(id, row)); + } + } + function processBinaryChunk(weakResponse, streamState, chunk) { + if (void 0 !== weakResponse.weak.deref()) { + var response = unwrapWeakResponse(weakResponse), + i = 0, + rowState = streamState._rowState; + weakResponse = streamState._rowID; + var rowTag = streamState._rowTag, + rowLength = streamState._rowLength, + buffer = streamState._buffer, + chunkLength = chunk.length; + for ( + incrementChunkDebugInfo(streamState, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = chunk[i++]; + 58 === lastIdx + ? (rowState = 1) + : (weakResponse = + (weakResponse << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = chunk[i]; + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 35 === rowState || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = chunk[i++]; + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = chunk.indexOf(10, i); + break; + case 4: + (lastIdx = i + rowLength), + lastIdx > chunk.length && (lastIdx = -1); + } + var offset = chunk.byteOffset + i; + if (-1 < lastIdx) + (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)), + processFullBinaryRow( + response, + streamState, + weakResponse, + rowTag, + buffer, + rowLength + ), + (i = lastIdx), + 3 === rowState && i++, + (rowLength = weakResponse = rowTag = rowState = 0), + (buffer.length = 0); + else { + chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i); + buffer.push(chunk); + rowLength -= chunk.byteLength; + break; + } + } + streamState._rowState = rowState; + streamState._rowID = weakResponse; + streamState._rowTag = rowTag; + streamState._rowLength = rowLength; + } + } + function createFromJSONCallback(response) { + return function (key, value) { + if ("string" === typeof value) + return parseModelString(response, this, key, value); + if ("object" === typeof value && null !== value) { + if (value[0] === REACT_ELEMENT_TYPE) + b: { + var owner = value[4], + stack = value[5]; + key = value[6]; + value = { + $$typeof: REACT_ELEMENT_TYPE, + type: value[1], + key: value[2], + props: value[3], + _owner: void 0 === owner ? null : owner + }; + Object.defineProperty(value, "ref", { + enumerable: !1, + get: nullRefGetter + }); + value._store = {}; + Object.defineProperty(value._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: key + }); + Object.defineProperty(value, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + Object.defineProperty(value, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: void 0 === stack ? null : stack + }); + Object.defineProperty(value, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + if (null !== initializingHandler) { + owner = initializingHandler; + initializingHandler = owner.parent; + if (owner.errored) { + stack = createErrorChunk(response, owner.reason); + initializeElement(response, value, null); + owner = { + name: getComponentNameFromType(value.type) || "", + owner: value._owner + }; + owner.debugStack = value._debugStack; + supportsCreateTask && (owner.debugTask = value._debugTask); + stack._debugInfo = [owner]; + key = createLazyChunkWrapper(stack, key); + break b; + } + if (0 < owner.deps) { + stack = new ReactPromise("blocked", null, null); + owner.value = value; + owner.chunk = stack; + key = createLazyChunkWrapper(stack, key); + value = initializeElement.bind(null, response, value, key); + stack.then(value, value); + break b; + } + } + initializeElement(response, value, null); + key = value; + } + else key = value; + return key; + } + return value; + }; + } + function close(weakResponse) { + reportGlobalError(weakResponse, Error("Connection closed.")); + } + function createDebugCallbackFromWritableStream(debugWritable) { + var textEncoder = new TextEncoder(), + writer = debugWritable.getWriter(); + return function (message) { + "" === message + ? writer.close() + : writer + .write(textEncoder.encode(message + "\n")) + .catch(console.error); + }; + } + function createResponseFromOptions(options) { + var debugChannel = + options && void 0 !== options.debugChannel + ? { + hasReadable: void 0 !== options.debugChannel.readable, + callback: + void 0 !== options.debugChannel.writable + ? createDebugCallbackFromWritableStream( + options.debugChannel.writable + ) + : null + } + : void 0; + return new ResponseInstance( + null, + null, + null, + options && options.callServer ? options.callServer : void 0, + void 0, + void 0, + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + options && options.findSourceMapURL ? options.findSourceMapURL : void 0, + options ? !1 !== options.replayConsoleLogs : !0, + options && options.environmentName ? options.environmentName : void 0, + options && null != options.startTime ? options.startTime : void 0, + debugChannel + )._weakResponse; + } + function startReadingFromUniversalStream( + response$jscomp$0, + stream, + onDone + ) { + function progress(_ref) { + var value = _ref.value; + if (_ref.done) return onDone(); + if (value instanceof ArrayBuffer) + processBinaryChunk( + response$jscomp$0, + streamState, + new Uint8Array(value) + ); + else if ("string" === typeof value) { + if ( + ((_ref = streamState), void 0 !== response$jscomp$0.weak.deref()) + ) { + var response = unwrapWeakResponse(response$jscomp$0), + i = 0, + rowState = _ref._rowState, + rowID = _ref._rowID, + rowTag = _ref._rowTag, + rowLength = _ref._rowLength, + buffer = _ref._buffer, + chunkLength = value.length; + for ( + incrementChunkDebugInfo(_ref, chunkLength); + i < chunkLength; + + ) { + var lastIdx = -1; + switch (rowState) { + case 0: + lastIdx = value.charCodeAt(i++); + 58 === lastIdx + ? (rowState = 1) + : (rowID = + (rowID << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 1: + rowState = value.charCodeAt(i); + 84 === rowState || + 65 === rowState || + 79 === rowState || + 111 === rowState || + 85 === rowState || + 83 === rowState || + 115 === rowState || + 76 === rowState || + 108 === rowState || + 71 === rowState || + 103 === rowState || + 77 === rowState || + 109 === rowState || + 86 === rowState + ? ((rowTag = rowState), (rowState = 2), i++) + : (64 < rowState && 91 > rowState) || + 114 === rowState || + 120 === rowState + ? ((rowTag = rowState), (rowState = 3), i++) + : ((rowTag = 0), (rowState = 3)); + continue; + case 2: + lastIdx = value.charCodeAt(i++); + 44 === lastIdx + ? (rowState = 4) + : (rowLength = + (rowLength << 4) | + (96 < lastIdx ? lastIdx - 87 : lastIdx - 48)); + continue; + case 3: + lastIdx = value.indexOf("\n", i); + break; + case 4: + if (84 !== rowTag) + throw Error( + "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams." + ); + if (rowLength < value.length || value.length > 3 * rowLength) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + lastIdx = value.length; + } + if (-1 < lastIdx) { + if (0 < buffer.length) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + i = value.slice(i, lastIdx); + processFullStringRow(response, _ref, rowID, rowTag, i); + i = lastIdx; + 3 === rowState && i++; + rowLength = rowID = rowTag = rowState = 0; + buffer.length = 0; + } else if (value.length !== i) + throw Error( + "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams." + ); + } + _ref._rowState = rowState; + _ref._rowID = rowID; + _ref._rowTag = rowTag; + _ref._rowLength = rowLength; + } + } else processBinaryChunk(response$jscomp$0, streamState, value); + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response$jscomp$0, e); + } + var streamState = createStreamState(response$jscomp$0, stream), + reader = stream.getReader(); + reader.read().then(progress).catch(error); + } + function startReadingFromStream(response, stream, onDone, debugValue) { + function progress(_ref2) { + var value = _ref2.value; + if (_ref2.done) return onDone(); + processBinaryChunk(response, streamState, value); + return reader.read().then(progress).catch(error); + } + function error(e) { + reportGlobalError(response, e); + } + var streamState = createStreamState(response, debugValue), + reader = stream.getReader(); + reader.read().then(progress).catch(error); + } + var React = require("react"), + ReactDOM = require("react-dom"), + decoderOptions = { stream: !0 }, + bind = Function.prototype.bind, + instrumentedChunks = new WeakSet(), + loadedChunks = new WeakSet(), + chunkIOInfoCache = new Map(), + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), + REACT_PORTAL_TYPE = Symbol.for("react.portal"), + REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), + REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), + REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), + REACT_CONTEXT_TYPE = Symbol.for("react.context"), + REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), + REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), + REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), + REACT_MEMO_TYPE = Symbol.for("react.memo"), + REACT_LAZY_TYPE = Symbol.for("react.lazy"), + REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), + REACT_POSTPONE_TYPE = Symbol.for("react.postpone"), + REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), + MAYBE_ITERATOR_SYMBOL = Symbol.iterator, + ASYNC_ITERATOR = Symbol.asyncIterator, + isArrayImpl = Array.isArray, + getPrototypeOf = Object.getPrototypeOf, + jsxPropsParents = new WeakMap(), + jsxChildrenParents = new WeakMap(), + CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), + ObjectPrototype = Object.prototype, + knownServerReferences = new WeakMap(), + fakeServerFunctionIdx = 0, + v8FrameRegExp = + /^ {3} at (?:(.+) \((.+):(\d+):(\d+)\)|(?:async )?(.+):(\d+):(\d+))$/, + jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\d+):(\d+)/, + hasOwnProperty = Object.prototype.hasOwnProperty, + REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), + supportsUserTiming = + "undefined" !== typeof console && + "function" === typeof console.timeStamp && + "undefined" !== typeof performance && + "function" === typeof performance.measure, + trackNames = + "Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split( + " " + ), + prefix, + suffix; + new ("function" === typeof WeakMap ? WeakMap : Map)(); + var ReactSharedInteralsServer = + React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE || + ReactSharedInteralsServer; + ReactPromise.prototype = Object.create(Promise.prototype); + ReactPromise.prototype.then = function (resolve, reject) { + var _this = this; + switch (this.status) { + case "resolved_model": + initializeModelChunk(this); + break; + case "resolved_module": + initializeModuleChunk(this); + } + var resolveCallback = resolve, + rejectCallback = reject, + wrapperPromise = new Promise(function (res, rej) { + resolve = function (value) { + wrapperPromise._debugInfo = _this._debugInfo; + res(value); + }; + reject = function (reason) { + wrapperPromise._debugInfo = _this._debugInfo; + rej(reason); + }; + }); + wrapperPromise.then(resolveCallback, rejectCallback); + switch (this.status) { + case "fulfilled": + "function" === typeof resolve && resolve(this.value); + break; + case "pending": + case "blocked": + "function" === typeof resolve && + (null === this.value && (this.value = []), + this.value.push(resolve)); + "function" === typeof reject && + (null === this.reason && (this.reason = []), + this.reason.push(reject)); + break; + case "halted": + break; + default: + "function" === typeof reject && reject(this.reason); + } + }; + var debugChannelRegistry = + "function" === typeof FinalizationRegistry + ? new FinalizationRegistry(closeDebugChannel) + : null, + initializingHandler = null, + initializingChunk = null, + mightHaveStaticConstructor = /\bclass\b.*\bstatic\b/, + MIN_CHUNK_SIZE = 65536, + supportsCreateTask = !!console.createTask, + fakeFunctionCache = new Map(), + fakeFunctionIdx = 0, + createFakeJSXCallStack = { + react_stack_bottom_frame: function (response, stack, environmentName) { + return buildFakeCallStack( + response, + stack, + environmentName, + !1, + fakeJSXCallSite + )(); + } + }, + createFakeJSXCallStackInDEV = + createFakeJSXCallStack.react_stack_bottom_frame.bind( + createFakeJSXCallStack + ), + currentOwnerInDEV = null, + replayConsoleWithCallStack = { + react_stack_bottom_frame: function (response, payload) { + var methodName = payload[0], + stackTrace = payload[1], + owner = payload[2], + env = payload[3]; + payload = payload.slice(4); + var prevStack = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; + currentOwnerInDEV = null === owner ? response._debugRootOwner : owner; + try { + a: { + var offset = 0; + switch (methodName) { + case "dir": + case "dirxml": + case "groupEnd": + case "table": + var JSCompiler_inline_result = bind.apply( + console[methodName], + [console].concat(payload) + ); + break a; + case "assert": + offset = 1; + } + var newArgs = payload.slice(0); + "string" === typeof newArgs[offset] + ? newArgs.splice( + offset, + 1, + "%c%s%c " + newArgs[offset], + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ) + : newArgs.splice( + offset, + 0, + "%c%s%c", + "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", + " " + env + " ", + "" + ); + newArgs.unshift(console); + JSCompiler_inline_result = bind.apply( + console[methodName], + newArgs + ); + } + var callStack = buildFakeCallStack( + response, + stackTrace, + env, + !1, + JSCompiler_inline_result + ); + if (null != owner) { + var task = initializeFakeTask(response, owner); + initializeFakeStack(response, owner); + if (null !== task) { + task.run(callStack); + return; + } + } + var rootTask = getRootTask(response, env); + null != rootTask ? rootTask.run(callStack) : callStack(); + } finally { + (currentOwnerInDEV = null), + (ReactSharedInternals.getCurrentStack = prevStack); + } + } + }, + replayConsoleWithCallStackInDEV = + replayConsoleWithCallStack.react_stack_bottom_frame.bind( + replayConsoleWithCallStack + ); + (function (internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled || !hook.supportsFlight) return !0; + try { + hook.inject(internals); + } catch (err) { + console.error("React instrumentation encountered an error: %o.", err); + } + return hook.checkDCE ? !0 : !1; + })({ + bundleType: 1, + version: "19.3.0-experimental-b4455a6e-20251027", + rendererPackageName: "react-server-dom-turbopack", + currentDispatcherRef: ReactSharedInternals, + reconcilerVersion: "19.3.0-experimental-b4455a6e-20251027", + getCurrentComponentInfo: function () { + return currentOwnerInDEV; + } + }); + exports.createFromFetch = function (promiseForResponse, options) { + var response = createResponseFromOptions(options); + promiseForResponse.then( + function (r) { + if ( + options && + options.debugChannel && + options.debugChannel.readable + ) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromUniversalStream( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream(response, r.body, handleDone, r); + } else + startReadingFromStream( + response, + r.body, + close.bind(null, response), + r + ); + }, + function (e) { + reportGlobalError(response, e); + } + ); + return getRoot(response); + }; + exports.createFromReadableStream = function (stream, options) { + var response = createResponseFromOptions(options); + if (options && options.debugChannel && options.debugChannel.readable) { + var streamDoneCount = 0, + handleDone = function () { + 2 === ++streamDoneCount && close(response); + }; + startReadingFromUniversalStream( + response, + options.debugChannel.readable, + handleDone + ); + startReadingFromStream(response, stream, handleDone, stream); + } else + startReadingFromStream( + response, + stream, + close.bind(null, response), + stream + ); + return getRoot(response); + }; + exports.createServerReference = function ( + id, + callServer, + encodeFormAction, + findSourceMapURL, + functionName + ) { + function action() { + var args = Array.prototype.slice.call(arguments); + return callServer(id, args); + } + var location = parseStackLocation(Error("react-stack-top-frame")); + if (null !== location) { + encodeFormAction = location[1]; + var line = location[2]; + location = location[3]; + findSourceMapURL = + null == findSourceMapURL + ? null + : findSourceMapURL(encodeFormAction, "Client"); + action = createFakeServerFunction( + functionName || "", + encodeFormAction, + findSourceMapURL, + line, + location, + "Client", + action + ); + } + registerBoundServerReference(action, id, null); + return action; + }; + exports.createTemporaryReferenceSet = function () { + return new Map(); + }; + exports.encodeReply = function (value, options) { + return new Promise(function (resolve, reject) { + var abort = processReply( + value, + "", + options && options.temporaryReferences + ? options.temporaryReferences + : void 0, + resolve, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(signal.reason); + else { + var listener = function () { + abort(signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + }); + }; + exports.registerServerReference = function (reference, id) { + registerBoundServerReference(reference, id, null); + return reference; + }; + })(); diff --git a/.socket/blob/3b05c1b47fcddbd29ad67d63fbfb8f95d8dca70eef68f24951fd295e0f27eb64 b/.socket/blob/3b05c1b47fcddbd29ad67d63fbfb8f95d8dca70eef68f24951fd295e0f27eb64 new file mode 100644 index 0000000..6ba8344 --- /dev/null +++ b/.socket/blob/3b05c1b47fcddbd29ad67d63fbfb8f95d8dca70eef68f24951fd295e0f27eb64 @@ -0,0 +1,49 @@ +// Socket Community Patch: https://socket.dev +// Date: Thu, 18 Dec 2025 15:01:40 GMT +// For more information see https://socket.dev/patch/471b2995-8ee6-42d0-85ff-9cceefced773 +// This file includes modifications made by Socket, Inc. on Thu, 18 Dec 2025; these modifications are called the "Patch". In some cases, Socket may be required to make the Patch available to you under specific terms, or may be prohibited from restricting certain rights you may have. For example, the terms of another applicable license may require Socket to make the Patch available under specific terms. In those cases, the Patch is made available to you under the required terms, and Socket does not seek to restrict your rights relative to the Patch where prohibited. In all other cases, the Patch is available to you exclusively under the PolyForm Shield License 1.0.0 (https://polyformproject.org/licenses/shield/1.0.0/). The Patch was distributed by Socket with additional information concerning licensing, attribution, and limitation of liability which may be relevant to you and your use of the Patch. As far as the law allows, the Patch and the software including the patch come as is, without any warranty or condition, and Socket will not be liable to you for any damages arising out of the applicable license terms or the use or nature of the Patch or the software including the patch, under any kind of legal claim. +// Original License: MIT + +(()=>{var __webpack_modules__={"./dist/build/webpack/alias/react-dom-server-experimental.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var b;function error(){throw Object.defineProperty(Error("Internal Error: do not use legacy react-dom/server APIs. If you encountered this error, please open an issue on the Next.js repo."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}exports.version=(b=__webpack_require__("./dist/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js")).version,exports.renderToReadableStream=b.renderToReadableStream,exports.renderToString=error,exports.renderToStaticMarkup=error,b.resume&&(exports.resume=b.resume)},"./dist/compiled/@edge-runtime/cookies/index.js":function(module1){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,src_exports={},all={RequestCookies:()=>RequestCookies,ResponseCookies:()=>ResponseCookies,parseCookie:()=>parseCookie,parseSetCookie:()=>parseSetCookie,stringifyCookie:()=>stringifyCookie};for(var name in all)__defProp(src_exports,name,{get:all[name],enumerable:!0});function stringifyCookie(c){var _a;let attrs=["path"in c&&c.path&&`Path=${c.path}`,"expires"in c&&(c.expires||0===c.expires)&&`Expires=${("number"==typeof c.expires?new Date(c.expires):c.expires).toUTCString()}`,"maxAge"in c&&"number"==typeof c.maxAge&&`Max-Age=${c.maxAge}`,"domain"in c&&c.domain&&`Domain=${c.domain}`,"secure"in c&&c.secure&&"Secure","httpOnly"in c&&c.httpOnly&&"HttpOnly","sameSite"in c&&c.sameSite&&`SameSite=${c.sameSite}`,"partitioned"in c&&c.partitioned&&"Partitioned","priority"in c&&c.priority&&`Priority=${c.priority}`].filter(Boolean),stringified=`${c.name}=${encodeURIComponent(null!=(_a=c.value)?_a:"")}`;return 0===attrs.length?stringified:`${stringified}; ${attrs.join("; ")}`}function parseCookie(cookie){let map=new Map;for(let pair of cookie.split(/; */)){if(!pair)continue;let splitAt=pair.indexOf("=");if(-1===splitAt){map.set(pair,"true");continue}let[key,value1]=[pair.slice(0,splitAt),pair.slice(splitAt+1)];try{map.set(key,decodeURIComponent(null!=value1?value1:"true"))}catch{}}return map}function parseSetCookie(setCookie){if(!setCookie)return;let[[name,value1],...attributes]=parseCookie(setCookie),{domain,expires,httponly,maxage,path,samesite,secure,partitioned,priority}=Object.fromEntries(attributes.map(([key,value2])=>[key.toLowerCase().replace(/-/g,""),value2]));{var string,string1,t={name,value:decodeURIComponent(value1),domain,...expires&&{expires:new Date(expires)},...httponly&&{httpOnly:!0},..."string"==typeof maxage&&{maxAge:Number(maxage)},path,...samesite&&{sameSite:SAME_SITE.includes(string=(string=samesite).toLowerCase())?string:void 0},...secure&&{secure:!0},...priority&&{priority:PRIORITY.includes(string1=(string1=priority).toLowerCase())?string1:void 0},...partitioned&&{partitioned:!0}};let newT={};for(let key in t)t[key]&&(newT[key]=t[key]);return newT}}module1.exports=((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(__defProp({},"__esModule",{value:!0}),src_exports);var SAME_SITE=["strict","lax","none"],PRIORITY=["low","medium","high"],RequestCookies=class{constructor(requestHeaders){this._parsed=new Map,this._headers=requestHeaders;let header=requestHeaders.get("cookie");if(header)for(let[name,value1]of parseCookie(header))this._parsed.set(name,{name,value:value1})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...args){let name="string"==typeof args[0]?args[0]:args[0].name;return this._parsed.get(name)}getAll(...args){var _a;let all=Array.from(this._parsed);if(!args.length)return all.map(([_,value1])=>value1);let name="string"==typeof args[0]?args[0]:null==(_a=args[0])?void 0:_a.name;return all.filter(([n])=>n===name).map(([_,value1])=>value1)}has(name){return this._parsed.has(name)}set(...args){let[name,value1]=1===args.length?[args[0].name,args[0].value]:args,map=this._parsed;return map.set(name,{name,value:value1}),this._headers.set("cookie",Array.from(map).map(([_,value2])=>stringifyCookie(value2)).join("; ")),this}delete(names){let map=this._parsed,result=Array.isArray(names)?names.map(name=>map.delete(name)):map.delete(names);return this._headers.set("cookie",Array.from(map).map(([_,value1])=>stringifyCookie(value1)).join("; ")),result}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(v=>`${v.name}=${encodeURIComponent(v.value)}`).join("; ")}},ResponseCookies=class{constructor(responseHeaders){var _a,_b,_c;this._parsed=new Map,this._headers=responseHeaders;let setCookie=null!=(_c=null!=(_b=null==(_a=responseHeaders.getSetCookie)?void 0:_a.call(responseHeaders))?_b:responseHeaders.get("set-cookie"))?_c:[];for(let cookieString of Array.isArray(setCookie)?setCookie:function(cookiesString){if(!cookiesString)return[];var start,ch,lastComma,nextStart,cookiesSeparatorFound,cookiesStrings=[],pos=0;function skipWhitespace(){for(;pos=cookiesString.length)&&cookiesStrings.push(cookiesString.substring(start,cookiesString.length))}return cookiesStrings}(setCookie)){let parsed=parseSetCookie(cookieString);parsed&&this._parsed.set(parsed.name,parsed)}}get(...args){let key="string"==typeof args[0]?args[0]:args[0].name;return this._parsed.get(key)}getAll(...args){var _a;let all=Array.from(this._parsed.values());if(!args.length)return all;let key="string"==typeof args[0]?args[0]:null==(_a=args[0])?void 0:_a.name;return all.filter(c=>c.name===key)}has(name){return this._parsed.has(name)}set(...args){let[name,value1,cookie]=1===args.length?[args[0].name,args[0].value,args[0]]:args,map=this._parsed;return map.set(name,function(cookie={name:"",value:""}){return"number"==typeof cookie.expires&&(cookie.expires=new Date(cookie.expires)),cookie.maxAge&&(cookie.expires=new Date(Date.now()+1e3*cookie.maxAge)),(null===cookie.path||void 0===cookie.path)&&(cookie.path="/"),cookie}({name,value:value1,...cookie})),function(bag,headers){for(let[,value1]of(headers.delete("set-cookie"),bag)){let serialized=stringifyCookie(value1);headers.append("set-cookie",serialized)}}(map,this._headers),this}delete(...args){let[name,options]="string"==typeof args[0]?[args[0]]:[args[0].name,args[0]];return this.set({...options,name,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(stringifyCookie).join("; ")}}},"./dist/compiled/busboy/index.js":function(module1,__unused_webpack_exports,__webpack_require__){!function(){"use strict";var e={900:function(e,t,i){let{parseContentType:s}=i(318),r=[i(104),i(506)].filter(function(e){return"function"==typeof e.detect});e.exports=e=>{if(("object"!=typeof e||null===e)&&(e={}),"object"!=typeof e.headers||null===e.headers||"string"!=typeof e.headers["content-type"])throw Error("Missing Content-Type");var e1=e;let t=e1.headers,i=s(t["content-type"]);if(!i)throw Error("Malformed content type");for(let s of r){if(!s.detect(i))continue;let n={limits:e1.limits,headers:t,conType:i,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return e1.highWaterMark&&(n.highWaterMark=e1.highWaterMark),e1.fileHwm&&(n.fileHwm=e1.fileHwm),n.defCharset=e1.defCharset,n.defParamCharset=e1.defParamCharset,n.preservePath=e1.preservePath,new s(n)}throw Error(`Unsupported content type: ${t["content-type"]}`)}},104:function(e,t,i){let{Readable:s,Writable:r}=i(781),n=i(542),{basename:a,convertToUTF8:o,getDecoder:f,parseContentType:l,parseDisposition:c}=i(318),h=Buffer.from("\r\n"),u=Buffer.from("\r"),d=Buffer.from("-");function noop(){}class HeaderParser{constructor(e){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0,this.cb=e}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=0,this.name="",this.value="",this.crlf=0}push(e,t,i){let s=t;for(;t{if(this._read(),0==--t._fileEndsLeft&&t._finalcb){let e=t._finalcb;t._finalcb=null,process.nextTick(e)}})}_read(e){let t=this._readcb;t&&(this._readcb=null,t())}}let k={push:(e,t)=>{},destroy:()=>{}};function nullDecoder(e,t){return e}function finalcb(e,t,i){if(i)return t(i);t(i=checkEndState(e))}function checkEndState(e){if(e._hparser)return Error("Malformed part header");let t=e._fileStream;if(t&&(e._fileStream=null,t.destroy(Error("Unexpected end of file"))),!e._complete)return Error("Unexpected end of form")}let g=[0,0,0,0,0,0,0,0,0,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,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=[0,0,0,0,0,0,0,0,0,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];e.exports=class extends r{constructor(e){let z,E,M,L,A;if(super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.highWaterMark?e.highWaterMark:void 0}),!e.conType.params||"string"!=typeof e.conType.params.boundary)throw Error("Multipart: Boundary not found");let i=e.conType.params.boundary,s="string"==typeof e.defParamCharset&&e.defParamCharset?f(e.defParamCharset):nullDecoder,r=e.defCharset||"utf8",_=e.preservePath,b={autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.fileHwm?e.fileHwm:void 0},p=e.limits,y=p&&"number"==typeof p.fieldSize?p.fieldSize:1048576,m=p&&"number"==typeof p.fileSize?p.fileSize:1/0,g=p&&"number"==typeof p.files?p.files:1/0,w=p&&"number"==typeof p.fields?p.fields:1/0,C=p&&"number"==typeof p.parts?p.parts:1/0,S=-1,P=0,T=0,v=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let x=0,B=0,K=!1,D=!1,U=!1;this._hparser=null;let V=new HeaderParser(e=>{let t;if(this._hparser=null,v=!1,L="text/plain",E=r,M="7bit",A=void 0,K=!1,!e["content-disposition"]){v=!0;return}let i=c(e["content-disposition"][0],s);if(!i||"form-data"!==i.type){v=!0;return}if(i.params&&(i.params.name&&(A=i.params.name),i.params["filename*"]?t=i.params["filename*"]:i.params.filename&&(t=i.params.filename),void 0===t||_||(t=a(t))),e["content-type"]){let t=l(e["content-type"][0]);t&&(L=`${t.type}/${t.subtype}`,t.params&&"string"==typeof t.params.charset&&(E=t.params.charset.toLowerCase()))}if(e["content-transfer-encoding"]&&(M=e["content-transfer-encoding"][0].toLowerCase()),"application/octet-stream"===L||void 0!==t){if(T===g){D||(D=!0,this.emit("filesLimit")),v=!0;return}if(++T,0===this.listenerCount("file")){v=!0;return}x=0,this._fileStream=new FileStream(b,this),++this._fileEndsLeft,this.emit("file",A,this._fileStream,{filename:t,encoding:M,mimeType:L})}else{if(P===w){U||(U=!0,this.emit("fieldsLimit")),v=!0;return}if(++P,0===this.listenerCount("field")){v=!0;return}z=[],B=0}}),W=0,ssCb=(e,t,i,s,r)=>{for(;t;){if(null!==this._hparser){let e=this._hparser.push(t,i,s);if(-1===e){this._hparser=null,V.reset(),this.emit("error",Error("Malformed part header"));break}i=e}if(i===s)break;if(0!==W){if(1===W){switch(t[i]){case 45:W=2,++i;break;case 13:W=3,++i;break;default:W=0}if(i===s)return}if(2===W){if(W=0,45===t[i]){this._complete=!0,this._bparser=k;return}let e=this._writecb;this._writecb=noop,ssCb(!1,d,0,1,!1),this._writecb=e}else if(3===W){if(W=0,10===t[i]){if(++i,S>=C||(this._hparser=V,i===s))break;continue}{let e=this._writecb;this._writecb=noop,ssCb(!1,u,0,1,!1),this._writecb=e}}}if(!v){if(this._fileStream){let e,n=Math.min(s-i,m-x);r?e=t.slice(i,i+n):(e=Buffer.allocUnsafe(n),t.copy(e,0,i,i+n)),(x+=e.length)===m?(e.length>0&&this._fileStream.push(e),this._fileStream.emit("limit"),this._fileStream.truncated=!0,v=!0):this._fileStream.push(e)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if(void 0!==z){let e,n=Math.min(s-i,y-B);r?e=t.slice(i,i+n):(e=Buffer.allocUnsafe(n),t.copy(e,0,i,i+n)),B+=n,z.push(e),B===y&&(v=!0,K=!0)}}break}if(e){if(W=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if(void 0!==z){let e;switch(z.length){case 0:e="";break;case 1:e=o(z[0],E,0);break;default:e=o(Buffer.concat(z,B),E,0)}z=void 0,B=0,this.emit("field",A,e,{nameTruncated:!1,valueTruncated:K,encoding:M,mimeType:L})}++S===C&&this.emit("partsLimit")}};this._bparser=new n(`\r +--${i}`,ssCb),this._writecb=null,this._finalcb=null,this.write(h)}static detect(e){return"multipart"===e.type&&"form-data"===e.subtype}_write(e,t,i){this._writecb=i,this._bparser.push(e,0),this._writecb&&function(e,t){let i=e._writecb;e._writecb=null,i&&i()}(this)}_destroy(e,t){this._hparser=null,this._bparser=k,e||(e=checkEndState(this));let i=this._fileStream;i&&(this._fileStream=null,i.destroy(e)),t(e)}_final(e){if(this._bparser.destroy(),!this._complete)return e(Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=finalcb.bind(null,this,e):finalcb(this,e)}}},506:function(e,t,i){let{Writable:s}=i(781),{getDecoder:r}=i(318);function readPctEnc(e,t,i,s){if(i>=s)return s;if(-1===e._byte){let r=n[t[i++]];if(-1===r)return -1;if(r>=8&&(e._encode=2),ie.fieldNameSizeLimit){for(!e._keyTrunc&&e._lastPose.fieldSizeLimit){for(!e._valTrunc&&e._lastPos=this.fieldsLimit)return i();let s=0,r=e.length;if(this._lastPos=0,-2!==this._byte){if(-1===(s=readPctEnc(this,e,s,r)))return i(Error("Malformed urlencoded form"));if(s>=r)return i();this._inKey?++this._bytesKey:++this._bytesVal}e:for(;s0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),i();continue;case 43:this._lastPos=r)return i();++this._bytesKey,s=skipKeyBytes(this,e,s,r);continue}++s,++this._bytesKey,s=skipKeyBytes(this,e,s,r)}this._lastPos0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),i();continue e;case 43:this._lastPos=r)return i();++this._bytesVal,s=skipValBytes(this,e,s,r);continue}++s,++this._bytesVal,s=skipValBytes(this,e,s,r)}this._lastPos0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),e()}}},318:function(e){function getDecoder(e){let i;for(;;)switch(e){case"utf-8":case"utf8":return t.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return t.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return t.utf16le;case"base64":return t.base64;default:if(void 0===i){i=!0,e=e.toLowerCase();continue}return t.other.bind(e)}}let t={utf8:(e,t)=>{if(0===e.length)return"";if("string"==typeof e){if(t<2)return e;e=Buffer.from(e,"latin1")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>0===e.length?"":"string"==typeof e?e:e.latin1Slice(0,e.length),utf16le:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.ucs2Slice(0,e.length)),base64:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.base64Slice(0,e.length)),other:(e,t)=>{if(0===e.length)return"";"string"==typeof e&&(e=Buffer.from(e,"latin1"));try{return new TextDecoder(this).decode(e)}catch{}}};function convertToUTF8(e,t,i){let s=getDecoder(t);if(s)return s(e,i)}let i=[0,0,0,0,0,0,0,0,0,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,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0,0,0,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,0,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=[0,0,0,0,0,0,0,0,0,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,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];e.exports={basename:function(e){if("string"!=typeof e)return"";for(let t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return".."===(e=e.slice(t+1))||"."===e?"":e}return".."===e||"."===e?"":e},convertToUTF8:convertToUTF8,getDecoder:getDecoder,parseContentType:function(e){if(0===e.length)return;let t=Object.create(null),s1=0;for(;s1=128?s=2:0===s&&(s=1);continue}return}break}}if(h+=e.slice(u,t),void 0===(h=convertToUTF8(h,d,s)))return}else{if(++t===e.length)return;if(34===e.charCodeAt(t)){u=++t;let i=!1;for(;t1)for(let t=0;t-e._lookbehindSize?e._cb(!0,c,0,e._lookbehindSize+n,!1):e._cb(!0,void 0,0,0,!0),e._bufPos=n+r;n+=l[s]}for(;n<0&&!matchNeedle(e,t,n,i-n);)++n;if(n<0){let s=e._lookbehindSize+n;return s>0&&e._cb(!1,c,0,s,!1),e._lookbehindSize-=s,c.copy(c,0,s,e._lookbehindSize),c.set(t,e._lookbehindSize),e._lookbehindSize+=i,e._bufPos=i,i}e._cb(!1,c,0,e._lookbehindSize,!1),e._lookbehindSize=0}n+=e._bufPos;let h=s[0];for(;n<=f;){let i=t[n+a];if(i===o&&t[n]===h&&memcmp(s,0,t,n,a))return++e.matches,n>0?e._cb(!0,t,e._bufPos,n,!0):e._cb(!0,void 0,0,0,!0),e._bufPos=n+r;n+=l[i]}for(;n0&&e._cb(!1,t,e._bufPos,n{"use strict";var e={56:e=>{e.exports=function(e,r){return"string"==typeof e?parse(e):"number"==typeof e?format(e,r):null},e.exports.format=format,e.exports.parse=parse;var r=/\B(?=(\d{3})+(?!\d))/g,a=/(?:\.0*|(\.[^0]+)0+)$/,t={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},i=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function format(e,i){if(!Number.isFinite(e))return null;var n=Math.abs(e),o=i&&i.thousandsSeparator||"",s=i&&i.unitSeparator||"",f=i&&void 0!==i.decimalPlaces?i.decimalPlaces:2,u=!!(i&&i.fixedDecimals),p=i&&i.unit||"";p&&t[p.toLowerCase()]||(p=n>=t.pb?"PB":n>=t.tb?"TB":n>=t.gb?"GB":n>=t.mb?"MB":n>=t.kb?"KB":"B");var l=(e/t[p.toLowerCase()]).toFixed(f);return u||(l=l.replace(a,"$1")),o&&(l=l.split(".").map(function(e,a){return 0===a?e.replace(r,o):e}).join(".")),l+s+p}function parse(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var a,r=i.exec(e),n="b";return r?(a=parseFloat(r[1]),n=r[4].toLowerCase()):(a=parseInt(e,10),n="b"),Math.floor(t[n]*a)}}},r={};function __nccwpck_require__1(a){var t=r[a];if(void 0!==t)return t.exports;var i=r[a]={exports:{}},n=!0;try{e[a](i,i.exports,__nccwpck_require__1),n=!1}finally{n&&delete r[a]}return i.exports}__nccwpck_require__1.ab=__dirname+"/",module1.exports=__nccwpck_require__1(56)})()},"./dist/compiled/cookie/index.js":function(module1){(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var i,t,a,n,e={};e.parse=function(e,r){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var t={},o=e.split(a),s=(r||{}).decode||i,p=0;p{"use strict";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n="~";function Events(){}function EE(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function addListener(e,t,r,i,s){if("function"!=typeof r)throw TypeError("The listener must be a function");var o=new EE(r,i||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],o]:e._events[u].push(o):(e._events[u]=o,e._eventsCount++),e}function clearEvent(e,t){0==--e._eventsCount?e._events=new Events:delete e._events[t]}function EventEmitter(){this._events=new Events,this._eventsCount=0}Object.create&&(Events.prototype=Object.create(null),(new Events).__proto__||(n=!1)),EventEmitter.prototype.eventNames=function(){var r,i,e=[];if(0===this._eventsCount)return e;for(i in r=this._events)t.call(r,i)&&e.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e},EventEmitter.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=Array(s);i{e.exports=(e,t)=>(t=t||(()=>{}),e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e})))},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){let r=0,i=e.length;for(;i>0;){let s=i/2|0,o=r+s;0>=n(e[o],t)?(r=++o,i-=s+1):i=s}return r}},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(574);t.default=class{constructor(){this._queue=[]}enqueue(e,t){let n={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)return void this._queue.push(n);let i=r.default(this._queue,n,(e,t)=>t.priority-e.priority);this._queue.splice(i,0,n)}dequeue(){let e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this._queue.length}}},816:(e,t,n)=>{let r=n(213);class TimeoutError extends Error{constructor(e){super(e),this.name="TimeoutError"}}let pTimeout=(e,t,n)=>new Promise((i,s)=>{if("number"!=typeof t||t<0)throw TypeError("Expected `milliseconds` to be a positive number");if(t===1/0)return void i(e);let o=setTimeout(()=>{if("function"==typeof n){try{i(n())}catch(e){s(e)}return}let r="string"==typeof n?n:`Promise timed out after ${t} milliseconds`,o=n instanceof Error?n:new TimeoutError(r);"function"==typeof e.cancel&&e.cancel(),s(o)},t);r(e.then(i,s),()=>{clearTimeout(o)})});e.exports=pTimeout,e.exports.default=pTimeout,e.exports.TimeoutError=TimeoutError}},t={};function __nccwpck_require__1(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}},s=!0;try{e[n](i,i.exports,__nccwpck_require__1),s=!1}finally{s&&delete t[n]}return i.exports}__nccwpck_require__1.ab=__dirname+"/";var n={};(()=>{Object.defineProperty(n,"__esModule",{value:!0});let t=__nccwpck_require__1(993),r=__nccwpck_require__1(816),i=__nccwpck_require__1(821),empty=()=>{},s=new r.TimeoutError;n.default=class extends t{constructor(e){var t,n,r,s;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=empty,this._resolveIdle=empty,!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:i.default},e)).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!=(n=null==(t=e.intervalCap)?void 0:t.toString())?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!=(s=null==(r=e.interval)?void 0:r.toString())?s:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()},t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise((n,i)=>{let run=async()=>{this._pendingCount++,this._intervalCount++;try{let o=void 0===this._timeout&&void 0===t.timeout?e():r.default(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&i(s)});n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t),this._tryToStartAnother(),this.emit("add")})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this._isPaused&&(this._isPaused=!1,this._processQueue()),this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise(e=>{let t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(e=>{let t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}})(),module1.exports=n})()},"./dist/compiled/path-to-regexp/index.js":function(module1){(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var e={};(()=>{function parse(e,n){void 0===n&&(n={});for(var r=function(e){for(var n=[],r=0;r=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o){a+=e[i++];continue}break}if(!a)throw TypeError("Missing parameter name at ".concat(r));n.push({type:"NAME",index:r,value:a}),r=i;continue}if("("===t){var c=1,f="",i=r+1;if("?"===e[i])throw TypeError('Pattern cannot start with "?" at '.concat(i));for(;i-1)return!0}return!1},safePattern=function(e){var n=c[c.length-1],r=e||(n&&"string"==typeof n?n:"");if(n&&!r)throw TypeError('Must have text between two parameters, missing text after "'.concat(n.name,'"'));return!r||isSafe(r)?"[^".concat(escapeString(o),"]+?"):"(?:(?!".concat(escapeString(r),")[^").concat(escapeString(o),"])+?")};u-1:void 0===A;a||(l+="(?:".concat(h,"(?=").concat(x,"))?")),_||(l+="(?=".concat(h,"|").concat(x,")"))}return new RegExp(l,flags(r))}function pathToRegexp(e,n,r){if(e instanceof RegExp){var t;if(!n)return e;for(var r1=/\((?:\?<(.*?)>)?(?!\?)/g,t1=0,a=r1.exec(e.source);a;)n.push({name:a[1]||t1++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r1.exec(e.source);return e}return Array.isArray(e)?(t=e.map(function(e){return pathToRegexp(e,n,r).source}),new RegExp("(?:".concat(t.join("|"),")"),flags(r))):tokensToRegexp(parse(e,r),n,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.pathToRegexp=e.tokensToRegexp=e.regexpToFunction=e.match=e.tokensToFunction=e.compile=e.parse=void 0,e.parse=parse,e.compile=function(e,n){return tokensToFunction(parse(e,n),n)},e.tokensToFunction=tokensToFunction,e.match=function(e,n){var r=[];return regexpToFunction(pathToRegexp(e,r,n),r,n)},e.regexpToFunction=regexpToFunction,e.tokensToRegexp=tokensToRegexp,e.pathToRegexp=pathToRegexp})(),module1.exports=e})()},"./dist/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";!function(){function styleReplacer(match,prefix,s,suffix){return""+prefix+("s"===s?"\\73 ":"\\53 ")+suffix}function scriptReplacer(match,prefix,s,suffix){return""+prefix+("s"===s?"\\u0073":"\\u0053")+suffix}function getIteratorFn(maybeIterable){return null===maybeIterable||"object"!=typeof maybeIterable?null:"function"==typeof(maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable["@@iterator"])?maybeIterable:null}function objectName(object){return(object=Object.prototype.toString.call(object)).slice(8,object.length-1)}function describeKeyForErrorMessage(key){var encodedKey=JSON.stringify(key);return'"'+key+'"'===encodedKey?key:encodedKey}function describeValueForErrorMessage(value1){switch(typeof value1){case"string":return JSON.stringify(10>=value1.length?value1:value1.slice(0,10)+"...");case"object":if(isArrayImpl(value1))return"[...]";if(null!==value1&&value1.$$typeof===CLIENT_REFERENCE_TAG)return"client";return"Object"===(value1=objectName(value1))?"{...}":value1;case"function":return value1.$$typeof===CLIENT_REFERENCE_TAG?"client":(value1=value1.displayName||value1.name)?"function "+value1:"function";default:return String(value1)}}function describeElementType(type){if("string"==typeof type)return type;switch(type){case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList";case REACT_VIEW_TRANSITION_TYPE:return"ViewTransition"}if("object"==typeof type)switch(type.$$typeof){case REACT_FORWARD_REF_TYPE:return describeElementType(type.render);case REACT_MEMO_TYPE:return describeElementType(type.type);case REACT_LAZY_TYPE:var payload=type._payload;type=type._init;try{return describeElementType(type(payload))}catch(x){}}return""}function flushBuffered(destination){"function"==typeof destination.flush&&destination.flush()}function writeChunk(destination,chunk){if("string"==typeof chunk){if(0!==chunk.length)if(4096<3*chunk.length)0=maxHeadersLength&&console.error("React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.",0===maxHeadersLength?"zero":maxHeadersLength),importMap=onHeaders?{preconnects:"",fontPreloads:"",highImagePreloads:"",remainingCapacity:2+("number"==typeof maxHeadersLength?maxHeadersLength:2e3)}:null,onHeaders={placeholderPrefix:stringToPrecomputedChunk(idPrefix+"P:"),segmentPrefix:stringToPrecomputedChunk(idPrefix+"S:"),boundaryPrefix:stringToPrecomputedChunk(idPrefix+"B:"),startInlineScript:inlineScriptWithNonce,startInlineStyle:inlineStyleWithNonce,preamble:createPreambleState(),externalRuntimeScript:externalRuntimeScript,bootstrapChunks:bootstrapChunks,importMapChunks:externalRuntimeConfig,onHeaders:onHeaders,headers:importMap,resets:{font:{},dns:{},connect:{default:{},anonymous:{},credentials:{}},image:{},style:{}},charsetChunks:[],viewportChunks:[],hoistableChunks:[],preconnects:new Set,fontPreloads:new Set,highImagePreloads:new Set,styles:new Map,bootstrapScripts:new Set,scripts:new Set,bulkPreloads:new Set,preloads:{images:new Map,stylesheets:new Map,scripts:new Map,moduleScripts:new Map},nonce:{script:nonceScript,style:nonceStyle},hoistableState:null,stylesToHoist:!1},void 0!==bootstrapScripts)for(inlineScriptWithNonce=0;inlineScriptWithNonce=HTML_TABLE_MODE||parentContext.insertionMode must be an array if `multiple` is true.",propName):!props.multiple&&value1&&console.error("The `%s` prop supplied to instead of setting `selected` on