From fc6998c090c9cf529e514207aee9ce19163518d2 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Mon, 19 Aug 2024 00:28:53 +0300 Subject: [PATCH] --- Target/{manifest_Sh0gyqlq.mjs.map => manifest_COxrlkjx.mjs.map} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Target/{manifest_Sh0gyqlq.mjs.map => manifest_COxrlkjx.mjs.map} (99%) diff --git a/Target/manifest_Sh0gyqlq.mjs.map b/Target/manifest_COxrlkjx.mjs.map similarity index 99% rename from Target/manifest_Sh0gyqlq.mjs.map rename to Target/manifest_COxrlkjx.mjs.map index aea7c021..44b1f470 100644 --- a/Target/manifest_Sh0gyqlq.mjs.map +++ b/Target/manifest_COxrlkjx.mjs.map @@ -1 +1 @@ -{"version":3,"file":"manifest_Sh0gyqlq.mjs","sources":["../../../../node_modules/astro/dist/actions/runtime/virtual/shared.js","../../../../node_modules/astro/dist/core/routing/manifest/generator.js","../../../../node_modules/astro/dist/core/routing/manifest/serialization.js","../../../../node_modules/astro/dist/core/app/common.js"],"sourcesContent":["import { parse as devalueParse, stringify as devalueStringify } from \"devalue\";\nimport { ACTION_QUERY_PARAMS as _ACTION_QUERY_PARAMS } from \"../../consts.js\";\nconst ACTION_QUERY_PARAMS = _ACTION_QUERY_PARAMS;\nconst ACTION_ERROR_CODES = [\n \"BAD_REQUEST\",\n \"UNAUTHORIZED\",\n \"FORBIDDEN\",\n \"NOT_FOUND\",\n \"TIMEOUT\",\n \"CONFLICT\",\n \"PRECONDITION_FAILED\",\n \"PAYLOAD_TOO_LARGE\",\n \"UNSUPPORTED_MEDIA_TYPE\",\n \"UNPROCESSABLE_CONTENT\",\n \"TOO_MANY_REQUESTS\",\n \"CLIENT_CLOSED_REQUEST\",\n \"INTERNAL_SERVER_ERROR\"\n];\nconst codeToStatusMap = {\n // Implemented from tRPC error code table\n // https://trpc.io/docs/server/error-handling#error-codes\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TIMEOUT: 405,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n UNSUPPORTED_MEDIA_TYPE: 415,\n UNPROCESSABLE_CONTENT: 422,\n TOO_MANY_REQUESTS: 429,\n CLIENT_CLOSED_REQUEST: 499,\n INTERNAL_SERVER_ERROR: 500\n};\nconst statusToCodeMap = Object.entries(codeToStatusMap).reduce(\n // reverse the key-value pairs\n (acc, [key, value]) => ({ ...acc, [value]: key }),\n {}\n);\nclass ActionError extends Error {\n type = \"AstroActionError\";\n code = \"INTERNAL_SERVER_ERROR\";\n status = 500;\n constructor(params) {\n super(params.message);\n this.code = params.code;\n this.status = ActionError.codeToStatus(params.code);\n if (params.stack) {\n this.stack = params.stack;\n }\n }\n static codeToStatus(code) {\n return codeToStatusMap[code];\n }\n static statusToCode(status) {\n return statusToCodeMap[status] ?? \"INTERNAL_SERVER_ERROR\";\n }\n static fromJson(body) {\n if (isInputError(body)) {\n return new ActionInputError(body.issues);\n }\n if (isActionError(body)) {\n return new ActionError(body);\n }\n return new ActionError({\n code: \"INTERNAL_SERVER_ERROR\"\n });\n }\n}\nfunction isActionError(error) {\n return typeof error === \"object\" && error != null && \"type\" in error && error.type === \"AstroActionError\";\n}\nfunction isInputError(error) {\n return typeof error === \"object\" && error != null && \"type\" in error && error.type === \"AstroActionInputError\" && \"issues\" in error && Array.isArray(error.issues);\n}\nclass ActionInputError extends ActionError {\n type = \"AstroActionInputError\";\n // We don't expose all ZodError properties.\n // Not all properties will serialize from server to client,\n // and we don't want to import the full ZodError object into the client.\n issues;\n fields;\n constructor(issues) {\n super({\n message: `Failed to validate: ${JSON.stringify(issues, null, 2)}`,\n code: \"BAD_REQUEST\"\n });\n this.issues = issues;\n this.fields = {};\n for (const issue of issues) {\n if (issue.path.length > 0) {\n const key = issue.path[0].toString();\n this.fields[key] ??= [];\n this.fields[key]?.push(issue.message);\n }\n }\n }\n}\nasync function callSafely(handler) {\n try {\n const data = await handler();\n return { data, error: void 0 };\n } catch (e) {\n if (e instanceof ActionError) {\n return { data: void 0, error: e };\n }\n return {\n data: void 0,\n error: new ActionError({\n message: e instanceof Error ? e.message : \"Unknown error\",\n code: \"INTERNAL_SERVER_ERROR\"\n })\n };\n }\n}\nfunction getActionQueryString(name) {\n const searchParams = new URLSearchParams({ [_ACTION_QUERY_PARAMS.actionName]: name });\n return `?${searchParams.toString()}`;\n}\nfunction getActionProps(action) {\n const params = new URLSearchParams(action.toString());\n const actionName = params.get(\"_astroAction\");\n if (!actionName) {\n throw new Error(\"Invalid actions function was passed to getActionProps()\");\n }\n return {\n type: \"hidden\",\n name: \"_astroAction\",\n value: actionName\n };\n}\nfunction serializeActionResult(res) {\n if (res.error) {\n if (import.meta.env?.DEV) {\n actionResultErrorStack.set(res.error.stack);\n }\n return {\n type: \"error\",\n status: res.error.status,\n contentType: \"application/json\",\n body: JSON.stringify({\n ...res.error,\n message: res.error.message\n })\n };\n }\n if (res.data === void 0) {\n return {\n type: \"empty\",\n status: 204\n };\n }\n return {\n type: \"data\",\n status: 200,\n contentType: \"application/json+devalue\",\n body: devalueStringify(res.data, {\n // Add support for URL objects\n URL: (value) => value instanceof URL && value.href\n })\n };\n}\nfunction deserializeActionResult(res) {\n if (res.type === \"error\") {\n if (import.meta.env?.PROD) {\n return { error: ActionError.fromJson(JSON.parse(res.body)), data: void 0 };\n } else {\n const error = ActionError.fromJson(JSON.parse(res.body));\n error.stack = actionResultErrorStack.get();\n return {\n error,\n data: void 0\n };\n }\n }\n if (res.type === \"empty\") {\n return { data: void 0, error: void 0 };\n }\n return {\n data: devalueParse(res.body, {\n URL: (href) => new URL(href)\n }),\n error: void 0\n };\n}\nconst actionResultErrorStack = /* @__PURE__ */ function actionResultErrorStackFn() {\n let errorStack;\n return {\n set(stack) {\n errorStack = stack;\n },\n get() {\n return errorStack;\n }\n };\n}();\nexport {\n ACTION_ERROR_CODES,\n ACTION_QUERY_PARAMS,\n ActionError,\n ActionInputError,\n callSafely,\n deserializeActionResult,\n getActionProps,\n getActionQueryString,\n isActionError,\n isInputError,\n serializeActionResult\n};\n","import { compile } from \"path-to-regexp\";\nfunction sanitizeParams(params) {\n return Object.fromEntries(\n Object.entries(params).map(([key, value]) => {\n if (typeof value === \"string\") {\n return [key, value.normalize().replace(/#/g, \"%23\").replace(/\\?/g, \"%3F\")];\n }\n return [key, value];\n })\n );\n}\nfunction getRouteGenerator(segments, addTrailingSlash) {\n const template = segments.map((segment) => {\n return \"/\" + segment.map((part) => {\n if (part.spread) {\n return `:${part.content.slice(3)}(.*)?`;\n } else if (part.dynamic) {\n return `:${part.content}`;\n } else {\n return part.content.normalize().replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\").replace(/%5B/g, \"[\").replace(/%5D/g, \"]\").replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n }\n }).join(\"\");\n }).join(\"\");\n let trailing = \"\";\n if (addTrailingSlash === \"always\" && segments.length) {\n trailing = \"/\";\n }\n const toPath = compile(template + trailing);\n return (params) => {\n const sanitizedParams = sanitizeParams(params);\n const path = toPath(sanitizedParams);\n return path || \"/\";\n };\n}\nexport {\n getRouteGenerator\n};\n","import { getRouteGenerator } from \"./generator.js\";\nfunction serializeRouteData(routeData, trailingSlash) {\n return {\n ...routeData,\n generate: void 0,\n pattern: routeData.pattern.source,\n redirectRoute: routeData.redirectRoute ? serializeRouteData(routeData.redirectRoute, trailingSlash) : void 0,\n fallbackRoutes: routeData.fallbackRoutes.map((fallbackRoute) => {\n return serializeRouteData(fallbackRoute, trailingSlash);\n }),\n _meta: { trailingSlash }\n };\n}\nfunction deserializeRouteData(rawRouteData) {\n return {\n route: rawRouteData.route,\n type: rawRouteData.type,\n pattern: new RegExp(rawRouteData.pattern),\n params: rawRouteData.params,\n component: rawRouteData.component,\n generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),\n pathname: rawRouteData.pathname || void 0,\n segments: rawRouteData.segments,\n prerender: rawRouteData.prerender,\n redirect: rawRouteData.redirect,\n redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,\n fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {\n return deserializeRouteData(fallback);\n }),\n isIndex: rawRouteData.isIndex\n };\n}\nexport {\n deserializeRouteData,\n serializeRouteData\n};\n","import { decodeKey } from \"../encryption.js\";\nimport { deserializeRouteData } from \"../routing/manifest/serialization.js\";\nfunction deserializeManifest(serializedManifest) {\n const routes = [];\n for (const serializedRoute of serializedManifest.routes) {\n routes.push({\n ...serializedRoute,\n routeData: deserializeRouteData(serializedRoute.routeData)\n });\n const route = serializedRoute;\n route.routeData = deserializeRouteData(serializedRoute.routeData);\n }\n const assets = new Set(serializedManifest.assets);\n const componentMetadata = new Map(serializedManifest.componentMetadata);\n const inlinedScripts = new Map(serializedManifest.inlinedScripts);\n const clientDirectives = new Map(serializedManifest.clientDirectives);\n const serverIslandNameMap = new Map(serializedManifest.serverIslandNameMap);\n const key = decodeKey(serializedManifest.key);\n return {\n // in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)\n middleware(_, next) {\n return next();\n },\n ...serializedManifest,\n assets,\n componentMetadata,\n inlinedScripts,\n clientDirectives,\n routes,\n serverIslandNameMap,\n key\n };\n}\nexport {\n deserializeManifest\n};\n"],"names":[],"mappings":";;;;;;;;;AAkBA,MAAM,eAAkB,GAAA;AAAA;AAAA;AAAA,EAGtB,WAAa,EAAA,GAAA;AAAA,EACb,YAAc,EAAA,GAAA;AAAA,EACd,SAAW,EAAA,GAAA;AAAA,EACX,SAAW,EAAA,GAAA;AAAA,EACX,OAAS,EAAA,GAAA;AAAA,EACT,QAAU,EAAA,GAAA;AAAA,EACV,mBAAqB,EAAA,GAAA;AAAA,EACrB,iBAAmB,EAAA,GAAA;AAAA,EACnB,sBAAwB,EAAA,GAAA;AAAA,EACxB,qBAAuB,EAAA,GAAA;AAAA,EACvB,iBAAmB,EAAA,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,GAAG,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;AACpE,EAAE,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;AACxE,EAAE,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;AAC9E,EAAE,MAAM,GAAG,GAAG,SAAS,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAChD,EAAE,OAAO;AACT;AACA,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE;AACxB,MAAM,OAAO,IAAI,EAAE,CAAC;AACpB,KAAK;AACL,IAAI,GAAG,kBAAkB;AACzB,IAAI,MAAM;AACV,IAAI,iBAAiB;AACrB,IAAI,cAAc;AAClB,IAAI,gBAAgB;AACpB,IAAI,MAAM;AACV,IAAI,mBAAmB;AACvB,IAAI,GAAG;AACP,GAAG,CAAC;AACJ;;;;;;","x_google_ignoreList":[0,1,2,3]} \ No newline at end of file +{"version":3,"file":"manifest_COxrlkjx.mjs","sources":["../../../../node_modules/astro/dist/actions/runtime/virtual/shared.js","../../../../node_modules/astro/dist/core/routing/manifest/generator.js","../../../../node_modules/astro/dist/core/routing/manifest/serialization.js","../../../../node_modules/astro/dist/core/app/common.js"],"sourcesContent":["import { parse as devalueParse, stringify as devalueStringify } from \"devalue\";\nimport { ACTION_QUERY_PARAMS as _ACTION_QUERY_PARAMS } from \"../../consts.js\";\nconst ACTION_QUERY_PARAMS = _ACTION_QUERY_PARAMS;\nconst ACTION_ERROR_CODES = [\n \"BAD_REQUEST\",\n \"UNAUTHORIZED\",\n \"FORBIDDEN\",\n \"NOT_FOUND\",\n \"TIMEOUT\",\n \"CONFLICT\",\n \"PRECONDITION_FAILED\",\n \"PAYLOAD_TOO_LARGE\",\n \"UNSUPPORTED_MEDIA_TYPE\",\n \"UNPROCESSABLE_CONTENT\",\n \"TOO_MANY_REQUESTS\",\n \"CLIENT_CLOSED_REQUEST\",\n \"INTERNAL_SERVER_ERROR\"\n];\nconst codeToStatusMap = {\n // Implemented from tRPC error code table\n // https://trpc.io/docs/server/error-handling#error-codes\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TIMEOUT: 405,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n UNSUPPORTED_MEDIA_TYPE: 415,\n UNPROCESSABLE_CONTENT: 422,\n TOO_MANY_REQUESTS: 429,\n CLIENT_CLOSED_REQUEST: 499,\n INTERNAL_SERVER_ERROR: 500\n};\nconst statusToCodeMap = Object.entries(codeToStatusMap).reduce(\n // reverse the key-value pairs\n (acc, [key, value]) => ({ ...acc, [value]: key }),\n {}\n);\nclass ActionError extends Error {\n type = \"AstroActionError\";\n code = \"INTERNAL_SERVER_ERROR\";\n status = 500;\n constructor(params) {\n super(params.message);\n this.code = params.code;\n this.status = ActionError.codeToStatus(params.code);\n if (params.stack) {\n this.stack = params.stack;\n }\n }\n static codeToStatus(code) {\n return codeToStatusMap[code];\n }\n static statusToCode(status) {\n return statusToCodeMap[status] ?? \"INTERNAL_SERVER_ERROR\";\n }\n static fromJson(body) {\n if (isInputError(body)) {\n return new ActionInputError(body.issues);\n }\n if (isActionError(body)) {\n return new ActionError(body);\n }\n return new ActionError({\n code: \"INTERNAL_SERVER_ERROR\"\n });\n }\n}\nfunction isActionError(error) {\n return typeof error === \"object\" && error != null && \"type\" in error && error.type === \"AstroActionError\";\n}\nfunction isInputError(error) {\n return typeof error === \"object\" && error != null && \"type\" in error && error.type === \"AstroActionInputError\" && \"issues\" in error && Array.isArray(error.issues);\n}\nclass ActionInputError extends ActionError {\n type = \"AstroActionInputError\";\n // We don't expose all ZodError properties.\n // Not all properties will serialize from server to client,\n // and we don't want to import the full ZodError object into the client.\n issues;\n fields;\n constructor(issues) {\n super({\n message: `Failed to validate: ${JSON.stringify(issues, null, 2)}`,\n code: \"BAD_REQUEST\"\n });\n this.issues = issues;\n this.fields = {};\n for (const issue of issues) {\n if (issue.path.length > 0) {\n const key = issue.path[0].toString();\n this.fields[key] ??= [];\n this.fields[key]?.push(issue.message);\n }\n }\n }\n}\nasync function callSafely(handler) {\n try {\n const data = await handler();\n return { data, error: void 0 };\n } catch (e) {\n if (e instanceof ActionError) {\n return { data: void 0, error: e };\n }\n return {\n data: void 0,\n error: new ActionError({\n message: e instanceof Error ? e.message : \"Unknown error\",\n code: \"INTERNAL_SERVER_ERROR\"\n })\n };\n }\n}\nfunction getActionQueryString(name) {\n const searchParams = new URLSearchParams({ [_ACTION_QUERY_PARAMS.actionName]: name });\n return `?${searchParams.toString()}`;\n}\nfunction getActionProps(action) {\n const params = new URLSearchParams(action.toString());\n const actionName = params.get(\"_astroAction\");\n if (!actionName) {\n throw new Error(\"Invalid actions function was passed to getActionProps()\");\n }\n return {\n type: \"hidden\",\n name: \"_astroAction\",\n value: actionName\n };\n}\nfunction serializeActionResult(res) {\n if (res.error) {\n if (import.meta.env?.DEV) {\n actionResultErrorStack.set(res.error.stack);\n }\n return {\n type: \"error\",\n status: res.error.status,\n contentType: \"application/json\",\n body: JSON.stringify({\n ...res.error,\n message: res.error.message\n })\n };\n }\n if (res.data === void 0) {\n return {\n type: \"empty\",\n status: 204\n };\n }\n return {\n type: \"data\",\n status: 200,\n contentType: \"application/json+devalue\",\n body: devalueStringify(res.data, {\n // Add support for URL objects\n URL: (value) => value instanceof URL && value.href\n })\n };\n}\nfunction deserializeActionResult(res) {\n if (res.type === \"error\") {\n if (import.meta.env?.PROD) {\n return { error: ActionError.fromJson(JSON.parse(res.body)), data: void 0 };\n } else {\n const error = ActionError.fromJson(JSON.parse(res.body));\n error.stack = actionResultErrorStack.get();\n return {\n error,\n data: void 0\n };\n }\n }\n if (res.type === \"empty\") {\n return { data: void 0, error: void 0 };\n }\n return {\n data: devalueParse(res.body, {\n URL: (href) => new URL(href)\n }),\n error: void 0\n };\n}\nconst actionResultErrorStack = /* @__PURE__ */ function actionResultErrorStackFn() {\n let errorStack;\n return {\n set(stack) {\n errorStack = stack;\n },\n get() {\n return errorStack;\n }\n };\n}();\nexport {\n ACTION_ERROR_CODES,\n ACTION_QUERY_PARAMS,\n ActionError,\n ActionInputError,\n callSafely,\n deserializeActionResult,\n getActionProps,\n getActionQueryString,\n isActionError,\n isInputError,\n serializeActionResult\n};\n","import { compile } from \"path-to-regexp\";\nfunction sanitizeParams(params) {\n return Object.fromEntries(\n Object.entries(params).map(([key, value]) => {\n if (typeof value === \"string\") {\n return [key, value.normalize().replace(/#/g, \"%23\").replace(/\\?/g, \"%3F\")];\n }\n return [key, value];\n })\n );\n}\nfunction getRouteGenerator(segments, addTrailingSlash) {\n const template = segments.map((segment) => {\n return \"/\" + segment.map((part) => {\n if (part.spread) {\n return `:${part.content.slice(3)}(.*)?`;\n } else if (part.dynamic) {\n return `:${part.content}`;\n } else {\n return part.content.normalize().replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\").replace(/%5B/g, \"[\").replace(/%5D/g, \"]\").replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n }\n }).join(\"\");\n }).join(\"\");\n let trailing = \"\";\n if (addTrailingSlash === \"always\" && segments.length) {\n trailing = \"/\";\n }\n const toPath = compile(template + trailing);\n return (params) => {\n const sanitizedParams = sanitizeParams(params);\n const path = toPath(sanitizedParams);\n return path || \"/\";\n };\n}\nexport {\n getRouteGenerator\n};\n","import { getRouteGenerator } from \"./generator.js\";\nfunction serializeRouteData(routeData, trailingSlash) {\n return {\n ...routeData,\n generate: void 0,\n pattern: routeData.pattern.source,\n redirectRoute: routeData.redirectRoute ? serializeRouteData(routeData.redirectRoute, trailingSlash) : void 0,\n fallbackRoutes: routeData.fallbackRoutes.map((fallbackRoute) => {\n return serializeRouteData(fallbackRoute, trailingSlash);\n }),\n _meta: { trailingSlash }\n };\n}\nfunction deserializeRouteData(rawRouteData) {\n return {\n route: rawRouteData.route,\n type: rawRouteData.type,\n pattern: new RegExp(rawRouteData.pattern),\n params: rawRouteData.params,\n component: rawRouteData.component,\n generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),\n pathname: rawRouteData.pathname || void 0,\n segments: rawRouteData.segments,\n prerender: rawRouteData.prerender,\n redirect: rawRouteData.redirect,\n redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,\n fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {\n return deserializeRouteData(fallback);\n }),\n isIndex: rawRouteData.isIndex\n };\n}\nexport {\n deserializeRouteData,\n serializeRouteData\n};\n","import { decodeKey } from \"../encryption.js\";\nimport { deserializeRouteData } from \"../routing/manifest/serialization.js\";\nfunction deserializeManifest(serializedManifest) {\n const routes = [];\n for (const serializedRoute of serializedManifest.routes) {\n routes.push({\n ...serializedRoute,\n routeData: deserializeRouteData(serializedRoute.routeData)\n });\n const route = serializedRoute;\n route.routeData = deserializeRouteData(serializedRoute.routeData);\n }\n const assets = new Set(serializedManifest.assets);\n const componentMetadata = new Map(serializedManifest.componentMetadata);\n const inlinedScripts = new Map(serializedManifest.inlinedScripts);\n const clientDirectives = new Map(serializedManifest.clientDirectives);\n const serverIslandNameMap = new Map(serializedManifest.serverIslandNameMap);\n const key = decodeKey(serializedManifest.key);\n return {\n // in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)\n middleware(_, next) {\n return next();\n },\n ...serializedManifest,\n assets,\n componentMetadata,\n inlinedScripts,\n clientDirectives,\n routes,\n serverIslandNameMap,\n key\n };\n}\nexport {\n deserializeManifest\n};\n"],"names":[],"mappings":";;;;;;;;;AAkBA,MAAM,eAAkB,GAAA;AAAA;AAAA;AAAA,EAGtB,WAAa,EAAA,GAAA;AAAA,EACb,YAAc,EAAA,GAAA;AAAA,EACd,SAAW,EAAA,GAAA;AAAA,EACX,SAAW,EAAA,GAAA;AAAA,EACX,OAAS,EAAA,GAAA;AAAA,EACT,QAAU,EAAA,GAAA;AAAA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