🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode-ai/cli-linux-arm64

Package Overview
Dependencies
Maintainers
2
Versions
2087
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/cli-linux-arm64 - npm Package Compare versions

Comparing version
0.0.0-beta-202607171635
to
0.0.0-beta-202607171732
+9
bin/chunk-00w28qgj.js.map
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "D5CD235E36203F8964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "EA1F3D7E8177F52164756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+core@3.24.5/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js"],
"sourcesContent": [
"'use strict';\n\nvar serde = require('@smithy/core/serde');\nvar schema = require('@smithy/core/schema');\nvar transport = require('@smithy/core/transport');\nvar types = require('@smithy/types');\n\nconst collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return serde.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return serde.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return serde.Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\nclass SerdeContext {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n\nclass HttpProtocol extends SerdeContext {\n options;\n compositeErrorRegistry;\n constructor(options) {\n super();\n this.options = options;\n this.compositeErrorRegistry = schema.TypeRegistry.for(options.defaultNamespace);\n for (const etr of options.errorTypeRegistries ?? []) {\n this.compositeErrorRegistry.copyFrom(etr);\n }\n }\n getRequestType() {\n return transport.HttpRequest;\n }\n getResponseType() {\n return transport.HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n if (!request.query) {\n request.query = {};\n }\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n request.query[k] = v;\n }\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name].join(\", \");\n }\n }\n return request;\n }\n else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : undefined;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query,\n };\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name];\n }\n }\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n if (this.serdeContext?.disableHostPrefix) {\n return;\n }\n const inputNs = schema.NormalizedSchema.of(operationSchema.input);\n const opTraits = schema.translateTraits(operationSchema.traits ?? {});\n if (opTraits.endpoint) {\n let hostPrefix = opTraits.endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n for (const [name, member] of inputNs.structIterator()) {\n if (!member.getMergedTraits().hostLabel) {\n continue;\n }\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n };\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.serializeEventStream({\n eventStream,\n requestSchema,\n initialRequest,\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.deserializeEventStream({\n response,\n responseSchema,\n initialResponseContainer,\n });\n }\n async loadEventStreamCapability() {\n const { EventStreamSerde } = await import('@smithy/core/event-streams');\n return new EventStreamSerde({\n marshaller: this.getEventStreamMarshaller(),\n serializer: this.serializer,\n deserializer: this.deserializer,\n serdeContext: this.serdeContext,\n defaultContentType: this.getDefaultContentType(),\n });\n }\n getDefaultContentType() {\n throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n return [];\n }\n getEventStreamMarshaller() {\n const context = this.serdeContext;\n if (!context.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n return context.eventStreamMarshaller;\n }\n}\n\nclass HttpBindingProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const input = _input && typeof _input === \"object\" ? _input : {};\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = schema.NormalizedSchema.of(operationSchema?.input);\n const payloadMemberNames = [];\n const payloadMemberSchemas = [];\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new transport.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = schema.translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n }\n else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n for (const [key, value] of traitSearchParams) {\n query[key] = value;\n }\n }\n }\n for (const [memberName, memberNs] of ns.structIterator()) {\n const memberTraits = memberNs.getMergedTraits() ?? {};\n const inputMemberValue = input[memberName];\n if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {\n if (memberTraits.httpLabel) {\n if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {\n throw new Error(`No value provided for input HTTP label: ${memberName}.`);\n }\n }\n continue;\n }\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n if (input[memberName]) {\n payload = await this.serializeEventStream({\n eventStream: input[memberName],\n requestSchema: ns,\n });\n }\n }\n else {\n payload = inputMemberValue;\n }\n }\n else {\n serializer.write(memberNs, inputMemberValue);\n payload = serializer.flush();\n }\n }\n else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMemberValue);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(`{${memberName}+}`, replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\"));\n }\n else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n }\n else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMemberValue);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n }\n else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const key in inputMemberValue) {\n const val = inputMemberValue[key];\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n }\n else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMemberValue, query);\n }\n else {\n hasNonHttpBindingMember = true;\n payloadMemberNames.push(memberName);\n payloadMemberSchemas.push(memberNs);\n }\n }\n if (hasNonHttpBindingMember && input) {\n const [namespace, name] = (ns.getName(true) ?? \"#Unknown\").split(\"#\");\n const requiredMembers = ns.getSchema()[6];\n const payloadSchema = [\n 3,\n namespace,\n name,\n ns.getMergedTraits(),\n payloadMemberNames,\n payloadMemberSchemas,\n undefined,\n ];\n if (requiredMembers) {\n payloadSchema[6] = requiredMembers;\n }\n else {\n payloadSchema.pop();\n }\n serializer.write(payloadSchema, input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const key in data) {\n if (!(key in query)) {\n const val = data[key];\n const valueSchema = ns.getValueSchema();\n Object.assign(valueSchema.getMergedTraits(), {\n ...traits,\n httpQuery: key,\n httpQueryParams: undefined,\n });\n this.serializeQuery(valueSchema, val, query);\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== undefined) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n }\n else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n if (dataFromBody[member] != null) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n }\n else if (nonHttpBindingMembers.discardResponseBody) {\n await collectBody(response.body, context);\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n async deserializeHttpMessage(schema$1, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n }\n else {\n dataObject = arg4;\n }\n let discardResponseBody = true;\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(schema$1);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n discardResponseBody = false;\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n dataObject[memberName] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n });\n }\n else {\n dataObject[memberName] = serde.sdkStreamMixin(response.body);\n }\n }\n else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n }\n else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n headerListValueSchema.getMergedTraits().httpHeader = key;\n let sections;\n if (headerListValueSchema.isTimestampSchema() &&\n headerListValueSchema.getSchema() === 4) {\n sections = serde.splitEvery(value, \",\", 2);\n }\n else {\n sections = serde.splitHeader(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read(headerListValueSchema, section.trim()));\n }\n dataObject[memberName] = list;\n }\n else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n }\n else if (memberTraits.httpPrefixHeaders !== undefined) {\n dataObject[memberName] = {};\n for (const header in response.headers) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n const value = response.headers[header];\n const valueSchema = memberSchema.getValueSchema();\n valueSchema.getMergedTraits().httpHeader = header;\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);\n }\n }\n }\n else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n }\n else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n nonHttpBindingMembers.discardResponseBody = discardResponseBody;\n return nonHttpBindingMembers;\n }\n}\n\nclass RpcProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = schema.NormalizedSchema.of(operationSchema?.input);\n const schema$1 = ns.getSchema();\n let payload;\n const input = _input && typeof _input === \"object\" ? _input : {};\n const request = new transport.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"/\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n if (input) {\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n if (input[eventStreamMember]) {\n const initialRequest = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n if (memberName !== eventStreamMember && input[memberName]) {\n serializer.write(memberSchema, input[memberName]);\n initialRequest[memberName] = serializer.flush();\n }\n }\n payload = await this.serializeEventStream({\n eventStream: input[eventStreamMember],\n requestSchema: ns,\n initialRequest,\n });\n }\n }\n else {\n serializer.write(schema$1, input);\n payload = serializer.flush();\n }\n }\n request.headers = Object.assign(request.headers, headers);\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n dataObject[eventStreamMember] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n initialResponseContainer: dataObject,\n });\n }\n else {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n}\n\nconst resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== undefined) {\n const labelValue = labelValueProvider();\n if (labelValue == null || labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel\n ? labelValue\n .split(\"/\")\n .map((segment) => extendedEncodeURIComponent(segment))\n .join(\"/\")\n : extendedEncodeURIComponent(labelValue));\n }\n else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath;\n};\n\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nclass RequestBuilder {\n input;\n context;\n query = {};\n method = \"\";\n headers = {};\n path = \"\";\n body = null;\n hostname = \"\";\n resolvePathStack = [];\n constructor(input, context) {\n this.input = input;\n this.context = context;\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new transport.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n\nfunction determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() &&\n (ns.getSchema() === 5 ||\n ns.getSchema() === 6 ||\n ns.getSchema() === 7)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings\n ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader)\n ? 6\n : Boolean(httpQuery) || Boolean(httpLabel)\n ? 5\n : undefined\n : undefined;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n\nclass FromStringShapeDeserializer extends SerdeContext {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n read(_schema, data) {\n const ns = schema.NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? serde.fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return serde._parseRfc3339DateTimeWithOffset(data);\n case 6:\n return serde._parseRfc7231DateTime(data);\n case 7:\n return serde._parseEpochTimestamp(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = serde.LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n if (ns.isNumericSchema()) {\n return Number(data);\n }\n if (ns.isBigIntegerSchema()) {\n return BigInt(data);\n }\n if (ns.isBigDecimalSchema()) {\n return new serde.NumericValue(data, \"bigDecimal\");\n }\n if (ns.isBooleanSchema()) {\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? serde.toUtf8)((this.serdeContext?.base64Decoder ?? serde.fromBase64)(base64String));\n }\n}\n\nclass HttpInterceptingShapeDeserializer extends SerdeContext {\n codecDeserializer;\n stringDeserializer;\n constructor(codecDeserializer, codecSettings) {\n super();\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema$1, data) {\n const ns = schema.NormalizedSchema.of(schema$1);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? serde.toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? serde.fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n }\n else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n}\n\nclass ToStringShapeSerializer extends SerdeContext {\n settings;\n stringBuffer = \"\";\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema$1, value) {\n const ns = schema.NormalizedSchema.of(schema$1);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n this.stringBuffer = serde.dateToUtcString(value);\n break;\n case 7:\n this.stringBuffer = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1000);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? serde.toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : serde.quoteHeader(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = serde.LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? serde.toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n if (ns.isIdempotencyToken()) {\n this.stringBuffer = serde.generateIdempotencyToken();\n }\n else {\n this.stringBuffer = String(value);\n }\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n}\n\nclass HttpInterceptingShapeSerializer {\n codecSerializer;\n stringSerializer;\n buffer;\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema$1, value) {\n const ns = schema.NormalizedSchema.of(schema$1);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== undefined) {\n const buffer = this.buffer;\n this.buffer = undefined;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n}\n\nclass Field {\n name;\n kind;\n values;\n constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n\nclass Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n\nconst getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nconst resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (transport.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n catch (error) {\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nconst contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nconst getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n});\n\nconst escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n\nconst escapeUriPath = (uri) => uri.split(\"/\").map(escapeUri).join(\"/\");\n\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n\nexports.HttpRequest = transport.HttpRequest;\nexports.HttpResponse = transport.HttpResponse;\nexports.isValidHostname = transport.isValidHostname;\nexports.parseQueryString = transport.parseQueryString;\nexports.parseUrl = transport.parseUrl;\nexports.Field = Field;\nexports.Fields = Fields;\nexports.FromStringShapeDeserializer = FromStringShapeDeserializer;\nexports.HttpBindingProtocol = HttpBindingProtocol;\nexports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;\nexports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;\nexports.HttpProtocol = HttpProtocol;\nexports.RequestBuilder = RequestBuilder;\nexports.RpcProtocol = RpcProtocol;\nexports.SerdeContext = SerdeContext;\nexports.ToStringShapeSerializer = ToStringShapeSerializer;\nexports.buildQueryString = buildQueryString;\nexports.collectBody = collectBody;\nexports.contentLengthMiddleware = contentLengthMiddleware;\nexports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions;\nexports.determineTimestampFormat = determineTimestampFormat;\nexports.escapeUri = escapeUri;\nexports.escapeUriPath = escapeUriPath;\nexports.extendedEncodeURIComponent = extendedEncodeURIComponent;\nexports.getContentLengthPlugin = getContentLengthPlugin;\nexports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;\nexports.requestBuilder = requestBuilder;\nexports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig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7C,KACD,IAAI,EAAU,EACd,GAAI,GAAS,OAAO,IAAU,SAC1B,GAAW,IAAI,EAAU,CAAK,IAElC,EAAM,KAAK,CAAO,GAG1B,OAAO,EAAM,KAAK,GAAG,EAGjB,eAAc,EAAU,YACxB,gBAAe,EAAU,aACzB,mBAAkB,EAAU,gBAC5B,oBAAmB,EAAU,iBAC7B,YAAW,EAAU,SACrB,SAAQ,EACR,UAAS,EACT,+BAA8B,EAC9B,uBAAsB,EACtB,qCAAoC,EACpC,mCAAkC,EAClC,gBAAe,EACf,kBAAiB,EACjB,eAAc,EACd,gBAAe,EACf,2BAA0B,EAC1B,oBAAmB,GACnB,eAAc,EACd,2BAA0B,EAC1B,kCAAiC,EACjC,4BAA2B,EAC3B,aAAY,EACZ,iBAAgB,GAChB,8BAA6B,EAC7B,0BAAyB,EACzB,wCAAuC,EACvC,kBAAiB,EACjB,mCAAkC,EAClC,gBAAe",
"debugId": "60E5615D11C1F38564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0B74FA6CAD3EBAC564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/util/which.ts"],
"sourcesContent": [
"import whichPkg from \"which\"\nimport path from \"path\"\nimport { Global } from \"../global\"\n\nexport function which(cmd: string, env?: NodeJS.ProcessEnv) {\n const base = env?.PATH ?? env?.Path ?? process.env.PATH ?? process.env.Path ?? \"\"\n const full = base ? base + path.delimiter + Global.Path.bin : Global.Path.bin\n const result = whichPkg.sync(cmd, {\n nothrow: true,\n path: full,\n pathExt: env?.PATHEXT ?? env?.PathExt ?? process.env.PATHEXT ?? process.env.PathExt,\n })\n return typeof result === \"string\" ? result : null\n}\n"
],
"mappings": ";kJAAA,oBACA,yBAGO,SAAS,CAAK,CAAC,EAAa,EAAyB,CAC1D,IAAM,EAAO,GAAK,MAAQ,GAAK,MAAQ,QAAQ,IAAI,MAAQ,QAAQ,IAAI,MAAQ,GACzE,EAAO,EAAO,EAAO,EAAK,UAAY,EAAO,KAAK,IAAM,EAAO,KAAK,IACpE,EAAS,UAAS,KAAK,EAAK,CAChC,QAAS,GACT,KAAM,EACN,QAAS,GAAK,SAAW,GAAK,SAAW,QAAQ,IAAI,SAAW,QAAQ,IAAI,OAC9E,CAAC,EACD,OAAO,OAAO,IAAW,SAAW,EAAS",
"debugId": "4C3DB015A64B715B64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/api.ts"],
"sourcesContent": [
"import { EOL } from \"node:os\"\nimport { Effect, Option } from \"effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Daemon } from \"../../services/daemon\"\n\nconst methods = new Set([\"delete\", \"get\", \"head\", \"options\", \"patch\", \"post\", \"put\"])\n\ntype Operation = {\n operationId?: string\n}\n\ntype OpenApi = {\n paths?: Record<string, Record<string, Operation>>\n}\n\nexport default Runtime.handler(\n Commands.commands.api,\n Effect.fn(\"cli.api\")(function* (input) {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const params = Option.getOrElse(input.param, () => ({}))\n const request = yield* resolveRequest(transport, input.request, params)\n const headers = new Headers(transport.headers)\n for (const header of input.header) {\n const index = header.indexOf(\":\")\n if (index < 1) return yield* Effect.fail(new Error(`Invalid header, expected name:value: ${header}`))\n headers.set(header.slice(0, index).trim(), header.slice(index + 1).trim())\n }\n const body = Option.getOrUndefined(input.data)\n if (body !== undefined && !headers.has(\"content-type\")) headers.set(\"content-type\", \"application/json\")\n\n const response = yield* Effect.tryPromise(() =>\n fetch(new URL(request.path, transport.url), {\n method: request.method,\n headers,\n body,\n }),\n )\n const output = yield* Effect.promise(() => response.text())\n if (output) process.stdout.write(output + (output.endsWith(EOL) ? \"\" : EOL))\n }),\n)\n\nexport function resolveOperation(spec: OpenApi, operationID: string, params: Record<string, string>) {\n for (const [path, operations] of Object.entries(spec.paths ?? {})) {\n for (const [method, operation] of Object.entries(operations)) {\n if (!methods.has(method) || operation.operationId !== operationID) continue\n return { method: method.toUpperCase(), path: interpolate(path, params) }\n }\n }\n throw new Error(`Operation not found: ${operationID}`)\n}\n\nexport function rawRequest(input: readonly string[]) {\n if (input.length !== 2 || !methods.has(input[0].toLowerCase()) || !input[1].startsWith(\"/\")) return\n return { method: input[0].toUpperCase(), path: input[1] }\n}\n\nfunction resolveRequest(\n transport: { url: string; headers: RequestInit[\"headers\"] },\n input: readonly string[],\n params: Record<string, string>,\n) {\n const raw = rawRequest(input)\n if (raw) return Effect.succeed(raw)\n if (input.length !== 1) return Effect.fail(new Error(\"Expected an operation name or an HTTP method and path\"))\n return Effect.tryPromise(async () => {\n const response = await fetch(new URL(\"/openapi.json\", transport.url), { headers: transport.headers })\n if (!response.ok) throw new Error(`Failed to load OpenAPI document: HTTP ${response.status}`)\n return resolveOperation((await response.json()) as OpenApi, input[0], params)\n })\n}\n\nfunction interpolate(path: string, params: Record<string, string>) {\n const used = new Set<string>()\n const pathname = path.replaceAll(/\\{([^}]+)\\}/g, (_, name: string) => {\n const value = params[name]\n if (value === undefined) throw new Error(`Missing path parameter: ${name}`)\n used.add(name)\n return encodeURIComponent(value)\n })\n const query = new URLSearchParams(Object.entries(params).filter(([name]) => !used.has(name))).toString()\n return query ? `${pathname}?${query}` : pathname\n}\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAM,OAAU,SAAI,SAAI,CAAC,SAAU,MAAO,OAAQ,UAAW,QAAS,OAAQ,KAAK,CAAC,EAUrE,IAAQ,QACrB,EAAS,SAAS,IAClB,EAAO,GAAG,SAAS,EAAE,SAAU,CAAC,EAAO,CAErC,IAAM,EAAY,OADH,MAAO,EAAO,SACG,UAAU,EACpC,EAAS,EAAO,UAAU,EAAM,MAAO,KAAO,CAAC,EAAE,EACjD,EAAU,MAAO,EAAe,EAAW,EAAM,QAAS,CAAM,EAChE,EAAU,IAAI,QAAQ,EAAU,OAAO,EAC7C,QAAW,KAAU,EAAM,OAAQ,CACjC,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M,EAAW,CAAK,EAC5B,GAAI,EAAK,OAAO,EAAO,QAAQ,CAAG,EAClC,GAAI,EAAM,SAAW,EAAG,OAAO,EAAO,KAAS,MAAM,uDAAuD,CAAC,EAC7G,OAAO,EAAO,WAAW,SAAY,CACnC,IAAM,EAAW,MAAM,MAAM,IAAI,IAAI,gBAAiB,EAAU,GAAG,EAAG,CAAE,QAAS,EAAU,OAAQ,CAAC,EACpG,GAAI,CAAC,EAAS,GAAI,MAAU,MAAM,yCAAyC,EAAS,QAAQ,EAC5F,OAAO,EAAkB,MAAM,EAAS,KAAK,EAAe,EAAM,GAAI,CAAM,EAC7E,EAGH,SAAS,CAAW,CAAC,EAAc,EAAgC,CACjE,IAAM,EAAO,IAAI,IACX,EAAW,EAAK,WAAW,eAAgB,CAAC,EAAG,IAAiB,CACpE,IAAM,EAAQ,EAAO,GACrB,GAAI,IAAU,OAAW,MAAU,MAAM,2BAA2B,GAAM,EAE1E,OADA,EAAK,IAAI,CAAI,EACN,mBAAmB,CAAK,EAChC,EACK,EAAQ,IAAI,gBAAgB,OAAO,QAAQ,CAAM,EAAE,OAAO,EAAE,KAAU,CAAC,EAAK,IAAI,CAAI,CAAC,CAAC,EAAE,SAAS,EACvG,OAAO,EAAQ,GAAG,KAAY,IAAU",
"debugId": "237156AD624F958464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "D06B7C8F2AE6D0DC64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3DA9C14C9611010164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "F11F2A394F803A0264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "998A99723D50D3A764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "22CE1439B51230CA64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/index.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractAsyncHooksContextManager = void 0;\nconst events_1 = require(\"events\");\nconst ADD_LISTENER_METHODS = [\n 'addListener',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n];\nclass AbstractAsyncHooksContextManager {\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n bind(context, target) {\n if (target instanceof events_1.EventEmitter) {\n return this._bindEventEmitter(context, target);\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n return target;\n }\n _bindFunction(context, target) {\n const manager = this;\n const contextWrapper = function (...args) {\n return manager.with(context, () => target.apply(this, args));\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n /**\n * It isn't possible to tell Typescript that contextWrapper is the same as T\n * so we forced to cast as any here.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return contextWrapper;\n }\n /**\n * By default, EventEmitter call their callback with their context, which we do\n * not want, instead we will bind a specific context to all callbacks that\n * go through it.\n * @param context the context we want to bind\n * @param ee EventEmitter an instance of EventEmitter to patch\n */\n _bindEventEmitter(context, ee) {\n const map = this._getPatchMap(ee);\n if (map !== undefined)\n return ee;\n this._createPatchMap(ee);\n // patch methods that add a listener to propagate context\n ADD_LISTENER_METHODS.forEach(methodName => {\n if (ee[methodName] === undefined)\n return;\n ee[methodName] = this._patchAddListener(ee, ee[methodName], context);\n });\n // patch methods that remove a listener\n if (typeof ee.removeListener === 'function') {\n ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);\n }\n if (typeof ee.off === 'function') {\n ee.off = this._patchRemoveListener(ee, ee.off);\n }\n // patch method that remove all listeners\n if (typeof ee.removeAllListeners === 'function') {\n ee.removeAllListeners = this._patchRemoveAllListeners(ee, ee.removeAllListeners);\n }\n return ee;\n }\n /**\n * Patch methods that remove a given listener so that we match the \"patched\"\n * version of that listener (the one that propagate context).\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveListener(ee, original) {\n const contextManager = this;\n return function (event, listener) {\n const events = contextManager._getPatchMap(ee)?.[event];\n if (events === undefined) {\n return original.call(this, event, listener);\n }\n const patchedListener = events.get(listener);\n return original.call(this, event, patchedListener || listener);\n };\n }\n /**\n * Patch methods that remove all listeners so we remove our\n * internal references for a given event.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveAllListeners(ee, original) {\n const contextManager = this;\n return function (event) {\n const map = contextManager._getPatchMap(ee);\n if (map !== undefined) {\n if (arguments.length === 0) {\n contextManager._createPatchMap(ee);\n }\n else if (map[event] !== undefined) {\n delete map[event];\n }\n }\n return original.apply(this, arguments);\n };\n }\n /**\n * Patch methods on an event emitter instance that can add listeners so we\n * can force them to propagate a given context.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n * @param [context] context to propagate when calling listeners\n */\n _patchAddListener(ee, original, context) {\n const contextManager = this;\n return function (event, listener) {\n /**\n * This check is required to prevent double-wrapping the listener.\n * The implementation for ee.once wraps the listener and calls ee.on.\n * Without this check, we would wrap that wrapped listener.\n * This causes an issue because ee.removeListener depends on the onceWrapper\n * to properly remove the listener. If we wrap their wrapper, we break\n * that detection.\n */\n if (contextManager._wrapped) {\n return original.call(this, event, listener);\n }\n let map = contextManager._getPatchMap(ee);\n if (map === undefined) {\n map = contextManager._createPatchMap(ee);\n }\n let listeners = map[event];\n if (listeners === undefined) {\n listeners = new WeakMap();\n map[event] = listeners;\n }\n const patchedListener = contextManager.bind(context, listener);\n // store a weak reference of the user listener to ours\n listeners.set(listener, patchedListener);\n /**\n * See comment at the start of this function for the explanation of this property.\n */\n contextManager._wrapped = true;\n try {\n return original.call(this, event, patchedListener);\n }\n finally {\n contextManager._wrapped = false;\n }\n };\n }\n _createPatchMap(ee) {\n const map = Object.create(null);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ee[this._kOtListeners] = map;\n return map;\n }\n _getPatchMap(ee) {\n return ee[this._kOtListeners];\n }\n _kOtListeners = Symbol('OtListeners');\n _wrapped = false;\n}\nexports.AbstractAsyncHooksContextManager = AbstractAsyncHooksContextManager;\n//# sourceMappingURL=AbstractAsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncHooksContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst asyncHooks = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\n/**\n * @deprecated Use AsyncLocalStorageContextManager instead.\n */\nclass AsyncHooksContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncHook;\n _contexts = new Map();\n _stack = [];\n constructor() {\n super();\n this._asyncHook = asyncHooks.createHook({\n init: this._init.bind(this),\n before: this._before.bind(this),\n after: this._after.bind(this),\n destroy: this._destroy.bind(this),\n promiseResolve: this._destroy.bind(this),\n });\n }\n active() {\n return this._stack[this._stack.length - 1] ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n this._enterContext(context);\n try {\n return fn.call(thisArg, ...args);\n }\n finally {\n this._exitContext();\n }\n }\n enable() {\n this._asyncHook.enable();\n return this;\n }\n disable() {\n this._asyncHook.disable();\n this._contexts.clear();\n this._stack = [];\n return this;\n }\n /**\n * Init hook will be called when userland create a async context, setting the\n * context as the current one if it exist.\n * @param uid id of the async context\n * @param type the resource type\n */\n _init(uid, type) {\n // ignore TIMERWRAP as they combine timers with same timeout which can lead to\n // false context propagation. TIMERWRAP has been removed in node 11\n // every timer has it's own `Timeout` resource anyway which is used to propagate\n // context.\n if (type === 'TIMERWRAP')\n return;\n const context = this._stack[this._stack.length - 1];\n if (context !== undefined) {\n this._contexts.set(uid, context);\n }\n }\n /**\n * Destroy hook will be called when a given context is no longer used so we can\n * remove its attached context.\n * @param uid uid of the async context\n */\n _destroy(uid) {\n this._contexts.delete(uid);\n }\n /**\n * Before hook is called just before executing a async context.\n * @param uid uid of the async context\n */\n _before(uid) {\n const context = this._contexts.get(uid);\n if (context !== undefined) {\n this._enterContext(context);\n }\n }\n /**\n * After hook is called just after completing the execution of a async context.\n */\n _after() {\n this._exitContext();\n }\n /**\n * Set the given context as active\n */\n _enterContext(context) {\n this._stack.push(context);\n }\n /**\n * Remove the context at the root of the stack\n */\n _exitContext() {\n this._stack.pop();\n }\n}\nexports.AsyncHooksContextManager = AsyncHooksContextManager;\n//# sourceMappingURL=AsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst async_hooks_1 = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\nclass AsyncLocalStorageContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncLocalStorage;\n constructor() {\n super();\n this._asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();\n }\n active() {\n return this._asyncLocalStorage.getStore() ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n const cb = thisArg == null ? fn : fn.bind(thisArg);\n return this._asyncLocalStorage.run(context, cb, ...args);\n }\n enable() {\n return this;\n }\n disable() {\n this._asyncLocalStorage.disable();\n return this;\n }\n}\nexports.AsyncLocalStorageContextManager = AsyncLocalStorageContextManager;\n//# sourceMappingURL=AsyncLocalStorageContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0;\nvar AsyncHooksContextManager_1 = require(\"./AsyncHooksContextManager\");\nObject.defineProperty(exports, \"AsyncHooksContextManager\", { enumerable: true, get: function () { return AsyncHooksContextManager_1.AsyncHooksContextManager; } });\nvar AsyncLocalStorageContextManager_1 = require(\"./AsyncLocalStorageContextManager\");\nObject.defineProperty(exports, \"AsyncLocalStorageContextManager\", { enumerable: true, get: function () { return AsyncLocalStorageContextManager_1.AsyncLocalStorageContextManager; } });\n//# sourceMappingURL=index.js.map"
],
"mappings": ";yHAKA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,mCAAwC,OAChD,IAAM,cACA,EAAuB,CACzB,cACA,KACA,OACA,kBACA,qBACJ,EACA,MAAM,CAAiC,CAOnC,IAAI,CAAC,EAAS,EAAQ,CAClB,GAAI,aAAkB,EAAS,aAC3B,OAAO,KAAK,kBAAkB,EAAS,CAAM,EAEjD,GAAI,OAAO,IAAW,WAClB,OAAO,KAAK,cAAc,EAAS,CAAM,EAE7C,OAAO,EAEX,aAAa,CAAC,EAAS,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KAEX,OAAO,EAAG,CAEN,OADA,KAAK,mBAAmB,QAAQ,EACzB,KAEf,CACQ,kCAAkC,kBC1B1C,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,kCAA0C,2BAAgC,OAClF,IAAI,MACJ,OAAO,eAAe,EAAS,2BAA4B,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,EAA2B,yBAA4B,CAAC,EACjK,IAAI,MACJ,OAAO,eAAe,EAAS,kCAAmC,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,EAAkC,gCAAmC,CAAC",
"debugId": "FCAF02F405AF37AA64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3D7D16453500744B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "BFE7D6EE5E746C9E64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cerebras@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/cerebras/dist/index.mjs"],
"sourcesContent": [
"// src/cerebras-provider.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/cerebras-provider.ts\nvar cerebrasErrorSchema = z.object({\n message: z.string(),\n type: z.string(),\n param: z.string(),\n code: z.string()\n});\nvar cerebrasErrorStructure = {\n errorSchema: cerebrasErrorSchema,\n errorToMessage: (data) => data.message\n};\nfunction createCerebras(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.cerebras.ai/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"CEREBRAS_API_KEY\",\n description: \"Cerebras API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cerebras/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n provider: `cerebras.chat`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch,\n errorStructure: cerebrasErrorStructure,\n supportsStructuredOutputs: true\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cerebras = createCerebras();\nexport {\n VERSION,\n cerebras,\n createCerebras\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qRAaA,SAAI,OAAiB,cAGjB,OAAsB,OAAE,OAAO,CACjC,QAAS,EAAE,OAAO,EAClB,KAAM,EAAE,OAAO,EACf,MAAO,EAAE,OAAO,EAChB,KAAM,EAAE,OAAO,CACjB,CAAC,EACG,EAAyB,CAC3B,YAAa,EACb,eAAgB,CAAC,IAAS,EAAK,OACjC,EACA,SAAS,CAAc,CAAC,EAAU,CAAC,EAAG,CACpC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,4BACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,mBACzB,YAAa,kBACf,CAAC,OACE,EAAQ,OACb,EACA,mBAAmB,GACrB,EACM,EAAsB,CAAC,IAAY,CACvC,OAAO,IAAI,EAAkC,EAAS,CACpD,SAAU,gBACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,MACf,eAAgB,EAChB,0BAA2B,EAC7B,CAAC,GAEG,EAAW,CAAC,IAAY,EAAoB,CAAO,EAWzD,OAVA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAW,EAAe",
"debugId": "6930F954F8D9466F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+vercel@2.0.39+d6123d32214422cb/node_modules/@ai-sdk/vercel/dist/index.mjs"],
"sourcesContent": [
"// src/vercel-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.39\" : \"0.0.0-test\";\n\n// src/vercel-provider.ts\nfunction createVercel(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.v0.dev/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"VERCEL_API_KEY\",\n description: \"Vercel\"\n })}`,\n ...options.headers\n },\n `ai-sdk/vercel/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `vercel.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n ...getCommonModelConfig(\"chat\")\n });\n };\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar vercel = createVercel();\nexport {\n VERSION,\n createVercel,\n vercel\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wQAYA,SAAI,OAAiB,cAGrB,cAAS,MAAY,CAAC,EAAU,CAAC,EAAG,CAClC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,uBACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,iBACzB,YAAa,QACf,CAAC,OACE,EAAQ,OACb,EACA,iBAAiB,GACnB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,UAAU,IACpB,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EAAkC,EAAS,IACjD,EAAqB,MAAM,CAChC,CAAC,GAEG,EAAW,CAAC,IAAY,EAAgB,CAAO,EAUrD,OATA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAS,EAAa",
"debugId": "2740D1C5BDB77E8B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/password.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport { Option } from \"effect\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.password,\n Effect.fn(\"cli.service.password\")(function* (input) {\n const daemon = yield* Daemon.Service\n const value = Option.getOrUndefined(input.value)\n if (value !== undefined) yield* daemon.stop()\n process.stdout.write((yield* daemon.password(value)) + EOL)\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAOT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,SAC5B,EAAG,sBAAsB,EAAE,SAAU,CAAC,EAAO,CAClD,IAAM,EAAS,MAAO,EAAO,QACvB,EAAQ,EAAO,eAAe,EAAM,KAAK,EAC/C,GAAI,IAAU,OAAW,MAAO,EAAO,KAAK,EAC5C,QAAQ,OAAO,OAAO,MAAO,EAAO,SAAS,CAAK,GAAK,CAAG,EAC3D,CACH",
"debugId": "62FD65243A1EBB3D64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js", "../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js"],
"sourcesContent": [
"class ParseError extends Error {\n constructor(message, options) {\n super(message), this.name = \"ParseError\", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;\n }\n}\nconst LF = 10, CR = 13, SPACE = 32;\nfunction noop(_arg) {\n}\nfunction createParser(config) {\n if (typeof config == \"function\")\n throw new TypeError(\n \"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?\"\n );\n const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];\n let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = \"\", dataLines = 0, eventType, terminated = !1;\n function feed(chunk) {\n if (terminated)\n throw new Error(\n \"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.\"\n );\n if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {\n const trailing2 = processLines(chunk);\n trailing2 !== \"\" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();\n return;\n }\n if (chunk.indexOf(`\n`) === -1 && chunk.indexOf(\"\\r\") === -1) {\n pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();\n return;\n }\n pendingFragments.push(chunk);\n const input = pendingFragments.join(\"\");\n pendingFragments.length = 0, pendingFragmentsLength = 0;\n const trailing = processLines(input);\n trailing !== \"\" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();\n }\n function checkBufferSize() {\n maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, onError(\n new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {\n type: \"max-buffer-size-exceeded\"\n })\n )));\n }\n function processLines(chunk) {\n let searchIndex = 0;\n if (chunk.indexOf(\"\\r\") === -1) {\n let lfIndex = chunk.indexOf(`\n`, searchIndex);\n for (; lfIndex !== -1; ) {\n if (searchIndex === lfIndex) {\n dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = \"\", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n const firstCharCode = chunk.charCodeAt(searchIndex);\n if (isDataPrefix(chunk, searchIndex, firstCharCode)) {\n const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);\n if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {\n onEvent({ id, event: eventType, data: value }), id = void 0, data = \"\", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n } else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(\n chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,\n lfIndex\n ) || void 0 : parseLine(chunk, searchIndex, lfIndex);\n searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n }\n return chunk.slice(searchIndex);\n }\n for (; searchIndex < chunk.length; ) {\n const crIndex = chunk.indexOf(\"\\r\", searchIndex), lfIndex = chunk.indexOf(`\n`, searchIndex);\n let lineEnd = -1;\n if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)\n break;\n parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;\n }\n return chunk.slice(searchIndex);\n }\n function parseLine(chunk, start, end) {\n if (start === end) {\n dispatchEvent();\n return;\n }\n const firstCharCode = chunk.charCodeAt(start);\n if (isDataPrefix(chunk, start, firstCharCode)) {\n const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);\n data = dataLines === 0 ? value2 : `${data}\n${value2}`, dataLines++;\n return;\n }\n if (isEventPrefix(chunk, start, firstCharCode)) {\n eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;\n return;\n }\n if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {\n const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);\n id = value2.includes(\"\\0\") ? void 0 : value2;\n return;\n }\n if (firstCharCode === 58) {\n if (onComment) {\n const line2 = chunk.slice(start, end);\n onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));\n }\n return;\n }\n const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(\":\");\n if (fieldSeparatorIndex === -1) {\n processField(line, \"\", line);\n return;\n }\n const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);\n processField(field, value, line);\n }\n function processField(field, value, line) {\n switch (field) {\n case \"event\":\n eventType = value || void 0;\n break;\n case \"data\":\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n break;\n case \"id\":\n id = value.includes(\"\\0\") ? void 0 : value;\n break;\n case \"retry\":\n /^\\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(\n new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n type: \"invalid-retry\",\n value,\n line\n })\n );\n break;\n default:\n onError(\n new ParseError(\n `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}\\u2026` : field}\"`,\n { type: \"unknown-field\", field, value, line }\n )\n );\n break;\n }\n }\n function dispatchEvent() {\n dataLines > 0 && onEvent({\n id,\n event: eventType,\n data\n }), id = void 0, data = \"\", dataLines = 0, eventType = void 0;\n }\n function reset(options = {}) {\n if (options.consume && pendingFragments.length > 0) {\n const incompleteLine = pendingFragments.join(\"\");\n parseLine(incompleteLine, 0, incompleteLine.length);\n }\n isFirstChunk = !0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;\n }\n return { feed, reset };\n}\nfunction isDataPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;\n}\nfunction isEventPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;\n}\nexport {\n ParseError,\n createParser\n};\n//# sourceMappingURL=index.js.map\n",
"import { createParser } from \"./index.js\";\nimport { ParseError } from \"./index.js\";\nclass EventSourceParserStream extends TransformStream {\n constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {\n let parser;\n super({\n start(controller) {\n parser = createParser({\n onEvent: (event) => {\n controller.enqueue(event);\n },\n onError(error) {\n typeof onError == \"function\" && onError(error), (onError === \"terminate\" || error.type === \"max-buffer-size-exceeded\") && controller.error(error);\n },\n onRetry,\n onComment,\n maxBufferSize\n });\n },\n transform(chunk) {\n parser.feed(chunk);\n }\n });\n }\n}\nexport {\n EventSourceParserStream,\n ParseError\n};\n//# sourceMappingURL=stream.js.map\n"
],
"mappings": ";AAAA,MAAM,UAAmB,KAAM,CAC7B,WAAW,CAAC,EAAS,EAAS,CAC5B,MAAM,CAAO,EAAG,KAAK,KAAO,aAAc,KAAK,KAAO,EAAQ,KAAM,KAAK,MAAQ,EAAQ,MAAO,KAAK,MAAQ,EAAQ,MAAO,KAAK,KAAO,EAAQ,KAEpJ,CACA,IAAM,EAAK,GAAI,EAAK,GAAI,EAAQ,GAChC,SAAS,CAAI,CAAC,EAAM,EAEpB,SAAS,CAAY,CAAC,EAAQ,CAC5B,GAAI,OAAO,GAAU,WACnB,MAAU,UACR,iGACF,EACF,IAAQ,UAAU,EAAM,UAAU,EAAM,UAAU,EAAM,YAAW,iBAAkB,EAAQ,EAAmB,CAAC,EAC7G,EAAyB,EAAG,EAAe,GAAI,EAAI,EAAO,GAAI,EAAY,EAAG,EAAW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,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,GCxK1M,MAAM,UAAgC,eAAgB,CACpD,WAAW,EAAG,UAAS,UAAS,YAAW,iBAAkB,CAAC,EAAG,CAC/D,IAAI,EACJ,MAAM,CACJ,KAAK,CAAC,EAAY,CAChB,EAAS,EAAa,CACpB,QAAS,CAAC,IAAU,CAClB,EAAW,QAAQ,CAAK,GAE1B,OAAO,CAAC,EAAO,CACb,OAAO,GAAW,YAAc,EAAQ,CAAK,GAAI,IAAY,aAAe,EAAM,OAAS,6BAA+B,EAAW,MAAM,CAAK,GAElJ,UACA,YACA,eACF,CAAC,GAEH,SAAS,CAAC,EAAO,CACf,EAAO,KAAK,CAAK,EAErB,CAAC,EAEL",
"debugId": "55E9F8FDB5DF4FD364756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-env@3.972.41/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
"debugId": "5050FCC13F92E2D564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.js", "../../node_modules/.bun/which@2.0.2/node_modules/which/which.js", "../../node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js", "../../node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.js", "../../node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"],
"sourcesContent": [
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n",
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n",
"var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n",
"const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n",
"'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n",
"'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n",
"'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input\n // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(?=(\\\\+?)?)\\1\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(?=(\\\\+?)?)\\1$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n",
"'use strict';\nmodule.exports = /^#!(.*)/;\n",
"'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n",
"'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n",
"'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n",
"'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed);\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n",
"'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n"
],
"mappings": ";6EAAA,EAAO,QAAU,EACjB,EAAM,KAAO,GAEb,IAAI,UAEJ,SAAS,EAAa,CAAC,EAAM,EAAS,CACpC,IAAI,EAAU,EAAQ,UAAY,OAChC,EAAQ,QAAU,QAAQ,IAAI,QAEhC,GAAI,CAAC,EACH,MAAO,GAIT,GADA,EAAU,EAAQ,MAAM,GAAG,EACvB,EAAQ,QAAQ,EAAE,IAAM,GAC1B,MAAO,GAET,QAAS,EAAI,EAAG,EAAI,EAAQ,OAAQ,IAAK,CACvC,IAAI,EAAI,EAAQ,GAAG,YAAY,EAC/B,GAAI,GAAK,EAAK,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,IAAM,EAChD,MAAO,GAGX,MAAO,GAGT,SAAS,CAAU,CAAC,EAAM,EAAM,EAAS,CACvC,GAAI,CAAC,EAAK,eAAe,GAAK,CAAC,EAAK,OAAO,EACzC,MAAO,GAET,OAAO,GAAa,EA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EAAQ,EAAQ,CAKtC,OAAO,KAGX,GAAO,QAAU,CACb,oBACA,gBACA,oBACA,gBACJ,sBCxDA,IAAM,sBACA,OACA,OAEN,SAAS,EAAK,CAAC,EAAS,EAAM,EAAS,CAEnC,IAAM,EAAS,EAAM,EAAS,EAAM,CAAO,EAGrC,EAAU,GAAG,MAAM,EAAO,QAAS,EAAO,KAAM,EAAO,OAAO,EAMpE,OAFA,EAAO,iBAAiB,EAAS,CAAM,EAEhC,EAGX,SAAS,EAAS,CAAC,EAAS,EAAM,EAAS,CAEvC,IAAM,EAAS,EAAM,EAAS,EAAM,CAAO,EAGrC,EAAS,GAAG,UAAU,EAAO,QAAS,EAAO,KAAM,EAAO,OAAO,EAKvE,OAFA,EAAO,MAAQ,EAAO,OAAS,EAAO,iBAAiB,EAAO,OAAQ,CAAM,EAErE,EAGX,EAAO,QAAU,GACjB,EAAO,QAAQ,MAAQ,GACvB,EAAO,QAAQ,KAAO,GAEtB,EAAO,QAAQ,OAAS,EACxB,EAAO,QAAQ,QAAU",
"debugId": "C2350E19CABC5D2564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3CBF9A105506D26164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@4.0.0/node_modules/isexe/dist/commonjs/index.min.js", "../../node_modules/.bun/which@6.0.1/node_modules/which/lib/index.js"],
"sourcesContent": [
"\"use strict\";var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=a(i=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});i.sync=i.isexe=void 0;var M=require(\"node:fs\"),x=require(\"node:fs/promises\"),q=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d(await(0,x.stat)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.isexe=q;var m=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d((0,M.statSync)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.sync=m;var d=(t,e)=>t.isFile()&&A(t,e),A=(t,e)=>{let r=e.uid??process.getuid?.(),s=e.groups??process.getgroups?.()??[],n=e.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error(\"cannot get uid or gid\");let u=new Set([n,...s]),c=t.mode,S=t.uid,P=t.gid,f=parseInt(\"100\",8),l=parseInt(\"010\",8),j=parseInt(\"001\",8),C=f|l;return!!(c&j||c&l&&u.has(P)||c&f&&S===r||c&C&&r===0)}});var g=a(o=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});o.sync=o.isexe=void 0;var T=require(\"node:fs\"),I=require(\"node:fs/promises\"),D=require(\"node:path\"),F=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y(await(0,I.stat)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.isexe=F;var L=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y((0,T.statSync)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.sync=L;var B=(t,e)=>{let{pathExt:r=process.env.PATHEXT||\"\"}=e,s=r.split(D.delimiter);if(s.indexOf(\"\")!==-1)return!0;for(let n of s){let u=n.toLowerCase(),c=t.substring(t.length-u.length).toLowerCase();if(u&&c===u)return!0}return!1},y=(t,e,r)=>t.isFile()&&B(e,r)});var p=a(h=>{\"use strict\";Object.defineProperty(h,\"__esModule\",{value:!0})});var v=exports&&exports.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),G=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w=exports&&exports.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!==\"default\"&&v(r,e,s[n]);return G(r,e),r}})(),X=exports&&exports.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&v(e,t,r)};Object.defineProperty(exports,\"__esModule\",{value:!0});exports.sync=exports.isexe=exports.posix=exports.win32=void 0;var E=w(_());exports.posix=E;var O=w(g());exports.win32=O;X(p(),exports);var H=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=H===\"win32\"?O:E;exports.isexe=b.isexe;exports.sync=b.sync;\n//# sourceMappingURL=index.min.js.map\n",
"const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n"
],
"mappings": ";0EAAa,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,EAAE,EAAE,SAAa,EAAE,E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W,KAAW,EAAS,CAC7B,IAAM,EAAI,EAAY,EAAS,CAAG,EAElC,QAAW,KAAO,EAAS,CACzB,IAAM,EAAU,EAAI,EAEpB,GADW,MAAM,EAAM,EAAS,CAAE,QAAS,EAAY,aAAc,EAAK,CAAC,EACnE,CACN,GAAI,CAAC,EAAI,IACP,OAAO,EAET,EAAM,KAAK,CAAO,IAKxB,GAAI,EAAI,KAAO,EAAM,OACnB,OAAO,EAGT,GAAI,EAAI,QACN,OAAO,KAGT,MAAM,EAAiB,CAAG,GAGtB,EAAY,CAAC,EAAK,EAAM,CAAC,IAAM,CACnC,IAAQ,UAAS,UAAS,cAAe,EAAY,EAAK,CAAG,EACvD,EAAQ,CAAC,EAEf,QAAW,KAAe,EAAS,CACjC,IAAM,EAAI,EAAY,EAAa,CAAG,EAEtC,QAAW,KAAO,EAAS,CACzB,IAAM,EAAU,EAAI,EAEpB,GADW,EAAU,EAAS,CAAE,QAAS,EAAY,aAAc,EAAK,CAAC,EACjE,CACN,GAAI,CAAC,EAAI,IACP,OAAO,EAET,EAAM,KAAK,CAAO,IAKxB,GAAI,EAAI,KAAO,EAAM,OACnB,OAAO,EAGT,GAAI,EAAI,QACN,OAAO,KAGT,MAAM,EAAiB,CAAG,GAG5B,EAAO,QAAU,EACjB,EAAM,KAAO",
"debugId": "CE2E5401EB6BD53164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+provider@3.0.10/node_modules/@ai-sdk/provider/dist/index.mjs"],
"sourcesContent": [
"// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n constructor({\n value,\n cause,\n context\n }) {\n let contextPrefix = \"Type validation failed\";\n if (context == null ? void 0 : context.field) {\n contextPrefix += ` for ${context.field}`;\n }\n if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n contextPrefix += \" (\";\n const parts = [];\n if (context.entityName) {\n parts.push(context.entityName);\n }\n if (context.entityId) {\n parts.push(`id: \"${context.entityId}\"`);\n }\n contextPrefix += parts.join(\", \");\n contextPrefix += \")\";\n }\n super({\n name: name12,\n message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n this.context = context;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause,\n context\n }) {\n var _a15, _b15, _c;\n if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n return cause;\n }\n return new _TypeValidationError({ value, cause, context });\n }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";AACA,IAAI,EAAS,kBACT,GAAS,OAAO,IAAI,CAAM,EAC1B,EAAI,EACJ,EAAa,MAAM,UAAqB,EAAK,MAAO,EAAK,GAAQ,EAAI,CASvE,WAAW,EACT,KAAM,EACN,UACA,SACC,CACD,MAAM,CAAO,EACb,KAAK,GAAM,GACX,KAAK,KAAO,EACZ,KAAK,MAAQ,QAOR,WAAU,CAAC,EAAO,CACvB,OAAO,EAAY,UAAU,EAAO,CAAM,QAErC,UAAS,CAAC,EAAO,EAAU,CAChC,IAAM,EAAe,OAAO,IAAI,CAAQ,EACxC,OAAO,GAAS,MAAQ,OAAO,IAAU,UAAY,KAAgB,GAAS,OAAO,EAAM,KAAkB,WAAa,EAAM,KAAkB,GAEtJ,EAGI,EAAO,kBACP,EAAU,mBAAmB,IAC7B,GAAU,OAAO,IAAI,CAAO,EAC5B,EAAK,EACL,GAAe,cAAe,EAAM,EAAY,EAAM,GAAS,EAAK,CACtE,WAAW,EACT,UACA,MACA,oBACA,aACA,kBACA,eACA,QACA,eAAc,GAAc,OAAS,IAAe,KACpD,IAAe,KACf,IAAe,KACf,GAAc,KAEd,SACC,CACD,MAAM,CAAE,OAAM,UAAS,OAAM,CAAC,EAC9B,KAAK,GAAO,GACZ,KAAK,IAAM,EACX,KAAK,kBAAoB,EACzB,KAAK,WAAa,EAClB,KAAK,gBAAkB,EACvB,KAAK,aAAe,EACpB,KAAK,YAAc,GACnB,KAAK,KAAO,SAEP,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,CAAO,EAE9C,EAGI,EAAQ,4BACR,EAAU,mBAAmB,IAC7B,GAAU,OAAO,IAAI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/src/image/photon.ts"],
"sourcesContent": [
"// @ts-ignore Bun's static file import is embedded by `bun build --compile`; some consumers also declare *.wasm.\nimport photonWasm from \"@silvia-odwyer/photon-node/photon_rs_bg.wasm\" with { type: \"file\" }\nimport { Effect } from \"effect\"\nimport path from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\nimport { FileSystem } from \"../filesystem\"\nimport { DecodeError, ResizerUnavailableError, SizeError } from \"../image\"\n\nconst JPEG_QUALITIES = [80, 85, 70, 55, 40]\n\nexport const make = Effect.gen(function* () {\n ;(globalThis as typeof globalThis & { __OPENCODE_PHOTON_WASM_PATH?: string }).__OPENCODE_PHOTON_WASM_PATH =\n path.isAbsolute(photonWasm) ? photonWasm : fileURLToPath(new URL(photonWasm, import.meta.url))\n const loadPhoton = yield* Effect.cached(\n Effect.tryPromise({\n try: () => import(\"@silvia-odwyer/photon-node\"),\n catch: () => new ResizerUnavailableError(),\n }),\n )\n return Effect.fn(\"Image.Photon.normalize\")(function* (\n resource: string,\n content: FileSystem.Content & { readonly encoding: \"base64\" },\n limits: {\n readonly autoResize: boolean\n readonly maxWidth: number\n readonly maxHeight: number\n readonly maxBase64Bytes: number\n },\n ) {\n const photon = yield* loadPhoton\n const decoded = yield* Effect.try({\n try: () => photon.PhotonImage.new_from_byteslice(Buffer.from(content.content, \"base64\")),\n catch: () => new DecodeError({ resource }),\n })\n try {\n const width = decoded.get_width()\n const height = decoded.get_height()\n const bytes = Buffer.byteLength(content.content, \"utf-8\")\n if (width <= limits.maxWidth && height <= limits.maxHeight && bytes <= limits.maxBase64Bytes) return content\n if (!limits.autoResize)\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n const scale = Math.min(1, limits.maxWidth / width, limits.maxHeight / height)\n const sizes = Array.from({ length: 32 }).reduce<Array<{ width: number; height: number }>>((acc) => {\n const previous = acc.at(-1) ?? {\n width: Math.max(1, Math.round(width * scale)),\n height: Math.max(1, Math.round(height * scale)),\n }\n const next =\n acc.length === 0\n ? previous\n : {\n width: previous.width === 1 ? 1 : Math.max(1, Math.floor(previous.width * 0.75)),\n height: previous.height === 1 ? 1 : Math.max(1, Math.floor(previous.height * 0.75)),\n }\n return acc.some((item) => item.width === next.width && item.height === next.height) ? acc : [...acc, next]\n }, [])\n for (const size of sizes) {\n const resized = photon.resize(decoded, size.width, size.height, photon.SamplingFilter.Lanczos3)\n try {\n const encoders: Array<readonly [mime: string, encode: () => Uint8Array]> = [\n [\"image/png\", () => resized.get_bytes()],\n ...JPEG_QUALITIES.map((quality) => [\"image/jpeg\", () => resized.get_bytes_jpeg(quality)] as const),\n ]\n for (const [mime, encode] of encoders) {\n const candidate = Buffer.from(encode()).toString(\"base64\")\n if (Buffer.byteLength(candidate, \"utf-8\") <= limits.maxBase64Bytes)\n return { ...content, content: candidate, encoding: \"base64\" as const, mime }\n }\n } finally {\n resized.free()\n }\n }\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n } finally {\n decoded.free()\n }\n })\n})\n"
],
"mappings": ";qaAGA,yBACA,6BAAS,iBAIT,SAAM,OAAiB,MAAC,QAAI,QAAI,QAAI,iBAAI,EAAE,EAE7B,EAAO,EAAO,IAAI,SAAU,EAAG,CACxC,WAA4E,4BAC5E,EAAK,WAAW,CAAU,EAAI,EAAa,EAAc,IAAI,IAAI,EAAY,YAAY,GAAG,CAAC,EAC/F,IAAM,EAAa,MAAO,EAAO,OAC/B,EAAO,WAAW,CAChB,IAAK,IAAa,yCAClB,MAAO,IAAM,IAAI,CACnB,CAAC,CACH,EACA,OAAO,EAAO,GAAG,wBAAwB,EAAE,SAAU,CACnD,EACA,EACA,EAMA,CACA,IAAM,EAAS,MAAO,EAChB,EAAU,MAAO,EAAO,IAAI,CAChC,IAAK,IAAM,EAAO,YAAY,mBAAmB,O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AM,EAAqE,CACzE,CAAC,YAAa,IAAM,EAAQ,UAAU,CAAC,EACvC,GAAG,EAAe,IAAI,CAAC,IAAY,CAAC,aAAc,IAAM,EAAQ,eAAe,CAAO,CAAC,CAAU,CACnG,EACA,QAAY,EAAM,KAAW,EAAU,CACrC,IAAM,EAAY,OAAO,KAAK,EAAO,CAAC,EAAE,SAAS,QAAQ,EACzD,GAAI,OAAO,WAAW,EAAW,OAAO,GAAK,EAAO,eAClD,MAAO,IAAK,EAAS,QAAS,EAAW,SAAU,SAAmB,MAAK,UAE/E,CACA,EAAQ,KAAK,GAGjB,OAAO,MAAO,IAAI,EAAU,CAC1B,WACA,QACA,SACA,QACA,SAAU,EAAO,SACjB,UAAW,EAAO,UAClB,SAAU,EAAO,cACnB,CAAC,SACD,CACA,EAAQ,KAAK,GAEhB,EACF",
"debugId": "03D911E49EDD150A64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "1C467B1A6C11733864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cohere@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/cohere/dist/index.mjs"],
"sourcesContent": [
"// src/cohere-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/cohere-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/cohere-chat-options.ts\nimport { z } from \"zod/v4\";\nvar cohereLanguageModelOptions = z.object({\n /**\n * Configuration for reasoning features (optional)\n *\n * Can be set to an object with the two properties `type` and `tokenBudget`. `type` can be set to `'enabled'` or `'disabled'` (defaults to `'enabled'`).\n * `tokenBudget` is the maximum number of tokens the model can use for thinking, which must be set to a positive integer. The model will stop thinking if it reaches the thinking token budget and will proceed with the response\n *\n * @see https://docs.cohere.com/reference/chat#request.body.thinking\n */\n thinking: z.object({\n type: z.enum([\"enabled\", \"disabled\"]).optional(),\n tokenBudget: z.number().optional()\n }).optional()\n});\n\n// src/cohere-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar cohereErrorDataSchema = z2.object({\n message: z2.string()\n});\nvar cohereFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: cohereErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/cohere-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const cohereTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n cohereTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n case \"none\":\n return { tools: cohereTools, toolChoice: \"NONE\", toolWarnings };\n case \"required\":\n return { tools: cohereTools, toolChoice: \"REQUIRED\", toolWarnings };\n case \"tool\":\n return {\n tools: cohereTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"REQUIRED\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/convert-cohere-usage.ts\nfunction convertCohereUsage(tokens) {\n if (tokens == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const inputTokens = tokens.input_tokens;\n const outputTokens = tokens.output_tokens;\n return {\n inputTokens: {\n total: inputTokens,\n noCache: inputTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: outputTokens,\n text: outputTokens,\n reasoning: void 0\n },\n raw: tokens\n };\n}\n\n// src/convert-to-cohere-chat-prompt.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction convertToCohereChatPrompt(prompt) {\n const messages = [];\n const documents = [];\n const warnings = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return part.text;\n }\n case \"file\": {\n let textContent;\n if (typeof part.data === \"string\") {\n textContent = part.data;\n } else if (part.data instanceof Uint8Array) {\n if (!(((_a = part.mediaType) == null ? void 0 : _a.startsWith(\"text/\")) || part.mediaType === \"application/json\")) {\n throw new UnsupportedFunctionalityError2({\n functionality: `document media type: ${part.mediaType}`,\n message: `Media type '${part.mediaType}' is not supported. Supported media types are: text/* and application/json.`\n });\n }\n textContent = new TextDecoder().decode(part.data);\n } else {\n throw new UnsupportedFunctionalityError2({\n functionality: \"File URL data\",\n message: \"URLs should be downloaded by the AI SDK and not reach this point. This indicates a configuration issue.\"\n });\n }\n documents.push({\n data: {\n text: textContent,\n title: part.filename\n }\n });\n return \"\";\n }\n }\n }).join(\"\")\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: toolCalls.length > 0 ? void 0 : text,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0,\n tool_plan: void 0\n });\n break;\n }\n case \"tool\": {\n messages.push(\n ...content.filter((toolResult) => toolResult.type !== \"tool-approval-response\").map((toolResult) => {\n var _a;\n const output = toolResult.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n return {\n role: \"tool\",\n content: contentValue,\n tool_call_id: toolResult.toolCallId\n };\n })\n );\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return { messages, documents, warnings };\n}\n\n// src/map-cohere-finish-reason.ts\nfunction mapCohereFinishReason(finishReason) {\n switch (finishReason) {\n case \"COMPLETE\":\n case \"STOP_SEQUENCE\":\n return \"stop\";\n case \"MAX_TOKENS\":\n return \"length\";\n case \"ERROR\":\n return \"error\";\n case \"TOOL_CALL\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/cohere-chat-language-model.ts\nvar CohereChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b;\n const cohereOptions = (_a = await parseProviderOptions({\n provider: \"cohere\",\n providerOptions,\n schema: cohereLanguageModelOptions\n })) != null ? _a : {};\n const {\n messages: chatPrompt,\n documents: cohereDocuments,\n warnings: promptWarnings\n } = convertToCohereChatPrompt(prompt);\n const {\n tools: cohereTools,\n toolChoice: cohereToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice });\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n max_tokens: maxOutputTokens,\n temperature,\n p: topP,\n k: topK,\n seed,\n stop_sequences: stopSequences,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? { type: \"json_object\", json_schema: responseFormat.schema } : void 0,\n // messages:\n messages: chatPrompt,\n // tools:\n tools: cohereTools,\n tool_choice: cohereToolChoice,\n // documents for RAG:\n ...cohereDocuments.length > 0 && { documents: cohereDocuments },\n // reasoning\n ...cohereOptions.thinking && {\n thinking: {\n type: (_b = cohereOptions.thinking.type) != null ? _b : \"enabled\",\n token_budget: cohereOptions.thinking.tokenBudget\n }\n }\n },\n warnings: [...toolWarnings, ...promptWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const { args, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n cohereChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const content = [];\n for (const item of (_a = response.message.content) != null ? _a : []) {\n if (item.type === \"text\" && item.text.length > 0) {\n content.push({ type: \"text\", text: item.text });\n continue;\n }\n if (item.type === \"thinking\" && item.thinking.length > 0) {\n content.push({ type: \"reasoning\", text: item.thinking });\n continue;\n }\n }\n for (const citation of (_b = response.message.citations) != null ? _b : []) {\n content.push({\n type: \"source\",\n sourceType: \"document\",\n id: this.config.generateId(),\n mediaType: \"text/plain\",\n title: ((_d = (_c = citation.sources[0]) == null ? void 0 : _c.document) == null ? void 0 : _d.title) || \"Document\",\n providerMetadata: {\n cohere: {\n start: citation.start,\n end: citation.end,\n text: citation.text,\n sources: citation.sources,\n ...citation.type && { citationType: citation.type }\n }\n }\n });\n }\n for (const toolCall of (_e = response.message.tool_calls) != null ? _e : []) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n // Cohere sometimes returns `null` for tool call arguments for tools\n // defined as having no arguments.\n input: toolCall.function.arguments.replace(/^null$/, \"{}\")\n });\n }\n return {\n content,\n finishReason: {\n unified: mapCohereFinishReason(response.finish_reason),\n raw: (_f = response.finish_reason) != null ? _f : void 0\n },\n usage: convertCohereUsage(response.usage.tokens),\n request: { body: args },\n response: {\n // TODO timestamp, model id\n id: (_g = response.generation_id) != null ? _g : void 0,\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: { ...args, stream: true },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n cohereChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let pendingToolCall = null;\n let isActiveReasoning = false;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = { unified: \"error\", raw: void 0 };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n const type = value.type;\n switch (type) {\n case \"content-start\": {\n if (value.delta.message.content.type === \"thinking\") {\n controller.enqueue({\n type: \"reasoning-start\",\n id: String(value.index)\n });\n isActiveReasoning = true;\n return;\n }\n controller.enqueue({\n type: \"text-start\",\n id: String(value.index)\n });\n return;\n }\n case \"content-delta\": {\n if (\"thinking\" in value.delta.message.content) {\n controller.enqueue({\n type: \"reasoning-delta\",\n id: String(value.index),\n delta: value.delta.message.content.thinking\n });\n return;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: String(value.index),\n delta: value.delta.message.content.text\n });\n return;\n }\n case \"content-end\": {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: String(value.index)\n });\n isActiveReasoning = false;\n return;\n }\n controller.enqueue({\n type: \"text-end\",\n id: String(value.index)\n });\n return;\n }\n case \"tool-call-start\": {\n const toolId = value.delta.message.tool_calls.id;\n const toolName = value.delta.message.tool_calls.function.name;\n const initialArgs = value.delta.message.tool_calls.function.arguments;\n pendingToolCall = {\n id: toolId,\n name: toolName,\n arguments: initialArgs,\n hasFinished: false\n };\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolId,\n toolName\n });\n if (initialArgs.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolId,\n delta: initialArgs\n });\n }\n return;\n }\n case \"tool-call-delta\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n const argsDelta = value.delta.message.tool_calls.function.arguments;\n pendingToolCall.arguments += argsDelta;\n controller.enqueue({\n type: \"tool-input-delta\",\n id: pendingToolCall.id,\n delta: argsDelta\n });\n }\n return;\n }\n case \"tool-call-end\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: pendingToolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: pendingToolCall.id,\n toolName: pendingToolCall.name,\n input: JSON.stringify(\n JSON.parse(((_a = pendingToolCall.arguments) == null ? void 0 : _a.trim()) || \"{}\")\n )\n });\n pendingToolCall.hasFinished = true;\n pendingToolCall = null;\n }\n return;\n }\n case \"message-start\": {\n controller.enqueue({\n type: \"response-metadata\",\n id: (_b = value.id) != null ? _b : void 0\n });\n return;\n }\n case \"message-end\": {\n finishReason = {\n unified: mapCohereFinishReason(value.delta.finish_reason),\n raw: value.delta.finish_reason\n };\n usage = value.delta.usage.tokens;\n return;\n }\n default: {\n return;\n }\n }\n },\n flush(controller) {\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertCohereUsage(usage)\n });\n }\n })\n ),\n request: { body: { ...args, stream: true } },\n response: { headers: responseHeaders }\n };\n }\n};\nvar cohereChatResponseSchema = z3.object({\n generation_id: z3.string().nullish(),\n message: z3.object({\n role: z3.string(),\n content: z3.array(\n z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n ).nullish(),\n tool_plan: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish(),\n citations: z3.array(\n z3.object({\n start: z3.number(),\n end: z3.number(),\n text: z3.string(),\n sources: z3.array(\n z3.object({\n type: z3.string().optional(),\n id: z3.string().optional(),\n document: z3.object({\n id: z3.string().optional(),\n text: z3.string(),\n title: z3.string()\n })\n })\n ),\n type: z3.string().optional()\n })\n ).nullish()\n }),\n finish_reason: z3.string(),\n usage: z3.object({\n billed_units: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n }),\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n});\nvar cohereChatChunkSchema = z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"citation-start\")\n }),\n z3.object({\n type: z3.literal(\"citation-end\")\n }),\n z3.object({\n type: z3.literal(\"content-start\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-delta\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n text: z3.string()\n }),\n z3.object({\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-end\"),\n index: z3.number()\n }),\n z3.object({\n type: z3.literal(\"message-start\"),\n id: z3.string().nullish()\n }),\n z3.object({\n type: z3.literal(\"message-end\"),\n delta: z3.object({\n finish_reason: z3.string(),\n usage: z3.object({\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n })\n }),\n // https://docs.cohere.com/v2/docs/streaming#tool-use-stream-events-for-tool-calling\n z3.object({\n type: z3.literal(\"tool-plan-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_plan: z3.string()\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-start\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n })\n })\n }),\n // A single tool call's `arguments` stream in chunks and must be accumulated\n // in a string and so the full tool object info can only be parsed once we see\n // `tool-call-end`.\n z3.object({\n type: z3.literal(\"tool-call-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n function: z3.object({\n arguments: z3.string()\n })\n })\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-end\")\n })\n]);\n\n// src/cohere-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/cohere-embedding-options.ts\nimport { z as z4 } from \"zod/v4\";\nvar cohereEmbeddingModelOptions = z4.object({\n /**\n * Specifies the type of input passed to the model. Default is `search_query`.\n *\n * - \"search_document\": Used for embeddings stored in a vector database for search use-cases.\n * - \"search_query\": Used for embeddings of search queries run against a vector DB to find relevant documents.\n * - \"classification\": Used for embeddings passed through a text classifier.\n * - \"clustering\": Used for embeddings run through a clustering algorithm.\n */\n inputType: z4.enum([\"search_document\", \"search_query\", \"classification\", \"clustering\"]).optional(),\n /**\n * Specifies how the API will handle inputs longer than the maximum token length.\n * Default is `END`.\n *\n * - \"NONE\": If selected, when the input exceeds the maximum input token length will return an error.\n * - \"START\": Will discard the start of the input until the remaining input is exactly the maximum input token length for the model.\n * - \"END\": Will discard the end of the input until the remaining input is exactly the maximum input token length for the model.\n */\n truncate: z4.enum([\"NONE\", \"START\", \"END\"]).optional(),\n /**\n * The number of dimensions of the output embedding.\n * Only available for `embed-v4.0` and newer models.\n *\n * Possible values are `256`, `512`, `1024`, and `1536`.\n * The default is `1536`.\n */\n outputDimension: z4.union([z4.literal(256), z4.literal(512), z4.literal(1024), z4.literal(1536)]).optional()\n});\n\n// src/cohere-embedding-model.ts\nvar CohereEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 96;\n this.supportsParallelCalls = true;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n headers,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const embeddingOptions = await parseProviderOptions2({\n provider: \"cohere\",\n providerOptions,\n schema: cohereEmbeddingModelOptions\n });\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embed`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n // The AI SDK only supports 'float' embeddings. Note that the Cohere API\n // supports other embedding types, but they are not currently supported by the AI SDK.\n // https://docs.cohere.com/v2/reference/embed#request.body.embedding_types\n embedding_types: [\"float\"],\n texts: values,\n input_type: (_a = embeddingOptions == null ? void 0 : embeddingOptions.inputType) != null ? _a : \"search_query\",\n truncate: embeddingOptions == null ? void 0 : embeddingOptions.truncate,\n output_dimension: embeddingOptions == null ? void 0 : embeddingOptions.outputDimension\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n cohereTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.embeddings.float,\n usage: { tokens: response.meta.billed_units.input_tokens },\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar cohereTextEmbeddingResponseSchema = z5.object({\n embeddings: z5.object({\n float: z5.array(z5.array(z5.number()))\n }),\n meta: z5.object({\n billed_units: z5.object({\n input_tokens: z5.number()\n })\n })\n});\n\n// src/reranking/cohere-reranking-model.ts\nimport {\n combineHeaders as combineHeaders3,\n createJsonResponseHandler as createJsonResponseHandler3,\n parseProviderOptions as parseProviderOptions3,\n postJsonToApi as postJsonToApi3\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/cohere-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar cohereRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z6.object({\n id: z6.string().nullish(),\n results: z6.array(\n z6.object({\n index: z6.number(),\n relevance_score: z6.number()\n })\n ),\n meta: z6.any()\n })\n )\n);\n\n// src/reranking/cohere-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod/v4\";\nvar cohereRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z7.object({\n maxTokensPerDoc: z7.number().optional(),\n priority: z7.number().optional()\n })\n )\n);\n\n// src/reranking/cohere-reranking-model.ts\nvar CohereRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // current implementation is based on v2 of the API: https://docs.cohere.com/v2/reference/rerank\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const rerankingOptions = await parseProviderOptions3({\n provider: \"cohere\",\n providerOptions,\n schema: cohereRerankingModelOptionsSchema\n });\n const warnings = [];\n if (documents.type === \"object\") {\n warnings.push({\n type: \"compatibility\",\n feature: \"object documents\",\n details: \"Object documents are converted to strings.\"\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi3({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders3(this.config.headers(), headers),\n body: {\n model: this.modelId,\n query,\n documents: documents.type === \"text\" ? documents.values : documents.values.map((value) => JSON.stringify(value)),\n top_n: topN,\n max_tokens_per_doc: rerankingOptions == null ? void 0 : rerankingOptions.maxTokensPerDoc,\n priority: rerankingOptions == null ? void 0 : rerankingOptions.priority\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler3(\n cohereRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n warnings,\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/cohere-provider.ts\nfunction createCohere(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.cohere.com/v2\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"COHERE_API_KEY\",\n description: \"Cohere\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cohere/${VERSION}`\n );\n const createChatModel = (modelId) => {\n var _a2;\n return new CohereChatLanguageModel(modelId, {\n provider: \"cohere.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: (_a2 = options.generateId) != null ? _a2 : generateId\n });\n };\n const createEmbeddingModel = (modelId) => new CohereEmbeddingModel(modelId, {\n provider: \"cohere.textEmbedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createRerankingModel = (modelId) => new CohereRerankingModel(modelId, {\n provider: \"cohere.reranking\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Cohere model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cohere = createCohere();\nexport {\n VERSION,\n cohere,\n createCohere\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";8TAuBA,SAAI,OAA6B,OAAE,YAAO,CASxC,SAAU,EAAE,OAAO,CACjB,KAAM,EAAE,KAAK,CAAC,UAAW,UAAU,CAAC,EAAE,SAAS,EAC/C,YAAa,EAAE,OAAO,EAAE,SAAS,CACnC,CAAC,EAAE,SAAS,CACd,CAAC,EAKG,EAAwB,EAAG,OAAO,CACpC,QAAS,EAAG,OAAO,CACrB,CAAC,EACG,EAA8B,EAA+B,CAC/D,YAAa,EACb,eAAgB,CAAC,IAAS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GAAiB,SAGrB,SAAS,EAAY,CAAC,EAAU,CAAC,EAAG,CAClC,IAAI,EACJ,IAAM,GAAW,EAAK,EAAqB,EAAQ,OAAO,IAAM,KAAO,EAAK,4BACtE,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,iBACzB,YAAa,QACf,CAAC,OACE,EAAQ,OACb,EACA,iBAAiB,IACnB,EACM,EAAkB,CAAC,IAAY,CACnC,IAAI,EACJ,OAAO,IAAI,EAAwB,EAAS,CAC1C,SAAU,cACV,UACA,QAAS,EACT,MAAO,EAAQ,MACf,YAAa,EAAM,EAAQ,aAAe,KAAO,EAAM,CACzD,CAAC,GAEG,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,uBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,mBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAW,QAAQ,CAAC,EAAS,CACjC,GAAI,WACF,MAAU,MACR,kEACF,EAEF,OAAO,EAAgB,CAAO,GAahC,OAXA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAS,GAAa",
"debugId": "565CBD6641E66C5364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n if (!idLine) {\n return undefined;\n }\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-darwin.js.map"
],
"mappings": ";gKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,wCAAwC,GAClE,OACjB,MAAM;AAAA,CAAI,EACV,KAAK,KAAQ,EAAK,SAAS,gBAAgB,CAAC,EACjD,GAAI,CAAC,EACD,OAEJ,IAAM,EAAQ,EAAO,MAAM,OAAO,EAClC,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,MAAM,EAAG,EAAE,EAGnC,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "41AD1D828E066AB464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"signin\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSigninHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateOAuth2Token\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { fn: f, argv: [i, \"name\"] }, k = {}, l = [{ [m]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [g, [j, \"aws\"]],\n [g, [j, \"aws-cn\"]],\n [g, [j, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://{Region}.signin.aws.amazon.com\", k],\n [\"https://{Region}.signin.amazonaws.cn\", k],\n [\"https://{Region}.signin.amazonaws-us-gov.com\", k],\n [\"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://signin.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 15,\n 3,\n 1,\n 4,\n r + 14,\n 2,\n 5,\n r + 14,\n 3,\n 11,\n 6,\n 4,\n 10,\n 7,\n 7,\n r + 4,\n 8,\n 8,\n r + 5,\n 9,\n 9,\n r + 6,\n r + 13,\n 5,\n r + 11,\n r + 12,\n 4,\n 13,\n 12,\n 6,\n r + 9,\n r + 10,\n 5,\n 14,\n r + 8,\n 6,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 16,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SigninServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SigninServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SigninServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n }\n}\nclass InternalServerException extends SigninServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n }\n}\nclass TooManyRequestsError extends SigninServiceException {\n name = \"TooManyRequestsError\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"TooManyRequestsError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsError.prototype);\n this.error = opts.error;\n }\n}\nclass ValidationException extends SigninServiceException {\n name = \"ValidationException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n this.error = opts.error;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _AT = \"AccessToken\";\nconst _COAT = \"CreateOAuth2Token\";\nconst _COATR = \"CreateOAuth2TokenRequest\";\nconst _COATRB = \"CreateOAuth2TokenRequestBody\";\nconst _COATRBr = \"CreateOAuth2TokenResponseBody\";\nconst _COATRr = \"CreateOAuth2TokenResponse\";\nconst _ISE = \"InternalServerException\";\nconst _RT = \"RefreshToken\";\nconst _TMRE = \"TooManyRequestsError\";\nconst _VE = \"ValidationException\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _jN = \"jsonName\";\nconst _m = \"message\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.signin\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _se = \"server\";\nconst _tI = \"tokenInput\";\nconst _tO = \"tokenOutput\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.signin\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SigninServiceException$ = [-3, _s, \"SigninServiceException\", 0, [], []];\n_s_registry.registerError(SigninServiceException$, SigninServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);\nvar ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(ValidationException$, ValidationException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar AccessToken$ = [\n 3,\n n0,\n _AT,\n 8,\n [_aKI, _sAK, _sT],\n [\n [0, { [_jN]: _aKI }],\n [0, { [_jN]: _sAK }],\n [0, { [_jN]: _sT }],\n ],\n 3,\n];\nvar CreateOAuth2TokenRequest$ = [\n 3,\n n0,\n _COATR,\n 0,\n [_tI],\n [[() => CreateOAuth2TokenRequestBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenRequestBody$ = [\n 3,\n n0,\n _COATRB,\n 0,\n [_cI, _gT, _co, _rU, _cV, _rT],\n [\n [0, { [_jN]: _cI }],\n [0, { [_jN]: _gT }],\n 0,\n [0, { [_jN]: _rU }],\n [0, { [_jN]: _cV }],\n [() => RefreshToken, { [_jN]: _rT }],\n ],\n 2,\n];\nvar CreateOAuth2TokenResponse$ = [\n 3,\n n0,\n _COATRr,\n 0,\n [_tO],\n [[() => CreateOAuth2TokenResponseBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenResponseBody$ = [\n 3,\n n0,\n _COATRBr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [\n [() => AccessToken$, { [_jN]: _aT }],\n [0, { [_jN]: _tT }],\n [1, { [_jN]: _eI }],\n [() => RefreshToken, { [_jN]: _rT }],\n [0, { [_jN]: _iT }],\n ],\n 4,\n];\nvar CreateOAuth2Token$ = [\n 9,\n n0,\n _COAT,\n { [_h]: [\"POST\", \"/v1/token\", 200] },\n () => CreateOAuth2TokenRequest$,\n () => CreateOAuth2TokenResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2023-01-01\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.signin\",\n errorTypeRegistries,\n version: \"2023-01-01\",\n serviceTarget: \"Signin\",\n },\n serviceId: config?.serviceId ?? \"Signin\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SigninClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateOAuth2TokenCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"Signin\", \"CreateOAuth2Token\", {})\n .n(\"SigninClient\", \"CreateOAuth2TokenCommand\")\n .sc(CreateOAuth2Token$)\n .build() {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n};\nclass Signin extends SigninClient {\n}\nclient.createAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n SERVER_ERROR: \"server_error\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessToken$ = AccessToken$;\nexports.CreateOAuth2Token$ = CreateOAuth2Token$;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$;\nexports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$;\nexports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$;\nexports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\nexports.SigninServiceException = SigninServiceException;\nexports.SigninServiceException$ = SigninServiceException$;\nexports.TooManyRequestsError = TooManyRequestsError;\nexports.TooManyRequestsError$ = TooManyRequestsError$;\nexports.ValidationException = ValidationException;\nexports.ValidationException$ = ValidationException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAgD,MAAO,EAAQ,EAAS,IAAU,CACpF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,SACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAAsC,CAAC,IAAmB,CAC5D,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,oBAAqB,CACtB,EAAQ,KAAK,GAAoC,CAAC,EAClD,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEL,GAA8B,CAAC,IAAW,CAC5C,IAAM,EAAW,EAAgB,yBAAy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,EACb,GAAG,EAAY,EACf,EAAE,QAAS,CAAC,EAAS,EAAI,EAAQ,EAAG,CACrC,MAAO,CAAC,EAAU,kBAAkB,EAAQ,EAAQ,iCAAiC,CAAC,CAAC,EAC1F,EACI,EAAE,SAAU,oBAAqB,CAAC,CAAC,EACnC,EAAE,eAAgB,0BAA0B,EAC5C,GAAG,EAAkB,EACrB,MAAM,CAAE,CACb,CAEA,IAAM,GAAW,CACb,0BACJ,EACA,MAAM,UAAe,CAAa,CAClC,CACA,EAAO,uBAAuB,GAAU,CAAM,EAE9C,IAAM,GAAkB,CACpB,iBAAkB,mBAClB,yBAA0B,2BAC1B,gBAAiB,kBACjB,aAAc,eACd,cAAe,gBACf,yBAA0B,0BAC9B,EAEA,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EACX,GAAwB,EACxB,GAAyB,GACzB,GAAe,GACf,GAAqB,GACrB,GAA2B,EAC3B,GAA4B,GAC5B,GAAgC,GAChC,GAA6B,GAC7B,GAAiC,GACjC,GAA0B,EAC1B,GAA2B,GAC3B,GAAkB,GAClB,GAAS,EACT,GAAe,EACf,GAAyB,EACzB,GAA0B,GAC1B,GAAuB,EACvB,GAAwB,GACxB,GAAsB,EACtB,GAAuB,GACvB,GAAsB",
"debugId": "76CFB8502D12506B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "E51C3B363243322B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0C941F7E76EF587F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "1CF0E0CF6F8E5DBA64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "FA961639478BBF3C64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "FEC88F39D7BF95D764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "88AC4D20675CC78064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+togetherai@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/togetherai/dist/index.mjs"],
"sourcesContent": [
"// src/togetherai-provider.ts\nimport {\n OpenAICompatibleChatLanguageModel,\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-model.ts\nimport {\n combineHeaders,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar togetheraiErrorSchema = lazySchema(\n () => zodSchema(\n z.object({\n error: z.object({\n message: z.string()\n })\n })\n )\n);\nvar togetheraiRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z.object({\n id: z.string().nullish(),\n model: z.string().nullish(),\n results: z.array(\n z.object({\n index: z.number(),\n relevance_score: z.number()\n })\n ),\n usage: z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number()\n })\n })\n )\n);\n\n// src/reranking/togetherai-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar togetheraiRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z2.object({\n rankFields: z2.array(z2.string()).optional()\n })\n )\n);\n\n// src/reranking/togetherai-reranking-model.ts\nvar TogetherAIRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // see https://docs.together.ai/reference/rerank-1\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a, _b;\n const rerankingOptions = await parseProviderOptions({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiRerankingModelOptionsSchema\n });\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n model: this.modelId,\n documents: documents.values,\n query,\n top_n: topN,\n rank_fields: rerankingOptions == null ? void 0 : rerankingOptions.rankFields,\n return_documents: false\n // reduce response size\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: togetheraiErrorSchema,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler(\n togetheraiRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n modelId: (_b = response.model) != null ? _b : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/togetherai-image-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertImageModelFileToDataUri,\n createJsonResponseHandler as createJsonResponseHandler2,\n createJsonErrorResponseHandler as createJsonErrorResponseHandler2,\n lazySchema as lazySchema3,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2,\n zodSchema as zodSchema3\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\nvar TogetherAIImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c;\n const warnings = [];\n if (mask != null) {\n throw new Error(\n \"Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.\"\n );\n }\n if (size != null) {\n warnings.push({\n type: \"unsupported\",\n feature: \"aspectRatio\",\n details: \"This model does not support the `aspectRatio` option. Use `size` instead.\"\n });\n }\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const togetheraiOptions = await parseProviderOptions2({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiImageModelOptionsSchema\n });\n let imageUrl;\n if (files != null && files.length > 0) {\n imageUrl = convertImageModelFileToDataUri(files[0]);\n if (files.length > 1) {\n warnings.push({\n type: \"other\",\n message: \"Together AI only supports a single input image. Additional images are ignored.\"\n });\n }\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi2({\n url: `${this.config.baseURL}/images/generations`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n prompt,\n seed,\n ...n > 1 ? { n } : {},\n ...splitSize && {\n width: parseInt(splitSize[0]),\n height: parseInt(splitSize[1])\n },\n ...imageUrl != null ? { image_url: imageUrl } : {},\n response_format: \"base64\",\n ...togetheraiOptions != null ? togetheraiOptions : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler2({\n errorSchema: togetheraiErrorSchema2,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler2(\n togetheraiImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n};\nvar togetheraiImageResponseSchema = z3.object({\n data: z3.array(\n z3.object({\n b64_json: z3.string()\n })\n )\n});\nvar togetheraiErrorSchema2 = z3.object({\n error: z3.object({\n message: z3.string()\n })\n});\nvar togetheraiImageModelOptionsSchema = lazySchema3(\n () => zodSchema3(\n z3.object({\n /**\n * Number of generation steps. Higher values can improve quality.\n */\n steps: z3.number().nullish(),\n /**\n * Guidance scale for image generation.\n */\n guidance: z3.number().nullish(),\n /**\n * Negative prompt to guide what to avoid.\n */\n negative_prompt: z3.string().nullish(),\n /**\n * Disable the safety checker for image generation.\n * When true, the API will not reject images flagged as potentially NSFW.\n * Not available for Flux Schnell Free and Flux Pro models.\n */\n disable_safety_checker: z3.boolean().nullish()\n }).passthrough()\n )\n);\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/togetherai-provider.ts\nfunction loadDeprecatedApiKey() {\n if (typeof process === \"undefined\") {\n return void 0;\n }\n if (typeof process.env.TOGETHER_API_KEY === \"string\") {\n return void 0;\n }\n const key = process.env.TOGETHER_AI_API_KEY;\n if (typeof key === \"string\") {\n console.warn(\n \"TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.\"\n );\n }\n return key;\n}\nfunction createTogetherAI(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.together.xyz/v1/\"\n );\n const getHeaders = () => {\n var _a2;\n return withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: (_a2 = options.apiKey) != null ? _a2 : loadDeprecatedApiKey(),\n environmentVariableName: \"TOGETHER_API_KEY\",\n description: \"TogetherAI\"\n })}`,\n ...options.headers\n },\n `ai-sdk/togetherai/${VERSION}`\n );\n };\n const getCommonModelConfig = (modelType) => ({\n provider: `togetherai.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new TogetherAIImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const createRerankingModel = (modelId) => new TogetherAIRerankingModel(modelId, {\n ...getCommonModelConfig(\"reranking\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.languageModel = createChatModel;\n provider.chatModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n return provider;\n}\nvar togetherai = createTogetherAI();\nexport {\n VERSION,\n createTogetherAI,\n togetherai\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wVAwBA,SAAI,OAAwB,OAC1B,SAAM,OACJ,EAAE,OAAO,CACP,MAAO,EAAE,OAAO,CACd,QAAS,EAAE,OAAO,CACpB,CAAC,CACH,CAAC,CACH,CACF,EACI,EAAoC,EACtC,IAAM,EACJ,EAAE,OAAO,CACP,GAAI,EAAE,OAAO,EAAE,QAAQ,EACvB,MAAO,EAAE,OAAO,EAAE,QAAQ,EAC1B,QAAS,EAAE,MACT,EAAE,OAAO,CACP,MAAO,EAAE,OAAO,EAChB,gBAAiB,EAAE,OAAO,CAC5B,CAAC,CACH,EACA,MAAO,EAAE,OAAO,CACd,cAAe,EAAE,OAAO,EACxB,kBAAmB,EAAE,OAAO,EAC5B,aAAc,EAAE,OAAO,CACzB,CAAC,CACH,CAAC,CACH,CACF,EAKI,EAAwC,EAC1C,IAAM,EACJ,EAAG,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B,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAqB,EAAS,IACnE,EAAqB,OAAO,EAC/B,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAyB,EAAS,IAC3E,EAAqB,WAAW,EACnC,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EAWrD,OAVA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EAC9B,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,UAAY,EACrB,EAAS,eAAiB,EACnB,EAET,IAAI,GAAa,EAAiB",
"debugId": "E2BBA640D6C137A864756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/createCredentialChain.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/resolveLogins.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/IndexedDbStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/InMemoryStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/localStorage.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromEnv.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromNodeProviderChain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.base.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { ProviderError } from \"@smithy/core/config\";\nexport const createCredentialChain = (...credentialProviders) => {\n let expireAfter = -1;\n const baseFunction = async (awsIdentityProperties) => {\n const credentials = await propertyProviderChain(...credentialProviders)(awsIdentityProperties);\n if (!credentials.expiration && expireAfter !== -1) {\n credentials.expiration = new Date(Date.now() + expireAfter);\n }\n return credentials;\n };\n const withOptions = Object.assign(baseFunction, {\n expireAfter(milliseconds) {\n if (milliseconds < 5 * 60_000) {\n throw new Error(\"@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.\");\n }\n expireAfter = milliseconds;\n return withOptions;\n },\n });\n return withOptions;\n};\nexport const propertyProviderChain = (...providers) => async (awsIdentityProperties) => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\", { tryNextLink: false });\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentity(parameters) {\n return async (awsIdentityProperties) => {\n parameters.logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const { GetCredentialsForIdentityCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => parameters.clientConfig?.[property] ??\n parameters.parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters.logger), SessionToken, } = throwOnMissingCredentials(parameters.logger), } = await (parameters.client ??\n new CognitoIdentityClient(Object.assign({}, parameters.clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }))).send(new GetCredentialsForIdentityCommand({\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId,\n Logins: parameters.logins ? await resolveLogins(parameters.logins) : undefined,\n }));\n return {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration,\n };\n };\n}\nfunction throwOnMissingAccessKeyId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no access key ID\", { logger });\n}\nfunction throwOnMissingCredentials(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no credentials\", { logger });\n}\nfunction throwOnMissingSecretKey(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no secret key\", { logger });\n}\n",
"export function resolveLogins(logins) {\n return Promise.all(Object.keys(logins).reduce((arr, name) => {\n const tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n }\n else {\n arr.push(tokenOrProvider().then((token) => [name, token]));\n }\n return arr;\n }, [])).then((resolvedPairs) => resolvedPairs.reduce((logins, [key, value]) => {\n logins[key] = value;\n return logins;\n }, {}));\n}\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromCognitoIdentity } from \"./fromCognitoIdentity\";\nimport { localStorage } from \"./localStorage\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentityPool({ accountId, cache = localStorage(), client, clientConfig, customRoleArn, identityPoolId, logins, userIdentifier = !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : undefined, logger, parentClientConfig, }) {\n logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const cacheKey = userIdentifier\n ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}`\n : undefined;\n let provider = async (awsIdentityProperties) => {\n const { GetIdCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => clientConfig?.[property] ??\n parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const _client = client ??\n new CognitoIdentityClient(Object.assign({}, clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }));\n let identityId = (cacheKey && (await cache.getItem(cacheKey)));\n if (!identityId) {\n const { IdentityId = throwOnMissingId(logger) } = await _client.send(new GetIdCommand({\n AccountId: accountId,\n IdentityPoolId: identityPoolId,\n Logins: logins ? await resolveLogins(logins) : undefined,\n }));\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => { });\n }\n }\n provider = fromCognitoIdentity({\n client: _client,\n customRoleArn,\n logins,\n identityId,\n });\n return provider(awsIdentityProperties);\n };\n return (awsIdentityProperties) => provider(awsIdentityProperties).catch(async (err) => {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(() => { });\n }\n throw err;\n });\n}\nfunction throwOnMissingId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no identity ID\", { logger });\n}\n",
"const STORE_NAME = \"IdentityIds\";\nexport class IndexedDbStorage {\n dbName;\n constructor(dbName = \"aws:cognito-identity-ids\") {\n this.dbName = dbName;\n }\n getItem(key) {\n return this.withObjectStore(\"readonly\", (store) => {\n const req = store.get(key);\n return new Promise((resolve) => {\n req.onerror = () => resolve(null);\n req.onsuccess = () => resolve(req.result ? req.result.value : null);\n });\n }).catch(() => null);\n }\n removeItem(key) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.delete(key);\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n setItem(id, value) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.put({ id, value });\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n getDb() {\n const openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise((resolve, reject) => {\n openDbRequest.onsuccess = () => {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = () => {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = () => {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = () => {\n const db = openDbRequest.result;\n db.onerror = () => {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n }\n withObjectStore(mode, action) {\n return this.getDb().then((db) => {\n const tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = () => db.close();\n return new Promise((resolve, reject) => {\n tx.onerror = () => reject(tx.error);\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch((err) => {\n db.close();\n throw err;\n });\n });\n }\n}\n",
"export class InMemoryStorage {\n store;\n constructor(store = {}) {\n this.store = store;\n }\n getItem(key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n }\n removeItem(key) {\n delete this.store[key];\n }\n setItem(key, value) {\n this.store[key] = value;\n }\n}\n",
"import { IndexedDbStorage } from \"./IndexedDbStorage\";\nimport { InMemoryStorage } from \"./InMemoryStorage\";\nconst inMemoryStorage = new InMemoryStorage();\nexport function localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}\n",
"import { fromCognitoIdentity as _fromCognitoIdentity } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentity = (options) => _fromCognitoIdentity({\n ...options,\n});\n",
"import { fromCognitoIdentityPool as _fromCognitoIdentityPool } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentityPool = (options) => _fromCognitoIdentityPool({\n ...options,\n});\n",
"import { fromContainerMetadata as _fromContainerMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromContainerMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromContainerMetadata\");\n return _fromContainerMetadata(init);\n};\n",
"import { fromEnv as _fromEnv } from \"@aws-sdk/credential-provider-env\";\nexport const fromEnv = (init) => _fromEnv(init);\n",
"import { fromIni as _fromIni } from \"@aws-sdk/credential-provider-ini\";\nexport const fromIni = (init = {}) => _fromIni({\n ...init,\n});\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromInstanceMetadata as _fromInstanceMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromInstanceMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromInstanceMetadata\");\n return async () => _fromInstanceMetadata(init)().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_IMDS\", \"0\"));\n};\n",
"import { fromLoginCredentials as _fromLoginCredentials, } from \"@aws-sdk/credential-provider-login\";\nexport const fromLoginCredentials = (init) => _fromLoginCredentials({\n ...init,\n});\n",
"import { ENV_KEY, ENV_SECRET, fromEnv } from \"@aws-sdk/credential-provider-env\";\nimport { CredentialsProviderError, ENV_PROFILE } from \"@smithy/core/config\";\nimport { remoteProvider } from \"./remoteProvider\";\nimport { memoizeChain } from \"./runtime/memoize-chain\";\nlet multipleCredentialSourceWarningEmitted = false;\nexport const defaultProvider = (init = {}) => memoizeChain([\n async () => {\n const profile = init.profile ?? process.env[ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\"\n ? init.logger.warn.bind(init.logger)\n : console.warn;\n warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true,\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return fromEnv(init)();\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new CredentialsProviderError(\"Skipping SSO provider in default chain (inputs do not include SSO fields).\", { logger: init.logger });\n }\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await import(\"@aws-sdk/credential-provider-ini\");\n return fromIni(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await import(\"@aws-sdk/credential-provider-process\");\n return fromProcess(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await import(\"@aws-sdk/credential-provider-web-identity\");\n return fromTokenFile(init)(awsIdentityProperties);\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger,\n });\n },\n], credentialsTreatedAsExpired);\nexport const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;\nexport const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;\n",
"import { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nexport const remoteProvider = async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n return chain(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== \"false\") {\n return async () => {\n throw new CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n};\n",
"export function memoizeChain(providers, treatAsExpired) {\n const chain = internalCreateChain(providers);\n let activeLock;\n let passiveLock;\n let credentials;\n const provider = async (options) => {\n if (options?.forceRefresh) {\n return await chain(options);\n }\n if (credentials?.expiration) {\n if (credentials?.expiration?.getTime() < Date.now()) {\n credentials = undefined;\n }\n }\n if (activeLock) {\n await activeLock;\n }\n else if (!credentials || treatAsExpired?.(credentials)) {\n if (credentials) {\n if (!passiveLock) {\n passiveLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n passiveLock = undefined;\n });\n }\n }\n else {\n activeLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n activeLock = undefined;\n });\n return provider(options);\n }\n }\n return credentials;\n };\n return provider;\n}\nexport const internalCreateChain = (providers) => async (awsIdentityProperties) => {\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { defaultProvider } from \"@aws-sdk/credential-provider-node\";\nexport const fromNodeProviderChain = (init = {}) => defaultProvider({\n ...init,\n});\n",
"import { fromProcess as _fromProcess } from \"@aws-sdk/credential-provider-process\";\nexport const fromProcess = (init) => _fromProcess(init);\n",
"import { fromSSO as _fromSSO } from \"@aws-sdk/credential-provider-sso\";\nexport const fromSSO = (init = {}) => {\n return _fromSSO({ ...init });\n};\n",
"import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS } from \"@smithy/core/config\";\nimport { fromNodeProviderChain } from \"./fromNodeProviderChain\";\nimport { fromTemporaryCredentials as fromTemporaryCredentialsBase } from \"./fromTemporaryCredentials.base\";\nexport const fromTemporaryCredentials = (options) => {\n return fromTemporaryCredentialsBase(options, fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => loadConfig({\n environmentVariableSelector: (env) => env.AWS_REGION,\n configFileSelector: (profileData) => {\n return profileData.region;\n },\n default: () => undefined,\n }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, profile })());\n};\n",
"import { normalizeProvider } from \"@smithy/core\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nconst ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nexport const fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {\n let stsClient;\n return async (awsIdentityProperties = {}) => {\n const { callerClientConfig } = awsIdentityProperties;\n const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;\n const logger = options.logger ?? callerClientConfig?.logger;\n logger?.debug(\"@aws-sdk/credential-providers - fromTemporaryCredentials (STS)\");\n const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? \"aws-sdk-js-\" + Date.now() };\n if (params?.SerialNumber) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {\n tryNextLink: false,\n logger,\n });\n }\n params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);\n }\n const { AssumeRoleCommand, STSClient } = await import(\"./loadSts.js\");\n if (!stsClient) {\n const defaultCredentialsOrError = typeof credentialDefaultProvider === \"function\" ? credentialDefaultProvider() : undefined;\n const credentialSources = [\n options.masterCredentials,\n options.clientConfig?.credentials,\n void callerClientConfig?.credentials,\n callerClientConfig?.credentialDefaultProvider?.(),\n defaultCredentialsOrError,\n ];\n let credentialSource = \"STS client default credentials\";\n if (credentialSources[0]) {\n credentialSource = \"options.masterCredentials\";\n }\n else if (credentialSources[1]) {\n credentialSource = \"options.clientConfig.credentials\";\n }\n else if (credentialSources[2]) {\n credentialSource = \"caller client's credentials\";\n throw new Error(\"fromTemporaryCredentials recursion in callerClientConfig.credentials\");\n }\n else if (credentialSources[3]) {\n credentialSource = \"caller client's credentialDefaultProvider\";\n }\n else if (credentialSources[4]) {\n credentialSource = \"AWS SDK default credentials\";\n }\n const regionSources = [\n options.clientConfig?.region,\n callerClientConfig?.region,\n await regionProvider?.({\n profile,\n }),\n ASSUME_ROLE_DEFAULT_REGION,\n ];\n let regionSource = \"default partition's default region\";\n if (regionSources[0]) {\n regionSource = \"options.clientConfig.region\";\n }\n else if (regionSources[1]) {\n regionSource = \"caller client's region\";\n }\n else if (regionSources[2]) {\n regionSource = \"file or env region\";\n }\n const requestHandlerSources = [\n filterRequestHandler(options.clientConfig?.requestHandler),\n filterRequestHandler(callerClientConfig?.requestHandler),\n ];\n let requestHandlerSource = \"STS default requestHandler\";\n if (requestHandlerSources[0]) {\n requestHandlerSource = \"options.clientConfig.requestHandler\";\n }\n else if (requestHandlerSources[1]) {\n requestHandlerSource = \"caller client's requestHandler\";\n }\n logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +\n `${regionSource}=${await normalizeProvider(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);\n stsClient = new STSClient({\n userAgentAppId: callerClientConfig?.userAgentAppId,\n ...options.clientConfig,\n credentials: coalesce(credentialSources),\n logger,\n profile,\n region: coalesce(regionSources),\n requestHandler: coalesce(requestHandlerSources),\n });\n }\n if (options.clientPlugins) {\n for (const plugin of options.clientPlugins) {\n stsClient.middlewareStack.use(plugin);\n }\n }\n const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {\n logger,\n });\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n credentialScope: Credentials.CredentialScope,\n };\n };\n};\nconst filterRequestHandler = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\" ? undefined : requestHandler;\n};\nconst coalesce = (args) => {\n for (const item of args) {\n if (item !== undefined) {\n return item;\n }\n }\n};\n",
"import { fromTokenFile as _fromTokenFile } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromTokenFile = (init = {}) => _fromTokenFile({\n ...init,\n});\n",
"import { fromWebToken as _fromWebToken } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromWebToken = (init) => _fromWebToken({\n ...init,\n});\n"
],
"mappings": ";4lBAAA,oBACa,QAAwB,SAAI,SAAwB,MAC7D,SAAI,OAAc,QAQZ,OAAc,YAAO,YAPN,MAAO,IAA0B,CAClD,IAAM,EAAc,MAAM,GAAsB,GAAG,CAAmB,EAAE,CAAqB,EAC7F,GAAI,CAAC,EAAY,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AAe,CAAC,IAAS,GAAc,IAC7C,CACP,CAAC",
"debugId": "3B44CDE8E8E4D5F564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+groq@3.0.31+d6123d32214422cb/node_modules/@ai-sdk/groq/dist/index.mjs"],
"sourcesContent": [
"// src/groq-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/groq-chat-language-model.ts\nimport {\n InvalidResponseDataError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n isParsableJson,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-groq-usage.ts\nfunction convertGroqUsage(usage) {\n var _a, _b, _c, _d;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_d = (_c = usage.completion_tokens_details) == null ? void 0 : _c.reasoning_tokens) != null ? _d : void 0;\n const textTokens = reasoningTokens != null ? completionTokens - reasoningTokens : completionTokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: textTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-groq-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToGroqChatMessages(prompt) {\n var _a;\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n if (content.length === 1 && content[0].type === \"text\") {\n messages.push({ role: \"user\", content: content[0].text });\n break;\n }\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (!part.mediaType.startsWith(\"image/\")) {\n throw new UnsupportedFunctionalityError({\n functionality: \"Non-image file content parts\"\n });\n }\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: {\n url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`\n }\n };\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n let reasoning = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n // groq supports reasoning for tool-calls in multi-turn conversations\n // https://github.com/vercel/ai/issues/7860\n case \"reasoning\": {\n reasoning += part.text;\n break;\n }\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n ...reasoning.length > 0 ? { reasoning } : null,\n ...toolCalls.length > 0 ? { tool_calls: toolCalls } : null\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/groq-chat-options.ts\nimport { z } from \"zod/v4\";\nvar groqLanguageModelOptions = z.object({\n reasoningFormat: z.enum([\"parsed\", \"raw\", \"hidden\"]).optional(),\n /**\n * Specifies the reasoning effort level for model inference.\n * @see https://console.groq.com/docs/reasoning#reasoning-effort\n */\n reasoningEffort: z.enum([\"none\", \"default\", \"low\", \"medium\", \"high\"]).optional(),\n /**\n * Whether to enable parallel function calling during tool use. Default to true.\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * A unique identifier representing your end-user, which can help OpenAI to\n * monitor and detect abuse. Learn more.\n */\n user: z.string().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n * When true, the model uses constrained decoding to guarantee schema compliance.\n * Only used when structured outputs are enabled and a schema is provided.\n *\n * @default true\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Service tier for the request.\n * - 'on_demand': Default tier with consistent performance and fairness\n * - 'flex': Higher throughput tier optimized for workloads that can handle occasional request failures\n * - 'auto': Uses on_demand rate limits, then falls back to flex tier if exceeded\n *\n * @default 'on_demand'\n */\n serviceTier: z.enum([\"on_demand\", \"flex\", \"auto\"]).optional()\n});\n\n// src/groq-error.ts\nimport { z as z2 } from \"zod/v4\";\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nvar groqErrorDataSchema = z2.object({\n error: z2.object({\n message: z2.string(),\n type: z2.string()\n })\n});\nvar groqFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: groqErrorDataSchema,\n errorToMessage: (data) => data.error.message\n});\n\n// src/groq-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\n\n// src/groq-browser-search-models.ts\nvar BROWSER_SEARCH_SUPPORTED_MODELS = [\n \"openai/gpt-oss-20b\",\n \"openai/gpt-oss-120b\"\n];\nfunction isBrowserSearchSupportedModel(modelId) {\n return BROWSER_SEARCH_SUPPORTED_MODELS.includes(modelId);\n}\nfunction getSupportedModelsString() {\n return BROWSER_SEARCH_SUPPORTED_MODELS.join(\", \");\n}\n\n// src/groq-prepare-tools.ts\nfunction prepareTools({\n tools,\n toolChoice,\n modelId\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const groqTools2 = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n if (tool.id === \"groq.browser_search\") {\n if (!isBrowserSearchSupportedModel(modelId)) {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`,\n details: `Browser search is only supported on the following models: ${getSupportedModelsString()}. Current model: ${modelId}`\n });\n } else {\n groqTools2.push({\n type: \"browser_search\"\n });\n }\n } else {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n }\n } else {\n groqTools2.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: groqTools2, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n case \"required\":\n return { tools: groqTools2, toolChoice: type, toolWarnings };\n case \"tool\":\n return {\n tools: groqTools2,\n toolChoice: {\n type: \"function\",\n function: {\n name: toolChoice.toolName\n }\n },\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/map-groq-finish-reason.ts\nfunction mapGroqFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n return \"length\";\n case \"content_filter\":\n return \"content-filter\";\n case \"function_call\":\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/groq-chat-language-model.ts\nvar GroqChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"image/*\": [/^https?:\\/\\/.*$/]\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n stream,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b, _c;\n const warnings = [];\n const groqOptions = await parseProviderOptions({\n provider: \"groq\",\n providerOptions,\n schema: groqLanguageModelOptions\n });\n const structuredOutputs = (_a = groqOptions == null ? void 0 : groqOptions.structuredOutputs) != null ? _a : true;\n const strictJsonSchema = (_b = groqOptions == null ? void 0 : groqOptions.strictJsonSchema) != null ? _b : true;\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null && !structuredOutputs) {\n warnings.push({\n type: \"unsupported\",\n feature: \"responseFormat\",\n details: \"JSON response format schema is only supported with structuredOutputs\"\n });\n }\n const {\n tools: groqTools2,\n toolChoice: groqToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice, modelId: this.modelId });\n return {\n args: {\n // model id:\n model: this.modelId,\n // model specific settings:\n user: groqOptions == null ? void 0 : groqOptions.user,\n parallel_tool_calls: groqOptions == null ? void 0 : groqOptions.parallelToolCalls,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n stop: stopSequences,\n seed,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && responseFormat.schema != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_c = responseFormat.name) != null ? _c : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // provider options:\n reasoning_format: groqOptions == null ? void 0 : groqOptions.reasoningFormat,\n reasoning_effort: groqOptions == null ? void 0 : groqOptions.reasoningEffort,\n service_tier: groqOptions == null ? void 0 : groqOptions.serviceTier,\n // messages:\n messages: convertToGroqChatMessages(prompt),\n // tools:\n tools: groqTools2,\n tool_choice: groqToolChoice\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b;\n const { args, warnings } = await this.getArgs({\n ...options,\n stream: false\n });\n const body = JSON.stringify(args);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n groqChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n const reasoning = choice.message.reasoning;\n if (reasoning != null && reasoning.length > 0) {\n content.push({\n type: \"reasoning\",\n text: reasoning\n });\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: (_a = toolCall.id) != null ? _a : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: (_b = choice.finish_reason) != null ? _b : void 0\n },\n usage: convertGroqUsage(response.usage),\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n request: { body }\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs({ ...options, stream: true });\n const body = JSON.stringify({ ...args, stream: true });\n const { responseHeaders, value: response } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: {\n ...args,\n stream: true\n },\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(groqChatChunkSchema),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const toolCalls = [];\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let isActiveText = false;\n let isActiveReasoning = false;\n let providerMetadata;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (\"error\" in value) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: value.error });\n return;\n }\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (((_a = value.x_groq) == null ? void 0 : _a.usage) != null) {\n usage = value.x_groq.usage;\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n if (delta.reasoning != null && delta.reasoning.length > 0) {\n if (!isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-start\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = true;\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: \"reasoning-0\",\n delta: delta.reasoning\n });\n }\n if (delta.content != null && delta.content.length > 0) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n if (!isActiveText) {\n controller.enqueue({ type: \"text-start\", id: \"txt-0\" });\n isActiveText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"txt-0\",\n delta: delta.content\n });\n }\n if (delta.tool_calls != null) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n for (const toolCallDelta of delta.tool_calls) {\n const index = toolCallDelta.index;\n if (toolCalls[index] == null) {\n if (toolCallDelta.type !== \"function\") {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function' type.`\n });\n }\n if (toolCallDelta.id == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'id' to be a string.`\n });\n }\n if (((_b = toolCallDelta.function) == null ? void 0 : _b.name) == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function.name' to be a string.`\n });\n }\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallDelta.id,\n toolName: toolCallDelta.function.name\n });\n toolCalls[index] = {\n id: toolCallDelta.id,\n type: \"function\",\n function: {\n name: toolCallDelta.function.name,\n arguments: (_c = toolCallDelta.function.arguments) != null ? _c : \"\"\n },\n hasFinished: false\n };\n const toolCall2 = toolCalls[index];\n if (((_d = toolCall2.function) == null ? void 0 : _d.name) != null && ((_e = toolCall2.function) == null ? void 0 : _e.arguments) != null) {\n if (toolCall2.function.arguments.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall2.id,\n delta: toolCall2.function.arguments\n });\n }\n if (isParsableJson(toolCall2.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall2.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_f = toolCall2.id) != null ? _f : generateId(),\n toolName: toolCall2.function.name,\n input: toolCall2.function.arguments\n });\n toolCall2.hasFinished = true;\n }\n }\n continue;\n }\n const toolCall = toolCalls[index];\n if (toolCall.hasFinished) {\n continue;\n }\n if (((_g = toolCallDelta.function) == null ? void 0 : _g.arguments) != null) {\n toolCall.function.arguments += (_i = (_h = toolCallDelta.function) == null ? void 0 : _h.arguments) != null ? _i : \"\";\n }\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall.id,\n delta: (_j = toolCallDelta.function.arguments) != null ? _j : \"\"\n });\n if (((_k = toolCall.function) == null ? void 0 : _k.name) != null && ((_l = toolCall.function) == null ? void 0 : _l.arguments) != null && isParsableJson(toolCall.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_m = toolCall.id) != null ? _m : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n toolCall.hasFinished = true;\n }\n }\n }\n },\n flush(controller) {\n if (isActiveReasoning) {\n controller.enqueue({ type: \"reasoning-end\", id: \"reasoning-0\" });\n }\n if (isActiveText) {\n controller.enqueue({ type: \"text-end\", id: \"txt-0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertGroqUsage(usage),\n ...providerMetadata != null ? { providerMetadata } : {}\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nvar groqChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string().nullish(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n});\nvar groqChatChunkSchema = z3.union([\n z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n index: z3.number(),\n id: z3.string().nullish(),\n type: z3.literal(\"function\").optional(),\n function: z3.object({\n name: z3.string().nullish(),\n arguments: z3.string().nullish()\n })\n })\n ).nullish()\n }).nullish(),\n finish_reason: z3.string().nullable().optional(),\n index: z3.number()\n })\n ),\n x_groq: z3.object({\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n }).nullish()\n }),\n groqErrorDataSchema\n]);\n\n// src/groq-transcription-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertBase64ToUint8Array,\n createJsonResponseHandler as createJsonResponseHandler2,\n mediaTypeToExtension,\n parseProviderOptions as parseProviderOptions2,\n postFormDataToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/groq-transcription-options.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar groqTranscriptionModelOptions = lazySchema(\n () => zodSchema(\n z4.object({\n language: z4.string().nullish(),\n prompt: z4.string().nullish(),\n responseFormat: z4.string().nullish(),\n temperature: z4.number().min(0).max(1).nullish(),\n timestampGranularities: z4.array(z4.string()).nullish()\n })\n )\n);\n\n// src/groq-transcription-model.ts\nvar GroqTranscriptionModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n audio,\n mediaType,\n providerOptions\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const groqOptions = await parseProviderOptions2({\n provider: \"groq\",\n providerOptions,\n schema: groqTranscriptionModelOptions\n });\n const formData = new FormData();\n const blob = audio instanceof Uint8Array ? new Blob([audio]) : new Blob([convertBase64ToUint8Array(audio)]);\n formData.append(\"model\", this.modelId);\n const fileExtension = mediaTypeToExtension(mediaType);\n formData.append(\n \"file\",\n new File([blob], \"audio\", { type: mediaType }),\n `audio.${fileExtension}`\n );\n if (groqOptions) {\n const transcriptionModelOptions = {\n language: (_a = groqOptions.language) != null ? _a : void 0,\n prompt: (_b = groqOptions.prompt) != null ? _b : void 0,\n response_format: (_c = groqOptions.responseFormat) != null ? _c : void 0,\n temperature: (_d = groqOptions.temperature) != null ? _d : void 0,\n timestamp_granularities: (_e = groqOptions.timestampGranularities) != null ? _e : void 0\n };\n for (const key in transcriptionModelOptions) {\n const value = transcriptionModelOptions[key];\n if (value !== void 0) {\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${key}[]`, String(item));\n }\n } else {\n formData.append(key, String(value));\n }\n }\n }\n }\n return {\n formData,\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const { formData, warnings } = await this.getArgs(options);\n const {\n value: response,\n responseHeaders,\n rawValue: rawResponse\n } = await postFormDataToApi({\n url: this.config.url({\n path: \"/audio/transcriptions\",\n modelId: this.modelId\n }),\n headers: combineHeaders2(this.config.headers(), options.headers),\n formData,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n groqTranscriptionResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n return {\n text: response.text,\n segments: (_e = (_d = response.segments) == null ? void 0 : _d.map((segment) => ({\n text: segment.text,\n startSecond: segment.start,\n endSecond: segment.end\n }))) != null ? _e : [],\n language: (_f = response.language) != null ? _f : void 0,\n durationInSeconds: (_g = response.duration) != null ? _g : void 0,\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders,\n body: rawResponse\n }\n };\n }\n};\nvar groqTranscriptionResponseSchema = z5.object({\n text: z5.string(),\n x_groq: z5.object({\n id: z5.string()\n }),\n // additional properties are returned when `response_format: 'verbose_json'` is\n task: z5.string().nullish(),\n language: z5.string().nullish(),\n duration: z5.number().nullish(),\n segments: z5.array(\n z5.object({\n id: z5.number(),\n seek: z5.number(),\n start: z5.number(),\n end: z5.number(),\n text: z5.string(),\n tokens: z5.array(z5.number()),\n temperature: z5.number(),\n avg_logprob: z5.number(),\n compression_ratio: z5.number(),\n no_speech_prob: z5.number()\n })\n ).nullish()\n});\n\n// src/tool/browser-search.ts\nimport { createProviderToolFactory } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar browserSearch = createProviderToolFactory({\n id: \"groq.browser_search\",\n inputSchema: z6.object({})\n});\n\n// src/groq-tools.ts\nvar groqTools = {\n browserSearch\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.31\" : \"0.0.0-test\";\n\n// src/groq-provider.ts\nfunction createGroq(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.groq.com/openai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"GROQ_API_KEY\",\n description: \"Groq\"\n })}`,\n ...options.headers\n },\n `ai-sdk/groq/${VERSION}`\n );\n const createChatModel = (modelId) => new GroqChatLanguageModel(modelId, {\n provider: \"groq.chat\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createLanguageModel = (modelId) => {\n if (new.target) {\n throw new Error(\n \"The Groq model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n const createTranscriptionModel = (modelId) => {\n return new GroqTranscriptionModel(modelId, {\n provider: \"groq.transcription\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n };\n const provider = function(modelId) {\n return createLanguageModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n provider.transcription = createTranscriptionModel;\n provider.transcriptionModel = createTranscriptionModel;\n provider.tools = groqTools;\n return provider;\n}\nvar groq = createGroq();\nexport {\n VERSION,\n browserSearch,\n createGroq,\n groq\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qXA0BA,cAAS,MAAgB,MAAC,OAAO,CAC/B,IAAI,EAAI,EAAI,EAAI,EAChB,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAAM,GAAgB,EAAK,EAAM,gBAAkB,KAAO,EAAK,EACzD,GAAoB,EAAK,EAAM,oBAAsB,KAAO,EAAK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ACJ,IAAM,GAAW,EAAK,GAAqB,EAAQ,OAAO,IAAM,KAAO,EAAK,iCACtE,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,eACzB,YAAa,MACf,CAAC,OACE,EAAQ,OACb,EACA,eAAe,IACjB,EACM,EAAkB,CAAC,IAAY,IAAI,GAAsB,EAAS,CACtE,SAAU,YACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAsB,CAAC,IAAY,CACvC,GAAI,WACF,MAAU,MACR,gEACF,EAEF,OAAO,EAAgB,CAAO,GAE1B,EAA2B,CAAC,IAAY,CAC5C,OAAO,IAAI,GAAuB,EAAS,CACzC,SAAU,qBACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,GAEG,EAAW,QAAQ,CAAC,EAAS,CACjC,OAAO,EAAoB,CAAO,GAepC,OAbA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAEjE,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,MAAQ,GACV,EAET,IAAI,GAAO,GAAW",
"debugId": "200D83109CDA274C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0C1FEBBCEC68C97C64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+perplexity@3.0.26+d6123d32214422cb/node_modules/@ai-sdk/perplexity/dist/index.mjs"],
"sourcesContent": [
"// src/perplexity-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/perplexity-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/convert-perplexity-usage.ts\nfunction convertPerplexityUsage(usage) {\n var _a, _b, _c;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_c = usage.reasoning_tokens) != null ? _c : 0;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-perplexity-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertUint8ArrayToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToPerplexityMessages(prompt) {\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\":\n case \"assistant\": {\n const hasMultipartContent = content.some(\n (part) => part.type === \"file\" && part.mediaType.startsWith(\"image/\") || part.type === \"file\" && part.mediaType === \"application/pdf\"\n );\n const messageContent = content.map((part, index) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return {\n type: \"text\",\n text: part.text\n };\n }\n case \"file\": {\n if (part.mediaType === \"application/pdf\") {\n return part.data instanceof URL ? {\n type: \"file_url\",\n file_url: {\n url: part.data.toString()\n },\n file_name: part.filename\n } : {\n type: \"file_url\",\n file_url: {\n url: typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)\n },\n file_name: part.filename || `document-${index}.pdf`\n };\n } else if (part.mediaType.startsWith(\"image/\")) {\n return part.data instanceof URL ? {\n type: \"image_url\",\n image_url: {\n url: part.data.toString()\n }\n } : {\n type: \"image_url\",\n image_url: {\n url: `data:${(_a = part.mediaType) != null ? _a : \"image/jpeg\"};base64,${typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)}`\n }\n };\n }\n }\n }\n }).filter(Boolean);\n messages.push({\n role,\n content: hasMultipartContent ? messageContent : messageContent.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\")\n });\n break;\n }\n case \"tool\": {\n throw new UnsupportedFunctionalityError({\n functionality: \"Tool messages\"\n });\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/map-perplexity-finish-reason.ts\nfunction mapPerplexityFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n case \"length\":\n return finishReason;\n default:\n return \"other\";\n }\n}\n\n// src/perplexity-language-model.ts\nvar PerplexityLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.provider = \"perplexity\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions\n }) {\n var _a;\n const warnings = [];\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n if (seed != null) {\n warnings.push({ type: \"unsupported\", feature: \"seed\" });\n }\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n max_tokens: maxOutputTokens,\n presence_penalty: presencePenalty,\n temperature,\n top_k: topK,\n top_p: topP,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? {\n type: \"json_schema\",\n json_schema: { schema: responseFormat.schema }\n } : void 0,\n // provider extensions\n ...(_a = providerOptions == null ? void 0 : providerOptions.perplexity) != null ? _a : {},\n // messages:\n messages: convertToPerplexityMessages(prompt)\n },\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;\n const { args: body, warnings } = this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createJsonResponseHandler(\n perplexityResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text.length > 0) {\n content.push({ type: \"text\", text });\n }\n if (response.citations != null) {\n for (const url of response.citations) {\n content.push({\n type: \"source\",\n sourceType: \"url\",\n id: this.config.generateId(),\n url\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertPerplexityUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n providerMetadata: {\n perplexity: {\n images: (_c = (_b = response.images) == null ? void 0 : _b.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }))) != null ? _c : null,\n usage: {\n citationTokens: (_e = (_d = response.usage) == null ? void 0 : _d.citation_tokens) != null ? _e : null,\n numSearchQueries: (_g = (_f = response.usage) == null ? void 0 : _f.num_search_queries) != null ? _g : null\n },\n cost: ((_h = response.usage) == null ? void 0 : _h.cost) ? {\n inputTokensCost: (_i = response.usage.cost.input_tokens_cost) != null ? _i : null,\n outputTokensCost: (_j = response.usage.cost.output_tokens_cost) != null ? _j : null,\n requestCost: (_k = response.usage.cost.request_cost) != null ? _k : null,\n totalCost: (_l = response.usage.cost.total_cost) != null ? _l : null\n } : null\n }\n }\n };\n }\n async doStream(options) {\n const { args, warnings } = this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createEventSourceResponseHandler(\n perplexityChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n const providerMetadata = {\n perplexity: {\n usage: {\n citationTokens: null,\n numSearchQueries: null\n },\n cost: null,\n images: null\n }\n };\n let isFirstChunk = true;\n let isActive = false;\n const self = this;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n (_a = value.citations) == null ? void 0 : _a.forEach((url) => {\n controller.enqueue({\n type: \"source\",\n sourceType: \"url\",\n id: self.config.generateId(),\n url\n });\n });\n isFirstChunk = false;\n }\n if (value.usage != null) {\n usage = value.usage;\n providerMetadata.perplexity.usage = {\n citationTokens: (_b = value.usage.citation_tokens) != null ? _b : null,\n numSearchQueries: (_c = value.usage.num_search_queries) != null ? _c : null\n };\n providerMetadata.perplexity.cost = value.usage.cost ? {\n inputTokensCost: (_d = value.usage.cost.input_tokens_cost) != null ? _d : null,\n outputTokensCost: (_e = value.usage.cost.output_tokens_cost) != null ? _e : null,\n requestCost: (_f = value.usage.cost.request_cost) != null ? _f : null,\n totalCost: (_g = value.usage.cost.total_cost) != null ? _g : null\n } : null;\n }\n if (value.images != null) {\n providerMetadata.perplexity.images = value.images.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }));\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n const textContent = delta.content;\n if (textContent != null) {\n if (!isActive) {\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n isActive = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n },\n flush(controller) {\n if (isActive) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertPerplexityUsage(usage),\n providerMetadata\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id,\n modelId: model,\n timestamp: new Date(created * 1e3)\n };\n}\nvar perplexityCostSchema = z.object({\n input_tokens_cost: z.number().nullish(),\n output_tokens_cost: z.number().nullish(),\n request_cost: z.number().nullish(),\n total_cost: z.number().nullish()\n});\nvar perplexityUsageSchema = z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number().nullish(),\n citation_tokens: z.number().nullish(),\n num_search_queries: z.number().nullish(),\n reasoning_tokens: z.number().nullish(),\n cost: perplexityCostSchema.nullish()\n});\nvar perplexityImageSchema = z.object({\n image_url: z.string(),\n origin_url: z.string(),\n height: z.number(),\n width: z.number()\n});\nvar perplexityResponseSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n message: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityChunkSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n delta: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityErrorSchema = z.object({\n error: z.object({\n code: z.number(),\n message: z.string().nullish(),\n type: z.string().nullish()\n })\n});\nvar errorToMessage = (data) => {\n var _a, _b;\n return (_b = (_a = data.error.message) != null ? _a : data.error.type) != null ? _b : \"unknown error\";\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.26\" : \"0.0.0-test\";\n\n// src/perplexity-provider.ts\nfunction createPerplexity(options = {}) {\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"PERPLEXITY_API_KEY\",\n description: \"Perplexity\"\n })}`,\n ...options.headers\n },\n `ai-sdk/perplexity/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n var _a;\n return new PerplexityLanguageModel(modelId, {\n baseURL: withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.perplexity.ai\"\n ),\n headers: getHeaders,\n generateId,\n fetch: options.fetch\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar perplexity = createPerplexity();\nexport {\n VERSION,\n createPerplexity,\n perplexity\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";sSAsBA,cAAS,MAAsB,MAAC,OAAO,CACrC,IAAI,EAAI,EAAI,EACZ,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAAM,GAAgB,EAAK,EAAM,gBAAkB,KAAO,EAAK,EACzD,GAAoB,EAAK,EAAM,oBAAsB,KAAO,EAAK,EACjE,GAAmB,EAAK,EAAM,mBAAqB,KAAO,EAAK,EACrE,MAAO,CACL,YAAa,CACX,MAAO,EACP,QAAS,EACT,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAO,EACP,KAAM,EAAmB,EACzB,UAAW,CACb,EACA,IAAK,CACP,EAQF,SAAS,CAA2B,CAAC,EAAQ,CAC3C,IAAM,EAAW,CAAC,EAClB,QAAa,OAAM,aAAa,EAC9B,OAAQ,OACD,SAAU,CACb,EAAS,KAAK,CAAE,KAAM,SAAU,SAAQ,CAAC,EACzC,KACF,KACK,WACA,YAAa,CAChB,IAAM,EAAsB,EAAQ,KAClC,CAAC,IAAS,EAAK,OAAS,QAAU,EAAK,UAAU,WAAW,QAAQ,GAAK,EAAK,OAAS,QAAU,EAAK,YAAc,iBACtH,EACM,EAAiB,EAAQ,IAAI,CAAC,EAAM,IAAU,CAClD,IAAI,EACJ,OAAQ,EAAK,UACN,OACH,MAAO,CACL,KAAM,OACN,KAAM,EAAK,IACb,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,OAAO,CACnC,MAAO,EAAE,OAAO,CACd,KAAM,EAAE,OAAO,EACf,QAAS,EAAE,OAAO,EAAE,QAAQ,EAC5B,KAAM,EAAE,OAAO,EAAE,QAAQ,CAC3B,CAAC,CACH,CAAC,EACG,EAAiB,CAAC,IAAS,CAC7B,IAAI,EAAI,EACR,OAAQ,GAAM,EAAK,EAAK,MAAM,UAAY,KAAO,EAAK,EAAK,MAAM,OAAS,KAAO,EAAK,iBAIpF,EAAiB,SAGrB,SAAS,CAAgB,CAAC,EAAU,CAAC,EAAG,CACtC,IAAM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,qBACzB,YAAa,YACf,CAAC,OACE,EAAQ,OACb,EACA,qBAAqB,GACvB,EACM,EAAsB,CAAC,IAAY,CACvC,IAAI,EACJ,OAAO,IAAI,EAAwB,EAAS,CAC1C,QAAS,GACN,EAAK,EAAQ,UAAY,KAAO,EAAK,2BACxC,EACA,QAAS,EACT,aACA,MAAO,EAAQ,KACjB,CAAC,GAEG,EAAW,CAAC,IAAY,EAAoB,CAAO,EAUzD,OATA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAa,EAAiB",
"debugId": "2CF6F40F5AB09D1264756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/ai-gateway-provider@3.1.2+a6631614dda8d488/node_modules/ai-gateway-provider/dist/providers/unified.mjs"],
"sourcesContent": [
"// src/providers/unified.ts\nimport { createOpenAICompatible } from \"@ai-sdk/openai-compatible\";\nvar createUnified = (arg) => {\n return createOpenAICompatible({\n baseURL: \"https://gateway.ai.cloudflare.com/v1/compat\",\n // intercepted and replaced with actual base URL later\n name: \"Unified\",\n ...arg || {}\n });\n};\nvar unified = createUnified();\nexport {\n createUnified,\n unified\n};\n//# sourceMappingURL=unified.mjs.map"
],
"mappings": ";8NAEA,SAAI,OAAgB,MAAC,SAAQ,MAC3B,OAAO,EAAuB,CAC5B,QAAS,8CAET,KAAM,aACH,GAAO,CAAC,CACb,CAAC,GAEC,EAAU,EAAc",
"debugId": "810C145B03C79C2464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.45/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.45/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init, callerClientConfig);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isLoginProfile, resolveLoginCredentials } from \"./resolveLoginCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options, callerClientConfig);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options, callerClientConfig);\n }\n if (isLoginProfile(data)) {\n return resolveLoginCredentials(profileName, options, callerClientConfig);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName } from \"@smithy/core/config\";\nimport { resolveCredentialSource } from \"./resolveCredentialSource\";\nexport const isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nexport const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import(\"@aws-sdk/nested-clients/sts\");\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...callerClientConfig,\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n const { fromContainerMetadata } = await import(\"@smithy/credential-provider-imds\");\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import(\"@aws-sdk/credential-provider-env\");\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromLoginCredentials } from \"@aws-sdk/credential-provider-login\";\nexport const isLoginProfile = (data) => {\n return Boolean(data && data.login_session);\n};\nexport const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {\n const credentials = await fromLoginCredentials({\n ...options,\n profile: profileName,\n })({ callerClientConfig });\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_LOGIN\", \"AC\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { LoginCredentialsFetcher } from \"./LoginCredentialsFetcher\";\nexport const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {\n init?.logger?.debug?.(\"@aws-sdk/credential-providers - fromLoginCredentials\");\n const profiles = await parseKnownFiles(init || {});\n const profileName = getProfileName({\n profile: init?.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile?.login_session) {\n throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {\n tryNextLink: true,\n logger: init?.logger,\n });\n }\n const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);\n const credentials = await fetcher.loadCredentials();\n return setCredentialFeature(credentials, \"CREDENTIALS_LOGIN\", \"AD\");\n};\n",
"import { CredentialsProviderError, readFile } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { createHash, createPrivateKey, createPublicKey, sign } from \"node:crypto\";\nimport { promises as fs } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nexport class LoginCredentialsFetcher {\n profileData;\n init;\n callerClientConfig;\n static REFRESH_THRESHOLD = 5 * 60 * 1000;\n constructor(profileData, init, callerClientConfig) {\n this.profileData = profileData;\n this.init = init;\n this.callerClientConfig = callerClientConfig;\n }\n async loadCredentials() {\n const token = await this.loadToken();\n if (!token) {\n throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });\n }\n const accessToken = token.accessToken;\n const now = Date.now();\n const expiryTime = new Date(accessToken.expiresAt).getTime();\n const timeUntilExpiry = expiryTime - now;\n if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {\n return this.refresh(token);\n }\n return {\n accessKeyId: accessToken.accessKeyId,\n secretAccessKey: accessToken.secretAccessKey,\n sessionToken: accessToken.sessionToken,\n accountId: accessToken.accountId,\n expiration: new Date(accessToken.expiresAt),\n };\n }\n get logger() {\n return this.init?.logger;\n }\n get loginSession() {\n return this.profileData.login_session;\n }\n async refresh(token) {\n const { SigninClient, CreateOAuth2TokenCommand } = await import(\"@aws-sdk/nested-clients/signin\");\n const { logger, userAgentAppId } = this.callerClientConfig ?? {};\n const isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n };\n const requestHandler = isH2(this.callerClientConfig?.requestHandler)\n ? undefined\n : this.callerClientConfig?.requestHandler;\n const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;\n const client = new SigninClient({\n credentials: {\n accessKeyId: \"\",\n secretAccessKey: \"\",\n },\n region,\n requestHandler,\n logger,\n userAgentAppId,\n ...this.init?.clientConfig,\n });\n this.createDPoPInterceptor(client.middlewareStack);\n const commandInput = {\n tokenInput: {\n clientId: token.clientId,\n refreshToken: token.refreshToken,\n grantType: \"refresh_token\",\n },\n };\n try {\n const response = await client.send(new CreateOAuth2TokenCommand(commandInput));\n const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};\n const { refreshToken, expiresIn } = response.tokenOutput ?? {};\n if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {\n throw new CredentialsProviderError(\"Token refresh response missing required fields\", {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n const expiresInMs = (expiresIn ?? 900) * 1000;\n const expiration = new Date(Date.now() + expiresInMs);\n const updatedToken = {\n ...token,\n accessToken: {\n ...token.accessToken,\n accessKeyId: accessKeyId,\n secretAccessKey: secretAccessKey,\n sessionToken: sessionToken,\n expiresAt: expiration.toISOString(),\n },\n refreshToken: refreshToken,\n };\n await this.saveToken(updatedToken);\n const newAccessToken = updatedToken.accessToken;\n return {\n accessKeyId: newAccessToken.accessKeyId,\n secretAccessKey: newAccessToken.secretAccessKey,\n sessionToken: newAccessToken.sessionToken,\n accountId: newAccessToken.accountId,\n expiration,\n };\n }\n catch (error) {\n if (error.name === \"AccessDeniedException\") {\n const errorType = error.error;\n let message;\n switch (errorType) {\n case \"TOKEN_EXPIRED\":\n message = \"Your session has expired. Please reauthenticate.\";\n break;\n case \"USER_CREDENTIALS_CHANGED\":\n message =\n \"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.\";\n break;\n case \"INSUFFICIENT_PERMISSIONS\":\n message =\n \"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.\";\n break;\n default:\n message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \\`aws login\\``;\n }\n throw new CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });\n }\n throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });\n }\n }\n async loadToken() {\n const tokenFilePath = this.getTokenFilePath();\n try {\n let tokenData;\n try {\n tokenData = await readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });\n }\n catch {\n tokenData = await fs.readFile(tokenFilePath, \"utf8\");\n }\n const token = JSON.parse(tokenData);\n const missingFields = [\"accessToken\", \"clientId\", \"refreshToken\", \"dpopKey\"].filter((k) => !token[k]);\n if (!token.accessToken?.accountId) {\n missingFields.push(\"accountId\");\n }\n if (missingFields.length > 0) {\n throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(\", \")}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n return token;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n }\n async saveToken(token) {\n const tokenFilePath = this.getTokenFilePath();\n const directory = dirname(tokenFilePath);\n try {\n await fs.mkdir(directory, { recursive: true });\n }\n catch (error) {\n }\n await fs.writeFile(tokenFilePath, JSON.stringify(token, null, 2), \"utf8\");\n }\n getTokenFilePath() {\n const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join(homedir(), \".aws\", \"login\", \"cache\");\n const loginSessionBytes = Buffer.from(this.loginSession, \"utf8\");\n const loginSessionSha256 = createHash(\"sha256\").update(loginSessionBytes).digest(\"hex\");\n return join(directory, `${loginSessionSha256}.json`);\n }\n derToRawSignature(derSignature) {\n let offset = 2;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const rLength = derSignature[offset++];\n let r = derSignature.subarray(offset, offset + rLength);\n offset += rLength;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const sLength = derSignature[offset++];\n let s = derSignature.subarray(offset, offset + sLength);\n r = r[0] === 0x00 ? r.subarray(1) : r;\n s = s[0] === 0x00 ? s.subarray(1) : s;\n const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);\n const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);\n return Buffer.concat([rPadded, sPadded]);\n }\n createDPoPInterceptor(middlewareStack) {\n middlewareStack.add((next) => async (args) => {\n if (HttpRequest.isInstance(args.request)) {\n const request = args.request;\n const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : \"\"}${request.path}`;\n const dpop = await this.generateDpop(request.method, actualEndpoint);\n request.headers = {\n ...request.headers,\n DPoP: dpop,\n };\n }\n return next(args);\n }, {\n step: \"finalizeRequest\",\n name: \"dpopInterceptor\",\n override: true,\n });\n }\n async generateDpop(method = \"POST\", endpoint) {\n const token = await this.loadToken();\n try {\n const privateKey = createPrivateKey({\n key: token.dpopKey,\n format: \"pem\",\n type: \"sec1\",\n });\n const publicKey = createPublicKey(privateKey);\n const publicDer = publicKey.export({ format: \"der\", type: \"spki\" });\n let pointStart = -1;\n for (let i = 0; i < publicDer.length; i++) {\n if (publicDer[i] === 0x04) {\n pointStart = i;\n break;\n }\n }\n const x = publicDer.slice(pointStart + 1, pointStart + 33);\n const y = publicDer.slice(pointStart + 33, pointStart + 65);\n const header = {\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: {\n kty: \"EC\",\n crv: \"P-256\",\n x: x.toString(\"base64url\"),\n y: y.toString(\"base64url\"),\n },\n };\n const payload = {\n jti: crypto.randomUUID(),\n htm: method,\n htu: endpoint,\n iat: Math.floor(Date.now() / 1000),\n };\n const headerB64 = Buffer.from(JSON.stringify(header)).toString(\"base64url\");\n const payloadB64 = Buffer.from(JSON.stringify(payload)).toString(\"base64url\");\n const message = `${headerB64}.${payloadB64}`;\n const asn1Signature = sign(\"sha256\", Buffer.from(message), privateKey);\n const rawSignature = this.derToRawSignature(asn1Signature);\n const signatureB64 = rawSignature.toString(\"base64url\");\n return `${message}.${signatureB64}`;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });\n }\n }\n}\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nexport const resolveProcessCredentials = async (options, profile) => import(\"@aws-sdk/credential-provider-process\").then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })({\n callerClientConfig,\n }).then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nexport const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nexport const resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import(\"@aws-sdk/credential-provider-web-identity\").then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})({\n callerClientConfig,\n}).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n"
],
"mappings": ";0MAAA,oBCAA,qBCAA,oBACA,WCDA,eACA,WACa,EAA0B,CAAC,EAAkB,EAAa,IAAW,CAC9E,IAAM,EAAqB,CACvB,aAAc,MAAO,IAAY,CAC7B,IAAQ,YAAa,KAAa,2CAC1B,yBAA0B,KAAa,0CAE/C,OADA,GAAQ,MAAM,sEAAsE,E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AI,GAA6B,EAAoB,EAAM,CAAE,QAAS,EAAa,OAAQ,EAAQ,MAAO,CAAC,EACvG,OAAO,EAA6B,EAAa,EAAU,EAAS,EAAoB,EAAiB,CAAkB,EAE/H,GAAI,EAAqB,CAAI,EACzB,OAAO,EAAyB,EAAM,CAAO,EAEjD,GAAI,GAAqB,CAAI,EACzB,OAAO,GAA8B,EAAM,EAAS,CAAkB,EAE1E,GAAI,EAAiB,CAAI,EACrB,OAAO,EAA0B,EAAS,CAAW,EAEzD,GAAI,EAAa,CAAI,EACjB,OAAO,MAAM,EAAsB,EAAa,EAAM,EAAS,CAAkB,EAErF,GAAI,EAAe,CAAI,EACnB,OAAO,EAAwB,EAAa,EAAS,CAAkB,EAE3E,MAAM,IAAI,4BAAyB,iDAAiD,2CAAsD,CAAE,OAAQ,EAAQ,MAAO,CAAC,GD5BjK,IAAM,GAAU,CAAC,EAAO,CAAC,IAAM,OAAS,sBAAuB,CAAC,IAAM,CACzE,EAAK,QAAQ,MAAM,4CAA4C,EAC/D,IAAM,EAAW,MAAM,kBAAgB,CAAI,EAC3C,OAAO,EAAmB,iBAAe,CACrC,QAAS,EAAK,SAAW,GAAoB,OACjD,CAAC,EAAG,EAAU,EAAM,CAAkB",
"debugId": "264E2DC02799110E64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "22D6A9BB982BA24C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"cognito-identity\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetCredentialsForIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n case \"GetId\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"cognito-identity\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { [m]: \"Region\" }, k = {}, l = [j];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [g, [{ fn: f, argv: [i, \"name\"] }, \"aws\"]],\n [g, [j, \"us-east-1\"]],\n [g, [j, \"us-east-2\"]],\n [g, [j, \"us-west-1\"]],\n [g, [j, \"us-west-2\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://cognito-identity-fips.us-east-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-east-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://cognito-identity.{Region}.amazonaws.com\", k],\n [\"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 17,\n 3,\n 1,\n 4,\n r + 16,\n 2,\n 5,\n r + 16,\n 3,\n 9,\n 6,\n 5,\n 7,\n r + 15,\n 6,\n 8,\n r + 14,\n 7,\n r + 12,\n r + 13,\n 4,\n 11,\n 10,\n 5,\n r + 9,\n r + 11,\n 5,\n 12,\n r + 10,\n 6,\n 13,\n r + 9,\n 8,\n r + 4,\n 14,\n 9,\n r + 5,\n 15,\n 10,\n r + 6,\n 16,\n 11,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 18,\n 5,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass CognitoIdentityServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);\n }\n}\n\nclass ExternalServiceException extends CognitoIdentityServiceException {\n name = \"ExternalServiceException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ExternalServiceException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExternalServiceException.prototype);\n }\n}\nclass InternalErrorException extends CognitoIdentityServiceException {\n name = \"InternalErrorException\";\n $fault = \"server\";\n constructor(opts) {\n super({\n name: \"InternalErrorException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalErrorException.prototype);\n }\n}\nclass InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {\n name = \"InvalidIdentityPoolConfigurationException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidIdentityPoolConfigurationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);\n }\n}\nclass InvalidParameterException extends CognitoIdentityServiceException {\n name = \"InvalidParameterException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidParameterException.prototype);\n }\n}\nclass NotAuthorizedException extends CognitoIdentityServiceException {\n name = \"NotAuthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotAuthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotAuthorizedException.prototype);\n }\n}\nclass ResourceConflictException extends CognitoIdentityServiceException {\n name = \"ResourceConflictException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceConflictException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceConflictException.prototype);\n }\n}\nclass ResourceNotFoundException extends CognitoIdentityServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends CognitoIdentityServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass LimitExceededException extends CognitoIdentityServiceException {\n name = \"LimitExceededException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LimitExceededException.prototype);\n }\n}\n\nconst _AI = \"AccountId\";\nconst _AKI = \"AccessKeyId\";\nconst _C = \"Credentials\";\nconst _CRA = \"CustomRoleArn\";\nconst _E = \"Expiration\";\nconst _ESE = \"ExternalServiceException\";\nconst _GCFI = \"GetCredentialsForIdentity\";\nconst _GCFII = \"GetCredentialsForIdentityInput\";\nconst _GCFIR = \"GetCredentialsForIdentityResponse\";\nconst _GI = \"GetId\";\nconst _GII = \"GetIdInput\";\nconst _GIR = \"GetIdResponse\";\nconst _IEE = \"InternalErrorException\";\nconst _II = \"IdentityId\";\nconst _IIPCE = \"InvalidIdentityPoolConfigurationException\";\nconst _IPE = \"InvalidParameterException\";\nconst _IPI = \"IdentityPoolId\";\nconst _IPT = \"IdentityProviderToken\";\nconst _L = \"Logins\";\nconst _LEE = \"LimitExceededException\";\nconst _LM = \"LoginsMap\";\nconst _NAE = \"NotAuthorizedException\";\nconst _RCE = \"ResourceConflictException\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SK = \"SecretKey\";\nconst _SKS = \"SecretKeyString\";\nconst _ST = \"SessionToken\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _hE = \"httpError\";\nconst _m = \"message\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity\";\nconst _se = \"server\";\nconst n0 = \"com.amazonaws.cognitoidentity\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar CognitoIdentityServiceException$ = [-3, _s, \"CognitoIdentityServiceException\", 0, [], []];\n_s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar ExternalServiceException$ = [-3, n0, _ESE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(ExternalServiceException$, ExternalServiceException);\nvar InternalErrorException$ = [-3, n0, _IEE, { [_e]: _se }, [_m], [0]];\nn0_registry.registerError(InternalErrorException$, InternalErrorException);\nvar InvalidIdentityPoolConfigurationException$ = [\n -3,\n n0,\n _IIPCE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0],\n];\nn0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);\nvar InvalidParameterException$ = [-3, n0, _IPE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(InvalidParameterException$, InvalidParameterException);\nvar LimitExceededException$ = [-3, n0, _LEE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(LimitExceededException$, LimitExceededException);\nvar NotAuthorizedException$ = [-3, n0, _NAE, { [_e]: _c, [_hE]: 403 }, [_m], [0]];\nn0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);\nvar ResourceConflictException$ = [-3, n0, _RCE, { [_e]: _c, [_hE]: 409 }, [_m], [0]];\nn0_registry.registerError(ResourceConflictException$, ResourceConflictException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar IdentityProviderToken = [0, n0, _IPT, 8, 0];\nvar SecretKeyString = [0, n0, _SKS, 8, 0];\nvar Credentials$ = [\n 3,\n n0,\n _C,\n 0,\n [_AKI, _SK, _ST, _E],\n [0, [() => SecretKeyString, 0], 0, 4],\n];\nvar GetCredentialsForIdentityInput$ = [\n 3,\n n0,\n _GCFII,\n 0,\n [_II, _L, _CRA],\n [0, [() => LoginsMap, 0], 0],\n 1,\n];\nvar GetCredentialsForIdentityResponse$ = [\n 3,\n n0,\n _GCFIR,\n 0,\n [_II, _C],\n [0, [() => Credentials$, 0]],\n];\nvar GetIdInput$ = [3, n0, _GII, 0, [_IPI, _AI, _L], [0, 0, [() => LoginsMap, 0]], 1];\nvar GetIdResponse$ = [3, n0, _GIR, 0, [_II], [0]];\nvar LoginsMap = [2, n0, _LM, 0, [0, 0], [() => IdentityProviderToken, 0]];\nvar GetCredentialsForIdentity$ = [\n 9,\n n0,\n _GCFI,\n 0,\n () => GetCredentialsForIdentityInput$,\n () => GetCredentialsForIdentityResponse$,\n];\nvar GetId$ = [9, n0, _GI, 0, () => GetIdInput$, () => GetIdResponse$];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2014-06-30\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCognitoIdentityHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsJson1_1Protocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.cognitoidentity\",\n errorTypeRegistries,\n xmlNamespace: \"http://cognito-identity.amazonaws.com/doc/2014-06-30/\",\n version: \"2014-06-30\",\n serviceTarget: \"AWSCognitoIdentityService\",\n },\n serviceId: config?.serviceId ?? \"Cognito Identity\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass CognitoIdentityClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass GetCredentialsForIdentityCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSCognitoIdentityService\", \"GetCredentialsForIdentity\", {})\n .n(\"CognitoIdentityClient\", \"GetCredentialsForIdentityCommand\")\n .sc(GetCredentialsForIdentity$)\n .build() {\n}\n\nclass GetIdCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSCognitoIdentityService\", \"GetId\", {})\n .n(\"CognitoIdentityClient\", \"GetIdCommand\")\n .sc(GetId$)\n .build() {\n}\n\nconst commands = {\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n};\nclass CognitoIdentity extends CognitoIdentityClient {\n}\nclient.createAggregatedClient(commands, CognitoIdentity);\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.CognitoIdentity = CognitoIdentity;\nexports.CognitoIdentityClient = CognitoIdentityClient;\nexports.CognitoIdentityServiceException = CognitoIdentityServiceException;\nexports.CognitoIdentityServiceException$ = CognitoIdentityServiceException$;\nexports.Credentials$ = Credentials$;\nexports.ExternalServiceException = ExternalServiceException;\nexports.ExternalServiceException$ = ExternalServiceException$;\nexports.GetCredentialsForIdentity$ = GetCredentialsForIdentity$;\nexports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand;\nexports.GetCredentialsForIdentityInput$ = GetCredentialsForIdentityInput$;\nexports.GetCredentialsForIdentityResponse$ = GetCredentialsForIdentityResponse$;\nexports.GetId$ = GetId$;\nexports.GetIdCommand = GetIdCommand;\nexports.GetIdInput$ = GetIdInput$;\nexports.GetIdResponse$ = GetIdResponse$;\nexports.InternalErrorException = InternalErrorException;\nexports.InternalErrorException$ = InternalErrorException$;\nexports.InvalidIdentityPoolConfigurationException = InvalidIdentityPoolConfigurationException;\nexports.InvalidIdentityPoolConfigurationException$ = InvalidIdentityPoolConfigurationException$;\nexports.InvalidParameterException = InvalidParameterException;\nexports.InvalidParameterException$ = InvalidParameterException$;\nexports.LimitExceededException = LimitExceededException;\nexports.LimitExceededException$ = LimitExceededException$;\nexports.NotAuthorizedException = NotAuthorizedException;\nexports.NotAuthorizedException$ = NotAuthorizedException$;\nexports.ResourceConflictException = ResourceConflictException;\nexports.ResourceConflictException$ = ResourceConflictException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,Y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AAC,CAAC,EAC1F,EACI,EAAE,4BAA6B,QAAS,CAAC,CAAC,EAC1C,EAAE,wBAAyB,cAAc,EACzC,GAAG,EAAM,EACT,MAAM,CAAE,CACb,CAEA,IAAM,GAAW,CACb,mCACA,cACJ,EACA,MAAM,WAAwB,CAAsB,CACpD,CACA,EAAO,uBAAuB,GAAU,EAAe,EAEvD,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EAEnB,IAAQ,GAAwB,EAOhC,IAAQ,GAAmC,EAI3C,IAAQ,GAAe",
"debugId": "87EFD1901F028F2664756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProcessCredentials } from \"./resolveProcessCredentials\";\nexport const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await parseKnownFiles(init);\n return resolveProcessCredentials(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init.logger);\n};\n",
"import { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { getValidatedProcessCredentials } from \"./getValidatedProcessCredentials\";\nexport const resolveProcessCredentials = async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n }\n catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n }\n catch (error) {\n throw new CredentialsProviderError(error.message, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger,\n });\n }\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n};\n"
],
"mappings": ";kJAAA,oBCAA,oBACA,eAAS,sBACT,oBAAS,aCFT,eACa,EAAiC,CAAC,EAAa,EAAM,IAAa,CAC3E,GAAI,EAAK,UAAY,EACjB,MAAM,MAAM,WAAW,gDAA0D,EAErF,GAAI,EAAK,cAAgB,QAAa,EAAK,kBAAoB,OAC3D,MAAM,MAAM,WAAW,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gB,CAAI,EAC3C,OAAO,EAA0B,iBAAe,CAC5C,QAAS,EAAK,SAAW,GAAoB,OACjD,CAAC,EAAG,EAAU,EAAK,MAAM",
"debugId": "A2FA7541869C1DE664756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+core@3.24.5/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js"],
"sourcesContent": [
"'use strict';\n\nvar crc32 = require('@aws-crypto/crc32');\nvar serde = require('@smithy/core/serde');\nvar node_stream = require('node:stream');\n\nclass Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(serde.toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n\nclass HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(serde.fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case 6:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case 7:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case 8:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case 9:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${serde.toHex(uuidBytes.subarray(0, 4))}-${serde.toHex(uuidBytes.subarray(4, 6))}-${serde.toHex(uuidBytes.subarray(6, 8))}-${serde.toHex(uuidBytes.subarray(8, 10))}-${serde.toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nfunction splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n\nclass EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new crc32.Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n\nclass MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n\nclass MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n\nclass SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n\nclass SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n\nfunction getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n\nfunction getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nfunction getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n\nlet EventStreamMarshaller$1 = class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n};\nconst eventStreamSerdeProvider$1 = (options) => new EventStreamMarshaller$1(options);\n\nclass EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new EventStreamMarshaller$1({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = typeof body[Symbol.asyncIterator] === \"function\" ? body : readableToIterable(body);\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n return node_stream.Readable.from(this.universalMarshaller.serialize(input, serializer));\n }\n}\nconst eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\nasync function* readableToIterable(readStream) {\n let streamEnded = false;\n let generationEnded = false;\n const records = new Array();\n readStream.on(\"error\", (err) => {\n if (!streamEnded) {\n streamEnded = true;\n }\n if (err) {\n throw err;\n }\n });\n readStream.on(\"data\", (data) => {\n records.push(data);\n });\n readStream.on(\"end\", () => {\n streamEnded = true;\n });\n while (!generationEnded) {\n const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));\n if (value) {\n yield value;\n }\n generationEnded = streamEnded && records.length === 0;\n }\n}\n\nconst readableStreamToIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nconst iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n\nconst resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n\nclass EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? serde.toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const key in firstEvent.value) {\n initialResponseContainer[key] = firstEvent.value[key];\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? serde.fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n\nexports.EventStreamCodec = EventStreamCodec;\nexports.EventStreamMarshaller = EventStreamMarshaller;\nexports.EventStreamSerde = EventStreamSerde;\nexports.HeaderMarshaller = HeaderMarshaller;\nexports.Int64 = Int64;\nexports.MessageDecoderStream = MessageDecoderStream;\nexports.MessageEncoderStream = MessageEncoderStream;\nexports.SmithyMessageDecoderStream = SmithyMessageDecoderStream;\nexports.SmithyMessageEncoderStream = SmithyMessageEncoderStream;\nexports.UniversalEventStreamMarshaller = EventStreamMarshaller$1;\nexports.eventStreamSerdeProvider = eventStreamSerdeProvider;\nexports.getChunkedStream = getChunkedStream;\nexports.getMessageUnmarshaller = getMessageUnmarshaller;\nexports.getUnmarshalledStream = getUnmarshalledStream;\nexports.iterableToReadableStream = iterableToReadableStream;\nexports.readableStreamToIterable = readableStreamToIterable;\nexports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig;\nexports.universalEventStreamSerdeProvider = eventStreamSerdeProvider$1;\n"
],
"mappings": ";0JAMA,WAAM,MAAM,CACR,MACA,WAAW,CAAC,EAAO,CAEf,GADA,KAAK,MAAQ,EACT,EAAM,aAAe,EACrB,MAAU,MAAM,uCAAuC,QAGxD,WAAU,CAAC,EAAQ,CACtB,GAAI,EAAS,qBAA6B,EAAS,qBAC/C,MAAU,MAAM,GAAG,sEAA2E,EAElG,IAAM,EAAQ,IAAI,WAAW,CAAC,EAC9B,QAAS,EAAI,EAAG,EAAY,KAAK,IAAI,KAAK,MAAM,CAAM,CAAC,EAAG,EAAI,IAAM,EAAY,EAAG,IAAK,GAAa,IACjG,EAAM,GAAK,EAEf,GAAI,EAAS,EACT,EAAO,CAAK,EAEhB,OAAO,IAAI,EAAM,CAAK,EAE1B,OAAO,EAAG,CACN,IAAM,EAAQ,KAAK,MAAM,MAAM,CAAC,EAC1B,EAAW,EAAM,GAAK,IAC5B,GAAI,EACA,EAAO,CAAK,EAEhB,OAAO,SAAS,EAAM,MAAM,CAAK,EAAG,EAAE,GAAK,EAAW,GAAK,GAE/D,QAAQ,E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,aAAa,EAAG,CACnB,cAAiB,KAAW,KAAK,QAAQ,cAAe,CACpD,IAAM,EAAe,MAAM,KAAK,QAAQ,aAAa,CAAO,EAC5D,GAAI,IAAiB,OACjB,SACJ,MAAM,GAGlB,EAEM,EAAN,MAAM,CAA2B,CAC7B,QACA,WAAW,CAAC,EAAS,CACjB,KAAK,QAAU,GAElB,OAAO,cAAc,EAAG,CACrB,OAAO,KAAK,cAAc,QAEvB,aAAa,EAAG,CACnB,cAAiB,KAAS,KAAK,QAAQ,YAEnC,MADmB,KAAK,QAAQ,WAAW,CAAK,EAI5D,EAgeQ,GAAmB,EACnB,GAAwB,EACxB,GAAmB,EACnB,GAAmB,EACnB,GAAQ,EACR,GAAuB,EACvB,GAAuB,EACvB,GAA6B,EAC7B,GAA6B,EAC7B,GAAiC,EACjC,GAA2B,GAC3B,GAAmB,EACnB,GAAyB,EACzB,GAAwB,GACxB,GAA2B,GAC3B,GAA2B,GAC3B,GAAgC,GAChC,GAAoC",
"debugId": "787EA5D775AB70ED64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/aws4fetch@1.0.20/node_modules/aws4fetch/dist/aws4fetch.esm.mjs"],
"sourcesContent": [
"/**\n * @license MIT <https://opensource.org/licenses/MIT>\n * @copyright Michael Hart 2024\n */\nconst encoder = new TextEncoder();\nconst HOST_SERVICES = {\n appstream2: 'appstream',\n cloudhsmv2: 'cloudhsm',\n email: 'ses',\n marketplace: 'aws-marketplace',\n mobile: 'AWSMobileHubService',\n pinpoint: 'mobiletargeting',\n queue: 'sqs',\n 'git-codecommit': 'codecommit',\n 'mturk-requester-sandbox': 'mturk-requester',\n 'personalize-runtime': 'personalize',\n};\nconst UNSIGNABLE_HEADERS = new Set([\n 'authorization',\n 'content-type',\n 'content-length',\n 'user-agent',\n 'presigned-expires',\n 'expect',\n 'x-amzn-trace-id',\n 'range',\n 'connection',\n]);\nclass AwsClient {\n constructor({ accessKeyId, secretAccessKey, sessionToken, service, region, cache, retries, initRetryMs }) {\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n this.service = service;\n this.region = region;\n this.cache = cache || new Map();\n this.retries = retries != null ? retries : 10;\n this.initRetryMs = initRetryMs || 50;\n }\n async sign(input, init) {\n if (input instanceof Request) {\n const { method, url, headers, body } = input;\n init = Object.assign({ method, url, headers }, init);\n if (init.body == null && headers.has('Content-Type')) {\n init.body = body != null && headers.has('X-Amz-Content-Sha256') ? body : await input.clone().arrayBuffer();\n }\n input = url;\n }\n const signer = new AwsV4Signer(Object.assign({ url: input.toString() }, init, this, init && init.aws));\n const signed = Object.assign({}, init, await signer.sign());\n delete signed.aws;\n try {\n return new Request(signed.url.toString(), signed)\n } catch (e) {\n if (e instanceof TypeError) {\n return new Request(signed.url.toString(), Object.assign({ duplex: 'half' }, signed))\n }\n throw e\n }\n }\n async fetch(input, init) {\n for (let i = 0; i <= this.retries; i++) {\n const fetched = fetch(await this.sign(input, init));\n if (i === this.retries) {\n return fetched\n }\n const res = await fetched;\n if (res.status < 500 && res.status !== 429) {\n return res\n }\n await new Promise(resolve => setTimeout(resolve, Math.random() * this.initRetryMs * Math.pow(2, i)));\n }\n throw new Error('An unknown error occurred, ensure retries is not negative')\n }\n}\nclass AwsV4Signer {\n constructor({ method, url, headers, body, accessKeyId, secretAccessKey, sessionToken, service, region, cache, datetime, signQuery, appendSessionToken, allHeaders, singleEncode }) {\n if (url == null) throw new TypeError('url is a required option')\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.method = method || (body ? 'POST' : 'GET');\n this.url = new URL(url);\n this.headers = new Headers(headers || {});\n this.body = body;\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n let guessedService, guessedRegion;\n if (!service || !region) {\n[guessedService, guessedRegion] = guessServiceRegion(this.url, this.headers);\n }\n this.service = service || guessedService || '';\n this.region = region || guessedRegion || 'us-east-1';\n this.cache = cache || new Map();\n this.datetime = datetime || new Date().toISOString().replace(/[:-]|\\.\\d{3}/g, '');\n this.signQuery = signQuery;\n this.appendSessionToken = appendSessionToken || this.service === 'iotdevicegateway';\n this.headers.delete('Host');\n if (this.service === 's3' && !this.signQuery && !this.headers.has('X-Amz-Content-Sha256')) {\n this.headers.set('X-Amz-Content-Sha256', 'UNSIGNED-PAYLOAD');\n }\n const params = this.signQuery ? this.url.searchParams : this.headers;\n params.set('X-Amz-Date', this.datetime);\n if (this.sessionToken && !this.appendSessionToken) {\n params.set('X-Amz-Security-Token', this.sessionToken);\n }\n this.signableHeaders = ['host', ...this.headers.keys()]\n .filter(header => allHeaders || !UNSIGNABLE_HEADERS.has(header))\n .sort();\n this.signedHeaders = this.signableHeaders.join(';');\n this.canonicalHeaders = this.signableHeaders\n .map(header => header + ':' + (header === 'host' ? this.url.host : (this.headers.get(header) || '').replace(/\\s+/g, ' ')))\n .join('\\n');\n this.credentialString = [this.datetime.slice(0, 8), this.region, this.service, 'aws4_request'].join('/');\n if (this.signQuery) {\n if (this.service === 's3' && !params.has('X-Amz-Expires')) {\n params.set('X-Amz-Expires', '86400');\n }\n params.set('X-Amz-Algorithm', 'AWS4-HMAC-SHA256');\n params.set('X-Amz-Credential', this.accessKeyId + '/' + this.credentialString);\n params.set('X-Amz-SignedHeaders', this.signedHeaders);\n }\n if (this.service === 's3') {\n try {\n this.encodedPath = decodeURIComponent(this.url.pathname.replace(/\\+/g, ' '));\n } catch (e) {\n this.encodedPath = this.url.pathname;\n }\n } else {\n this.encodedPath = this.url.pathname.replace(/\\/+/g, '/');\n }\n if (!singleEncode) {\n this.encodedPath = encodeURIComponent(this.encodedPath).replace(/%2F/g, '/');\n }\n this.encodedPath = encodeRfc3986(this.encodedPath);\n const seenKeys = new Set();\n this.encodedSearch = [...this.url.searchParams]\n .filter(([k]) => {\n if (!k) return false\n if (this.service === 's3') {\n if (seenKeys.has(k)) return false\n seenKeys.add(k);\n }\n return true\n })\n .map(pair => pair.map(p => encodeRfc3986(encodeURIComponent(p))))\n .sort(([k1, v1], [k2, v2]) => k1 < k2 ? -1 : k1 > k2 ? 1 : v1 < v2 ? -1 : v1 > v2 ? 1 : 0)\n .map(pair => pair.join('='))\n .join('&');\n }\n async sign() {\n if (this.signQuery) {\n this.url.searchParams.set('X-Amz-Signature', await this.signature());\n if (this.sessionToken && this.appendSessionToken) {\n this.url.searchParams.set('X-Amz-Security-Token', this.sessionToken);\n }\n } else {\n this.headers.set('Authorization', await this.authHeader());\n }\n return {\n method: this.method,\n url: this.url,\n headers: this.headers,\n body: this.body,\n }\n }\n async authHeader() {\n return [\n 'AWS4-HMAC-SHA256 Credential=' + this.accessKeyId + '/' + this.credentialString,\n 'SignedHeaders=' + this.signedHeaders,\n 'Signature=' + (await this.signature()),\n ].join(', ')\n }\n async signature() {\n const date = this.datetime.slice(0, 8);\n const cacheKey = [this.secretAccessKey, date, this.region, this.service].join();\n let kCredentials = this.cache.get(cacheKey);\n if (!kCredentials) {\n const kDate = await hmac('AWS4' + this.secretAccessKey, date);\n const kRegion = await hmac(kDate, this.region);\n const kService = await hmac(kRegion, this.service);\n kCredentials = await hmac(kService, 'aws4_request');\n this.cache.set(cacheKey, kCredentials);\n }\n return buf2hex(await hmac(kCredentials, await this.stringToSign()))\n }\n async stringToSign() {\n return [\n 'AWS4-HMAC-SHA256',\n this.datetime,\n this.credentialString,\n buf2hex(await hash(await this.canonicalString())),\n ].join('\\n')\n }\n async canonicalString() {\n return [\n this.method.toUpperCase(),\n this.encodedPath,\n this.encodedSearch,\n this.canonicalHeaders + '\\n',\n this.signedHeaders,\n await this.hexBodyHash(),\n ].join('\\n')\n }\n async hexBodyHash() {\n let hashHeader = this.headers.get('X-Amz-Content-Sha256') || (this.service === 's3' && this.signQuery ? 'UNSIGNED-PAYLOAD' : null);\n if (hashHeader == null) {\n if (this.body && typeof this.body !== 'string' && !('byteLength' in this.body)) {\n throw new Error('body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header')\n }\n hashHeader = buf2hex(await hash(this.body || ''));\n }\n return hashHeader\n }\n}\nasync function hmac(key, string) {\n const cryptoKey = await crypto.subtle.importKey(\n 'raw',\n typeof key === 'string' ? encoder.encode(key) : key,\n { name: 'HMAC', hash: { name: 'SHA-256' } },\n false,\n ['sign'],\n );\n return crypto.subtle.sign('HMAC', cryptoKey, encoder.encode(string))\n}\nasync function hash(content) {\n return crypto.subtle.digest('SHA-256', typeof content === 'string' ? encoder.encode(content) : content)\n}\nconst HEX_CHARS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\nfunction buf2hex(arrayBuffer) {\n const buffer = new Uint8Array(arrayBuffer);\n let out = '';\n for (let idx = 0; idx < buffer.length; idx++) {\n const n = buffer[idx];\n out += HEX_CHARS[(n >>> 4) & 0xF];\n out += HEX_CHARS[n & 0xF];\n }\n return out\n}\nfunction encodeRfc3986(urlEncodedStr) {\n return urlEncodedStr.replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase())\n}\nfunction guessServiceRegion(url, headers) {\n const { hostname, pathname } = url;\n if (hostname.endsWith('.on.aws')) {\n const match = hostname.match(/^[^.]{1,63}\\.lambda-url\\.([^.]{1,63})\\.on\\.aws$/);\n return match != null ? ['lambda', match[1] || ''] : ['', '']\n }\n if (hostname.endsWith('.r2.cloudflarestorage.com')) {\n return ['s3', 'auto']\n }\n if (hostname.endsWith('.backblazeb2.com')) {\n const match = hostname.match(/^(?:[^.]{1,63}\\.)?s3\\.([^.]{1,63})\\.backblazeb2\\.com$/);\n return match != null ? ['s3', match[1] || ''] : ['', '']\n }\n const match = hostname.replace('dualstack.', '').match(/([^.]{1,63})\\.(?:([^.]{0,63})\\.)?amazonaws\\.com(?:\\.cn)?$/);\n let service = (match && match[1]) || '';\n let region = match && match[2];\n if (region === 'us-gov') {\n region = 'us-gov-west-1';\n } else if (region === 's3' || region === 's3-accelerate') {\n region = 'us-east-1';\n service = 's3';\n } else if (service === 'iot') {\n if (hostname.startsWith('iot.')) {\n service = 'execute-api';\n } else if (hostname.startsWith('data.jobs.iot.')) {\n service = 'iot-jobs-data';\n } else {\n service = pathname === '/mqtt' ? 'iotdevicegateway' : 'iotdata';\n }\n } else if (service === 'autoscaling') {\n const targetPrefix = (headers.get('X-Amz-Target') || '').split('.')[0];\n if (targetPrefix === 'AnyScaleFrontendService') {\n service = 'application-autoscaling';\n } else if (targetPrefix === 'AnyScaleScalingPlannerFrontendService') {\n service = 'autoscaling-plans';\n }\n } else if (region == null && service.startsWith('s3-')) {\n region = service.slice(3).replace(/^fips-|^external-1/, '');\n service = 's3';\n } else if (service.endsWith('-fips')) {\n service = service.slice(0, -5);\n } else if (region && /-\\d$/.test(service) && !/-\\d$/.test(region)) {\n[service, region] = [region, service];\n }\n return [HOST_SERVICES[service] || service, region || '']\n}\n\nexport { AwsClient, AwsV4Signer };\n"
],
"mappings": ";AAIA,IAAM,EAAU,IAAI,YACd,EAAgB,CACpB,WAAY,YACZ,WAAY,WACZ,MAAO,MACP,YAAa,kBACb,OAAQ,sBACR,SAAU,kBACV,MAAO,MACP,iBAAkB,aAClB,0BAA2B,kBAC3B,sBAAuB,aACzB,EACM,EAAqB,IAAI,IAAI,CACjC,gBACA,eACA,iBACA,aACA,oBACA,SACA,kBACA,QACA,YACF,CAAC,EAkDD,MAAM,CAAY,CAChB,WAAW,EAAG,SAAQ,MAAK,UAAS,OAAM,cAAa,kBAAiB,eAAc,UAAS,SAAQ,QAAO,WAAU,YAAW,qBAAoB,aAAY,gBAAgB,CACjL,GAAI,GAAO,KAAM,MAAU,UAAU,0BAA0B,EAC/D,GAAI,GAAe,KAAM,MAAU,UAAU,kCAAkC,EAC/E,GAAI,GAAmB,KAAM,MAAU,UAAU,sCAAsC,EAC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ugId": "8E0648E3C27D920164756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://portal.sso.{Region}.amazonaws.com\", i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 13,\n 3,\n 1,\n 4,\n r + 12,\n 2,\n 5,\n r + 12,\n 3,\n 8,\n 6,\n 4,\n 7,\n r + 11,\n 5,\n r + 9,\n r + 10,\n 4,\n 11,\n 9,\n 6,\n 10,\n r + 8,\n 7,\n r + 6,\n r + 7,\n 5,\n 12,\n r + 5,\n 6,\n r + 4,\n r + 5,\n 3,\n r + 1,\n 14,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SSOServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOServiceException.prototype);\n }\n}\n\nclass InvalidRequestException extends SSOServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n }\n}\nclass ResourceNotFoundException extends SSOServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends SSOServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass UnauthorizedException extends SSOServiceException {\n name = \"UnauthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedException.prototype);\n }\n}\n\nconst _ATT = \"AccessTokenType\";\nconst _GRC = \"GetRoleCredentials\";\nconst _GRCR = \"GetRoleCredentialsRequest\";\nconst _GRCRe = \"GetRoleCredentialsResponse\";\nconst _IRE = \"InvalidRequestException\";\nconst _RC = \"RoleCredentials\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SAKT = \"SecretAccessKeyType\";\nconst _STT = \"SessionTokenType\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _UE = \"UnauthorizedException\";\nconst _aI = \"accountId\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _ex = \"expiration\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hQ = \"httpQuery\";\nconst _m = \"message\";\nconst _rC = \"roleCredentials\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.sso\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\nconst n0 = \"com.amazonaws.sso\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SSOServiceException$ = [-3, _s, \"SSOServiceException\", 0, [], []];\n_s_registry.registerError(SSOServiceException$, SSOServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nvar UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];\nn0_registry.registerError(UnauthorizedException$, UnauthorizedException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar AccessTokenType = [0, n0, _ATT, 8, 0];\nvar SecretAccessKeyType = [0, n0, _SAKT, 8, 0];\nvar SessionTokenType = [0, n0, _STT, 8, 0];\nvar GetRoleCredentialsRequest$ = [\n 3,\n n0,\n _GRCR,\n 0,\n [_rN, _aI, _aT],\n [\n [0, { [_hQ]: _rn }],\n [0, { [_hQ]: _ai }],\n [() => AccessTokenType, { [_hH]: _xasbt }],\n ],\n 3,\n];\nvar GetRoleCredentialsResponse$ = [\n 3,\n n0,\n _GRCRe,\n 0,\n [_rC],\n [[() => RoleCredentials$, 0]],\n];\nvar RoleCredentials$ = [\n 3,\n n0,\n _RC,\n 0,\n [_aKI, _sAK, _sT, _ex],\n [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],\n];\nvar GetRoleCredentials$ = [\n 9,\n n0,\n _GRC,\n { [_h]: [\"GET\", \"/federation/credentials\", 200] },\n () => GetRoleCredentialsRequest$,\n () => GetRoleCredentialsResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.sso\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"SWBPortalService\",\n },\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass GetRoleCredentialsCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"SWBPortalService\", \"GetRoleCredentials\", {})\n .n(\"SSOClient\", \"GetRoleCredentialsCommand\")\n .sc(GetRoleCredentials$)\n .build() {\n}\n\nconst commands = {\n GetRoleCredentialsCommand,\n};\nclass SSO extends SSOClient {\n}\nclient.createAggregatedClient(commands, SSO);\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.GetRoleCredentials$ = GetRoleCredentials$;\nexports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;\nexports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;\nexports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.RoleCredentials$ = RoleCredentials$;\nexports.SSO = SSO;\nexports.SSOClient = SSOClient;\nexports.SSOServiceException = SSOServiceException;\nexports.SSOServiceException$ = SSOServiceException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.UnauthorizedException = UnauthorizedException;\nexports.UnauthorizedException$ = UnauthorizedException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAA6C,MAAO,EAAQ,EAAS,IAAU,CACjF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,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CACA,EAAO,uBAAuB,GAAU,CAAG,EAE3C,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EAEnB,IAAQ,EAA4B,EASpC,IAAQ,EAAY",
"debugId": "5FD7D2F779CEE0A464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+node-http-handler@4.7.5/node_modules/@smithy/node-http-handler/dist-cjs/index.js"],
"sourcesContent": [
"'use strict';\n\nvar node_https = require('node:https');\nvar protocols = require('@smithy/core/protocols');\nvar node_stream = require('node:stream');\nvar http2 = require('node:http2');\n\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n\nconst NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\nconst getTransformedHeaders = (headers) => {\n const transformedHeaders = {};\n for (const name in headers) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n};\n\nconst timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n};\n\nconst DEFER_EVENT_LISTENER_TIME$2 = 1000;\nconst setConnectionTimeout = (request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = (offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {\n name: \"TimeoutError\",\n }));\n }, timeoutInMs - offset);\n const doWithSocket = (socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n }\n else {\n timing.clearTimeout(timeoutId);\n }\n };\n if (request.socket) {\n doWithSocket(request.socket);\n }\n else {\n request.on(\"socket\", doWithSocket);\n }\n };\n if (timeoutInMs < 2000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);\n};\n\nconst setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {\n if (timeoutInMs) {\n return timing.setTimeout(() => {\n let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? \"ERROR\" : \"WARN\"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;\n if (throwOnRequestTimeout) {\n const error = Object.assign(new Error(msg), {\n name: \"TimeoutError\",\n code: \"ETIMEDOUT\",\n });\n req.destroy(error);\n reject(error);\n }\n else {\n msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;\n logger?.warn?.(msg);\n }\n }, timeoutInMs);\n }\n return -1;\n};\n\nconst DEFER_EVENT_LISTENER_TIME$1 = 3000;\nconst setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = () => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n }\n else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n };\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n};\n\nconst DEFER_EVENT_LISTENER_TIME = 3000;\nconst setSocketTimeout = (request, reject, timeoutInMs = 0) => {\n const registerTimeout = (offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = () => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: \"TimeoutError\" }));\n };\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n }\n else {\n request.setTimeout(timeout, onTimeout);\n }\n };\n if (0 < timeoutInMs && timeoutInMs < 6000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n};\n\nconst MIN_WAIT_TIME = 6_000;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {\n const headers = request.headers;\n const expect = headers ? headers.Expect || headers.expect : undefined;\n let timeoutId = -1;\n let sendBody = true;\n if (!externalAgent && expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n }),\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\nfunction writeBody(httpRequest, body) {\n if (body instanceof node_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n const isBuffer = Buffer.isBuffer(body);\n const isString = typeof body === \"string\";\n if (isBuffer || isString) {\n if (isBuffer && body.byteLength === 0) {\n httpRequest.end();\n }\n else {\n httpRequest.end(body);\n }\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" &&\n uint8.buffer &&\n typeof uint8.byteOffset === \"number\" &&\n typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n\nconst DEFAULT_REQUEST_TIMEOUT = 0;\nlet hAgent = undefined;\nlet hRequest = undefined;\nclass NodeHttpHandler {\n config;\n configProvider;\n socketWarningTimestamp = 0;\n externalAgent = false;\n metadata = { handlerProtocol: \"http/1.1\" };\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttpHandler(instanceOrOptions);\n }\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15_000;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n })\n .catch(reject);\n }\n else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const config = this.config;\n const isSSL = request.protocol === \"https:\";\n if (!isSSL && !this.config.httpAgent) {\n this.config.httpAgent = await this.config.httpAgentProvider();\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = undefined;\n let socketWarningTimeoutId = -1;\n let connectionTimeoutId = -1;\n let requestTimeoutId = -1;\n let socketTimeoutId = -1;\n let keepAliveTimeoutId = -1;\n const clearTimeouts = () => {\n timing.clearTimeout(socketWarningTimeoutId);\n timing.clearTimeout(connectionTimeoutId);\n timing.clearTimeout(requestTimeoutId);\n timing.clearTimeout(socketTimeoutId);\n timing.clearTimeout(keepAliveTimeoutId);\n };\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const headers = request.headers;\n const expectContinue = headers ? (headers.Expect ?? headers.expect) === \"100-continue\" : false;\n let agent = isSSL ? config.httpsAgent : config.httpAgent;\n if (expectContinue && !this.externalAgent) {\n agent = new (isSSL ? node_https.Agent : hAgent)({\n keepAlive: false,\n maxSockets: Infinity,\n });\n }\n socketWarningTimeoutId = timing.setTimeout(() => {\n this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);\n }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));\n const queryString = request.query ? protocols.buildQueryString(request.query) : \"\";\n let auth = undefined;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n }\n else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth,\n };\n const requestFunc = isSSL ? node_https.request : hRequest;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new protocols.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res,\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n }\n else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = () => {\n req.destroy();\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;\n connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);\n requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);\n socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n keepAliveTimeoutId = setSocketKeepAlive(req, {\n keepAlive: httpAgent.keepAlive,\n keepAliveMsecs: httpAgent.keepAliveMsecs,\n });\n }\n writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {\n clearTimeouts();\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout,\n socketTimeout,\n socketAcquisitionWarningTimeout,\n throwOnRequestTimeout,\n httpAgentProvider: async () => {\n const { Agent, request } = await import('node:http');\n hRequest = request;\n hAgent = Agent;\n if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpAgent;\n }\n return new hAgent({ keepAlive, maxSockets, ...httpAgent });\n },\n httpsAgent: (() => {\n if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpsAgent;\n }\n return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger,\n };\n }\n}\n\nconst ids = new Uint16Array(1);\nclass ClientHttp2SessionRef {\n id = ids[0]++;\n total = 0;\n max = 0;\n session;\n refs = 0;\n constructor(session) {\n session.unref();\n this.session = session;\n }\n retain() {\n if (this.session.destroyed) {\n throw new Error(\"@smithy/node-http-handler - cannot acquire reference to destroyed session.\");\n }\n this.refs += 1;\n this.total += 1;\n this.max = Math.max(this.refs, this.max);\n this.session.ref();\n }\n free() {\n if (this.session.destroyed) {\n return;\n }\n this.refs -= 1;\n if (this.refs === 0) {\n this.session.unref();\n }\n if (this.refs < 0) {\n throw new Error(\"@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.\");\n }\n }\n deref() {\n return this.session;\n }\n close() {\n if (!this.session.closed) {\n this.session.close();\n }\n }\n destroy() {\n this.refs = 0;\n if (!this.session.destroyed) {\n this.session.destroy();\n }\n }\n useCount() {\n return this.refs;\n }\n}\n\nclass NodeHttp2ConnectionPool {\n sessions = [];\n maxConcurrency = 0;\n constructor(sessions) {\n this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));\n }\n poll() {\n let cleanup = false;\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n cleanup = true;\n continue;\n }\n if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {\n return session;\n }\n }\n if (cleanup) {\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n this.remove(session);\n }\n }\n }\n }\n offerLast(ref) {\n this.sessions.push(ref);\n }\n remove(ref) {\n const ix = this.sessions.indexOf(ref);\n if (ix > -1) {\n this.sessions.splice(ix, 1);\n }\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n setMaxConcurrency(maxConcurrency) {\n this.maxConcurrency = maxConcurrency;\n }\n destroy(ref) {\n this.remove(ref);\n ref.destroy();\n }\n}\n\nclass NodeHttp2ConnectionManager {\n config;\n connectOptions;\n connectionPools = new Map();\n constructor(config) {\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const pool = this.getPool(url);\n if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {\n const available = pool.poll();\n if (available) {\n available.retain();\n return available;\n }\n }\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\"Fail to set maxConcurrentStreams to \" +\n this.config.maxConcurrency +\n \"when creating new session for \" +\n requestContext.destination.toString());\n }\n });\n }\n const graceful = () => {\n this.removeFromPoolAndClose(url, ref);\n };\n const ensureDestroyed = () => {\n this.removeFromPoolAndCheckedDestroy(url, ref);\n };\n session.on(\"goaway\", graceful);\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n pool.offerLast(ref);\n ref.retain();\n return ref;\n }\n release(_requestContext, ref) {\n ref.free();\n }\n createIsolatedSession(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n session.settings({ maxConcurrentStreams: 1 });\n const ensureDestroyed = () => {\n ref.destroy();\n };\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n ref.retain();\n return ref;\n }\n destroy() {\n for (const [url, connectionPool] of this.connectionPools) {\n for (const session of [...connectionPool]) {\n session.destroy();\n }\n this.connectionPools.delete(url);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n for (const pool of this.connectionPools.values()) {\n pool.setMaxConcurrency(maxConcurrentStreams);\n }\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) {\n this.connectOptions = nodeHttp2ConnectOptions;\n }\n debug() {\n const pools = {};\n for (const [url, pool] of this.connectionPools) {\n const sessions = [];\n for (const ref of pool) {\n sessions.push({\n id: ref.id,\n active: ref.useCount(),\n maxConcurrent: ref.max,\n totalRequests: ref.total,\n });\n }\n pools[url] = { sessions };\n }\n return pools;\n }\n removeFromPoolAndClose(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.close();\n }\n removeFromPoolAndCheckedDestroy(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.destroy();\n }\n getPool(url) {\n if (!this.connectionPools.has(url)) {\n const pool = new NodeHttp2ConnectionPool();\n if (this.config.maxConcurrency) {\n pool.setMaxConcurrency(this.config.maxConcurrency);\n }\n this.connectionPools.set(url, pool);\n }\n return this.connectionPools.get(url);\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n connect(url) {\n return this.connectOptions === undefined ? http2.connect(url) : http2.connect(url, this.connectOptions);\n }\n}\n\nclass NodeHttp2Handler {\n config;\n configProvider;\n metadata = { handlerProtocol: \"h2\" };\n connectionManager = new NodeHttp2ConnectionManager({});\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttp2Handler(instanceOrOptions);\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((opts) => {\n resolve(opts || {});\n })\n .catch(reject);\n }\n else {\n resolve(options || {});\n }\n });\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;\n this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);\n if (maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);\n }\n if (nodeHttp2ConnectOptions) {\n this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);\n }\n }\n const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;\n const useIsolatedSession = disableConcurrentStreams || isEventStream;\n const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = undefined;\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const connectConfig = {\n requestTimeout: this.config?.sessionTimeout,\n isEventStream,\n };\n const ref = useIsolatedSession\n ? this.connectionManager.createIsolatedSession(requestContext, connectConfig)\n : this.connectionManager.lease(requestContext, connectConfig);\n const session = ref.deref();\n const rejectWithDestroy = (err) => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n fulfilled = true;\n reject(err);\n };\n const queryString = query ? protocols.buildQueryString(query) : \"\";\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const clientHttp2Stream = session.request({\n ...request.headers,\n [http2.constants.HTTP2_HEADER_PATH]: path,\n [http2.constants.HTTP2_HEADER_METHOD]: method,\n });\n if (effectiveRequestTimeout) {\n clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {\n clientHttp2Stream.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = () => {\n clientHttp2Stream.close();\n const abortError = buildAbortError(abortSignal);\n rejectWithDestroy(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n clientHttp2Stream.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n clientHttp2Stream.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n clientHttp2Stream.on(\"error\", rejectWithDestroy);\n clientHttp2Stream.on(\"aborted\", () => {\n rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));\n });\n clientHttp2Stream.on(\"response\", (headers) => {\n const httpResponse = new protocols.HttpResponse({\n statusCode: headers[\":status\"] ?? -1,\n headers: getTransformedHeaders(headers),\n body: clientHttp2Stream,\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (useIsolatedSession) {\n session.close();\n }\n });\n clientHttp2Stream.on(\"close\", () => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n else {\n this.connectionManager.release(requestContext, ref);\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\n\nclass Collector extends node_stream.Writable {\n bufferedBytes = [];\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n}\n\nconst streamCollector = (stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n};\nconst isReadableStreamInstance = (stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream;\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n\nexports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;\nexports.NodeHttp2Handler = NodeHttp2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
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nimport { NodeHttpHandler } from \"@smithy/node-http-handler\";\nimport fs from \"node:fs/promises\";\nimport { checkUrl } from \"./checkUrl\";\nimport { createGetRequest, getCredentials } from \"./requestHelpers\";\nimport { retryWrapper } from \"./retry-wrapper\";\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger?.warn\n ? console.warn\n : options.logger.warn.bind(options.logger);\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n checkUrl(url, options.logger);\n const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 });\n const requestTimeout = options.timeout ?? 1000;\n const provider = retryWrapper(async () => {\n const request = createGetRequest(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await fs.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request, { requestTimeout });\n return getCredentials(result.response).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n return async () => {\n try {\n return await provider();\n }\n finally {\n requestHandler.destroy?.();\n }\n };\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nexport const checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { parseRfc3339DateTime } from \"@smithy/core/serde\";\nimport { sdkStreamMixin } from \"@smithy/core/serde\";\nexport function createGetRequest(url) {\n return new HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexport async function getCredentials(response, logger) {\n const stream = sdkStreamMixin(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: parseRfc3339DateTime(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n",
"export const retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n"
],
"mappings": ";wPAAA,oBACA,gBACA,gBACA,gCCHA,eAGA,IAAM,EAAqB,gBACrB,EAA0B,iBAC1B,EAA0B,iBACnB,EAAW,CAAC,EAAK,IAAW,CACrC,GAAI,EAAI,WAAa,SACjB,OAEJ,GAAI,EAAI,WAAa,GACjB,EAAI,WAAa,GACjB,EAAI,WAAa,EACjB,OAEJ,GAAI,EAAI,SAAS,SAAS,GAAG,GACzB,GAAI,EAAI,WAAa,SAAW,EAAI,WAAa,4CAC7C,OAGH,KACD,GAAI,EAAI,WAAa,YACjB,OAEJ,IAAM,EAAe,EAAI,SAAS,MAAM,GAAG,EACrC,EAAU,CAAC,IAAc,CAC3B,IAAM,EAAM,SAAS,EAAW,EAAE,EAClC,MAAO,IAAK,GAAO,GAAO,KAE9B,GAAI,EAAa,KAAO,OACpB,EAAQ,EAAa,EAAE,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Q,QAAQ,eAAiB,MAAM,EAAG,SAAS,CAAS,GAAG,SAAS,EAE5E,GAAI,CACA,IAAM,EAAS,MAAM,EAAe,OAAO,EAAS,CAAE,gBAAe,CAAC,EACtE,OAAO,EAAe,EAAO,QAAQ,EAAE,KAAK,CAAC,IAAU,uBAAqB,EAAO,mBAAoB,GAAG,CAAC,EAE/G,MAAO,EAAG,CACN,MAAM,IAAI,2BAAyB,OAAO,CAAC,EAAG,CAAE,OAAQ,EAAQ,MAAO,CAAC,IAE7E,EAAQ,YAAc,EAAG,EAAQ,SAAW,IAAI,EACnD,MAAO,UAAY,CACf,GAAI,CACA,OAAO,MAAM,EAAS,SAE1B,CACI,EAAe,UAAU",
"debugId": "6F5D13DF00C9ACAB64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst fs_1 = require(\"fs\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n try {\n const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-bsd.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,UACA,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,OADe,MAAM,EAAK,SAAS,SAAS,cAAe,CAAE,SAAU,MAAO,CAAC,GACjE,KAAK,EAEvB,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,GAAI,CAEA,OADe,MAAO,EAAG,EAAY,WAAW,4BAA4B,GAC9D,OAAO,KAAK,EAE9B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "30E4FB6B6CA3EC9064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/debug/agents.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.debug.commands.agents,\n Effect.fn(\"cli.debug.agents\")(function* () {\n const daemon = yield* Daemon.Service\n const client = yield* daemon.client()\n const response = yield* Effect.promise(() => client.v2.agent.list({ location: { directory: process.cwd() } }))\n process.stdout.write(\n JSON.stringify(\n response.data?.data.toSorted((a, b) => a.id.localeCompare(b.id)),\n null,\n 2,\n ) + EOL,\n )\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,MAAM,SAAS,OAC1B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CAEzC,IAAM,EAAS,OADA,MAAO,EAAO,SACA,OAAO,EAC9B,EAAW,MAAc,EAAQ,IAAM,EAAO,GAAG,MAAM,KAAK,CAAE,SAAU,CAAE,UAAW,QAAQ,IAAI,CAAE,CAAE,CAAC,CAAC,EAC7G,QAAQ,OAAO,MACb,KAAK,UACH,EAAS,MAAM,KAAK,SAAS,CAAC,EAAG,IAAM,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC,EAC/D,KACA,CACF,EAAI,CACN,EACD,CACH",
"debugId": "4AAE57BEA02041B664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "14E3F3C3B7F98B6464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/is-wsl@3.1.1/node_modules/is-wsl/index.js", "../../node_modules/.bun/is-inside-container@1.0.0/node_modules/is-inside-container/index.js", "../../node_modules/.bun/is-docker@3.0.0/node_modules/is-docker/index.js"],
"sourcesContent": [
"import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tif (fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {\n\t\t\treturn !isInsideContainer();\n\t\t}\n\t} catch {}\n\n\t// Fallback for custom kernels: check WSL-specific paths.\n\tif (\n\t\tfs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')\n\t\t|| fs.existsSync('/run/WSL')\n\t) {\n\t\treturn !isInsideContainer();\n\t}\n\n\treturn false;\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n",
"import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n",
"import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n"
],
"mappings": ";AAAA,uBACA,kBACA,kBCFA,kBCAA,kBAEA,IAAI,EAEJ,SAAS,CAAY,EAAG,CACvB,GAAI,CAEH,OADA,EAAG,SAAS,aAAa,EAClB,GACN,KAAM,CACP,MAAO,IAIT,SAAS,CAAe,EAAG,CAC1B,GAAI,CACH,OAAO,EAAG,aAAa,oBAAqB,MAAM,EAAE,SAAS,QAAQ,EACpE,KAAM,CACP,MAAO,IAIT,SAAwB,CAAQ,EAAG,CAElC,GAAI,IAAmB,OACtB,EAAiB,EAAa,GAAK,EAAgB,EAGpD,OAAO,EDxBR,IAAI,EAGE,EAAkB,IAAM,CAC7B,GAAI,CAEH,OADA,EAAG,SAAS,oBAAoB,EACzB,GACN,KAAM,CACP,MAAO,KAIT,SAAwB,CAAiB,EAAG,CAE3C,GAAI,IAAiB,OACpB,EAAe,EAAgB,GAAK,EAAS,EAG9C,OAAO,EDhBR,IAAM,EAAQ,IAAM,CACnB,GAAI,EAAQ,WAAa,QACxB,MAAO,GAGR,GAAI,EAAG,QAAQ,EAAE,YAAY,EAAE,SAAS,WAAW,EAAG,CACrD,GAAI,EAAkB,EACrB,MAAO,GAGR,MAAO,GAGR,GAAI,CACH,GAAI,EAAG,aAAa,gBAAiB,MAAM,EAAE,YAAY,EAAE,SAAS,WAAW,EAC9E,MAAO,CAAC,EAAkB,EAE1B,KAAM,EAGR,GACC,EAAG,WAAW,qCAAqC,GAChD,EAAG,WAAW,UAAU,EAE3B,MAAO,CAAC,EAAkB,EAG3B,MAAO,IAGO,IAAQ,IAAI,gBAAkB,EAAQ,EAAM",
"debugId": "A0BC7F4D4302FCB864756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.45/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.45/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { readFileSync } from \"node:fs\";\nimport { fromWebToken } from \"./fromWebToken\";\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nexport const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await fromWebToken({\n ...init,\n webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\n",
"export const fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACA,uBAAS,WCFF,IAAM,EAAe,CAAC,IAAS,MAAO,IAA0B,CACnE,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,IAAQ,UAAS,kBAAiB,mBAAkB,aAAY,aAAY,SAAQ,mBAAoB,GAClG,8BAA+B,EACrC,GAAI,CAAC,EAA4B,CAC7B,IAAQ,wCAAyC,KAAa,0CAC9D,EAA6B,EAAqC,IAC3D,EAAK,aACR,yBAA0B,EAAK,OAC/B,mBAAoB,IACb,GAAuB,sBACvB,EAAK,kBACZ,CACJ,EAAG,EAAK,aAAa,EAEzB,OAAO,EAA2B,CAC9B,QAAS,EACT,gBAAiB,GAAmB,sBAAsB,KAAK,IAAI,IACnE,iBAAkB,EAClB,WAAY,EACZ,WAAY,EACZ,OAAQ,EACR,gBAAiB,CACrB,CAAC,GDnBL,IAAM,EAAiB,8BACjB,EAAe,eACf,EAAwB,wBACjB,EAAgB,CAAC,EAAO,CAAC,IAAM,MAAO,IAA0B,CACzE,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,IAAM,EAAuB,GAAM,sBAAwB,QAAQ,IAAI,GACjE,EAAU,GAAM,SAAW,QAAQ,IAAI,GACvC,EAAkB,GAAM,iBAAmB,QAAQ,IAAI,GAC7D,GAAI,CAAC,GAAwB,CAAC,EAC1B,MAAM,IAAI,2BAAyB,2CAA4C,CAC3E,OAAQ,EAAK,MACjB,CAAC,EAEL,IAAM,EAAc,MAAM,EAAa,IAChC,EACH,iBAAkB,2BAAyB,iBAAiB,EAAE,IAC1D,EAAa,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC5D,UACA,iBACJ,CAAC,EAAE,CAAqB,EACxB,GAAI,IAAyB,QAAQ,IAAI,GACrC,uBAAqB,EAAa,wCAAyC,GAAG,EAElF,OAAO",
"debugId": "281DC47C6FEF7DBD64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/migrate.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\n\nexport default Runtime.handler(Commands.commands.migrate, (_input) => Effect.log(\"No migrations to run.\"))\n"
],
"mappings": ";qRAIA,SAAe,SAAQ,aAAQ,OAAS,cAAS,aAAS,CAAC,IAAkB,EAAI,uBAAuB,CAAC",
"debugId": "A1FD3506EA3F6FC064756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js", "../../node_modules/.bun/@smithy+is-array-buffer@2.2.0/node_modules/@smithy/is-array-buffer/dist-cjs/index.js", "../../node_modules/.bun/@smithy+util-buffer-from@2.2.0/node_modules/@smithy/util-buffer-from/dist-cjs/index.js", "../../node_modules/.bun/@smithy+util-utf8@2.3.0/node_modules/@smithy/util-utf8/dist-cjs/index.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/convertToBuffer.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/isEmptyData.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/numToUint8.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/index.js", "../../node_modules/.bun/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js", "../../node_modules/.bun/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/index.js"],
"sourcesContent": [
"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __esDecorate;\r\nvar __runInitializers;\r\nvar __propKey;\r\nvar __setFunctionName;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\nvar __addDisposableResource;\r\nvar __disposeResources;\r\nvar __rewriteRelativeImportExtension;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n };\r\n\r\n __runInitializers = function (thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n };\r\n\r\n __propKey = function (x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n };\r\n\r\n __setFunctionName = function (f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n var ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n __addDisposableResource = function (env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n };\r\n\r\n var _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n };\r\n\r\n __disposeResources = function (env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n };\r\n\r\n __rewriteRelativeImportExtension = function (path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__esDecorate\", __esDecorate);\r\n exporter(\"__runInitializers\", __runInitializers);\r\n exporter(\"__propKey\", __propKey);\r\n exporter(\"__setFunctionName\", __setFunctionName);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n exporter(\"__addDisposableResource\", __addDisposableResource);\r\n exporter(\"__disposeResources\", __disposeResources);\r\n exporter(\"__rewriteRelativeImportExtension\", __rewriteRelativeImportExtension);\r\n});\r\n\r\n0 && (module.exports = {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __exportStar: __exportStar,\r\n __createBinding: __createBinding,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n});\r\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToBuffer = void 0;\nvar util_utf8_1 = require(\"@smithy/util-utf8\");\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : util_utf8_1.fromUtf8;\nfunction convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\nexports.convertToBuffer = convertToBuffer;\n//# sourceMappingURL=convertToBuffer.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;\n//# sourceMappingURL=isEmptyData.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.numToUint8 = void 0;\nfunction numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\nexports.numToUint8 = numToUint8;\n//# sourceMappingURL=numToUint8.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = void 0;\n// IE 11 does not support Array.from, so we do it manually\nfunction uint32ArrayFrom(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\nexports.uint32ArrayFrom = uint32ArrayFrom;\n//# sourceMappingURL=uint32ArrayFrom.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;\nvar convertToBuffer_1 = require(\"./convertToBuffer\");\nObject.defineProperty(exports, \"convertToBuffer\", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } });\nvar isEmptyData_1 = require(\"./isEmptyData\");\nObject.defineProperty(exports, \"isEmptyData\", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } });\nvar numToUint8_1 = require(\"./numToUint8\");\nObject.defineProperty(exports, \"numToUint8\", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } });\nvar uint32ArrayFrom_1 = require(\"./uint32ArrayFrom\");\nObject.defineProperty(exports, \"uint32ArrayFrom\", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } });\n//# sourceMappingURL=index.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nvar index_1 = require(\"./index\");\nvar AwsCrc32 = /** @class */ (function () {\n function AwsCrc32() {\n this.crc32 = new index_1.Crc32();\n }\n AwsCrc32.prototype.update = function (toHash) {\n if ((0, util_1.isEmptyData)(toHash))\n return;\n this.crc32.update((0, util_1.convertToBuffer)(toHash));\n };\n AwsCrc32.prototype.digest = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())];\n });\n });\n };\n AwsCrc32.prototype.reset = function () {\n this.crc32 = new index_1.Crc32();\n };\n return AwsCrc32;\n}());\nexports.AwsCrc32 = AwsCrc32;\n//# sourceMappingURL=aws_crc32.js.map",
"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nfunction crc32(data) {\n return new Crc32().update(data).digest();\n}\nexports.crc32 = crc32;\nvar Crc32 = /** @class */ (function () {\n function Crc32() {\n this.checksum = 0xffffffff;\n }\n Crc32.prototype.update = function (data) {\n var e_1, _a;\n try {\n for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {\n var byte = data_1_1.value;\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return this;\n };\n Crc32.prototype.digest = function () {\n return (this.checksum ^ 0xffffffff) >>> 0;\n };\n return Crc32;\n}());\nexports.Crc32 = Crc32;\n// prettier-ignore\nvar a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nvar lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);\nvar aws_crc32_1 = require(\"./aws_crc32\");\nObject.defineProperty(exports, \"AwsCrc32\", { enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } });\n//# sourceMappingURL=index.js.map"
],
"mappings": ";8EAeA,IAAI,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,IACH,QAAS,CAAC,EAAS,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Y,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,WACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,SACxC,EACI,IAAe,EAAG,GAAO,iBAAiB,EAAa,EACvD,QACJ,OAAO,eAAe,EAAS,WAAY,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,GAAY,SAAY,CAAC",
"debugId": "472D7672E902499B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.execAsync = void 0;\nconst child_process = require(\"child_process\");\nconst util = require(\"util\");\nexports.execAsync = util.promisify(child_process.exec);\n//# sourceMappingURL=execAsync.js.map"
],
"mappings": ";0EAKA,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,YAAiB,OACzB,IAAM,qBACA,YACE,YAAY,EAAK,UAAU,EAAc,IAAI",
"debugId": "CF8679D91C82D8FB64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentui+core-linux-arm64@0.4.5/node_modules/@opentui/core-linux-arm64/index.bun.js"],
"sourcesContent": [
"const module = await import(\"./libopentui.so\", { with: { type: \"file\" } })\n\nexport default module.default\n"
],
"mappings": ";oDAAA,IAAM,EAAS,KAAa,yCAAmB,CAAE,KAAM,CAAE,KAAM,MAAO,CAAE,GAEzD,IAAO",
"debugId": "78310BC1B5F68B7F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://oidc.{Region}.amazonaws.com\", i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 13,\n 3,\n 1,\n 4,\n r + 12,\n 2,\n 5,\n r + 12,\n 3,\n 8,\n 6,\n 4,\n 7,\n r + 11,\n 5,\n r + 9,\n r + 10,\n 4,\n 11,\n 9,\n 6,\n 10,\n r + 8,\n 7,\n r + 6,\n r + 7,\n 5,\n 12,\n r + 5,\n 6,\n r + 4,\n r + 5,\n 3,\n r + 1,\n 14,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SSOOIDCServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SSOOIDCServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass AuthorizationPendingException extends SSOOIDCServiceException {\n name = \"AuthorizationPendingException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass ExpiredTokenException extends SSOOIDCServiceException {\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InternalServerException extends SSOOIDCServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidClientException extends SSOOIDCServiceException {\n name = \"InvalidClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidGrantException extends SSOOIDCServiceException {\n name = \"InvalidGrantException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidRequestException extends SSOOIDCServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidScopeException extends SSOOIDCServiceException {\n name = \"InvalidScopeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass SlowDownException extends SSOOIDCServiceException {\n name = \"SlowDownException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnauthorizedClientException extends SSOOIDCServiceException {\n name = \"UnauthorizedClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnsupportedGrantTypeException extends SSOOIDCServiceException {\n name = \"UnsupportedGrantTypeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _APE = \"AuthorizationPendingException\";\nconst _AT = \"AccessToken\";\nconst _CS = \"ClientSecret\";\nconst _CT = \"CreateToken\";\nconst _CTR = \"CreateTokenRequest\";\nconst _CTRr = \"CreateTokenResponse\";\nconst _CV = \"CodeVerifier\";\nconst _ETE = \"ExpiredTokenException\";\nconst _ICE = \"InvalidClientException\";\nconst _IGE = \"InvalidGrantException\";\nconst _IRE = \"InvalidRequestException\";\nconst _ISE = \"InternalServerException\";\nconst _ISEn = \"InvalidScopeException\";\nconst _IT = \"IdToken\";\nconst _RT = \"RefreshToken\";\nconst _SDE = \"SlowDownException\";\nconst _UCE = \"UnauthorizedClientException\";\nconst _UGTE = \"UnsupportedGrantTypeException\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cS = \"clientSecret\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _dC = \"deviceCode\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _ed = \"error_description\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _r = \"reason\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.ssooidc\";\nconst _sc = \"scope\";\nconst _se = \"server\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.ssooidc\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SSOOIDCServiceException$ = [-3, _s, \"SSOOIDCServiceException\", 0, [], []];\n_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar AccessDeniedException$ = [\n -3,\n n0,\n _ADE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0],\n];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar AuthorizationPendingException$ = [\n -3,\n n0,\n _APE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);\nvar ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);\nvar InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidClientException$, InvalidClientException);\nvar InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidGrantException$, InvalidGrantException);\nvar InvalidRequestException$ = [\n -3,\n n0,\n _IRE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0],\n];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidScopeException$, InvalidScopeException);\nvar SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(SlowDownException$, SlowDownException);\nvar UnauthorizedClientException$ = [\n -3,\n n0,\n _UCE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);\nvar UnsupportedGrantTypeException$ = [\n -3,\n n0,\n _UGTE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar AccessToken = [0, n0, _AT, 8, 0];\nvar ClientSecret = [0, n0, _CS, 8, 0];\nvar CodeVerifier = [0, n0, _CV, 8, 0];\nvar IdToken = [0, n0, _IT, 8, 0];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar CreateTokenRequest$ = [\n 3,\n n0,\n _CTR,\n 0,\n [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],\n [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],\n 3,\n];\nvar CreateTokenResponse$ = [\n 3,\n n0,\n _CTRr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]],\n];\nvar CreateToken$ = [\n 9,\n n0,\n _CT,\n { [_h]: [\"POST\", \"/token\", 200] },\n () => CreateTokenRequest$,\n () => CreateTokenResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.ssooidc\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"AWSSSOOIDCService\",\n },\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOOIDCClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateTokenCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSSOOIDCService\", \"CreateToken\", {})\n .n(\"SSOOIDCClient\", \"CreateTokenCommand\")\n .sc(CreateToken$)\n .build() {\n}\n\nconst commands = {\n CreateTokenCommand,\n};\nclass SSOOIDC extends SSOOIDCClient {\n}\nclient.createAggregatedClient(commands, SSOOIDC);\n\nconst AccessDeniedExceptionReason = {\n KMS_ACCESS_DENIED: \"KMS_AccessDeniedException\",\n};\nconst InvalidRequestExceptionReason = {\n KMS_DISABLED_KEY: \"KMS_DisabledException\",\n KMS_INVALID_KEY_USAGE: \"KMS_InvalidKeyUsageException\",\n KMS_INVALID_STATE: \"KMS_InvalidStateException\",\n KMS_KEY_NOT_FOUND: \"KMS_NotFoundException\",\n};\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;\nexports.AuthorizationPendingException = AuthorizationPendingException;\nexports.AuthorizationPendingException$ = AuthorizationPendingException$;\nexports.CreateToken$ = CreateToken$;\nexports.CreateTokenCommand = CreateTokenCommand;\nexports.CreateTokenRequest$ = CreateTokenRequest$;\nexports.CreateTokenResponse$ = CreateTokenResponse$;\nexports.ExpiredTokenException = ExpiredTokenException;\nexports.ExpiredTokenException$ = ExpiredTokenException$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.InvalidClientException = InvalidClientException;\nexports.InvalidClientException$ = InvalidClientException$;\nexports.InvalidGrantException = InvalidGrantException;\nexports.InvalidGrantException$ = InvalidGrantException$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;\nexports.InvalidScopeException = InvalidScopeException;\nexports.InvalidScopeException$ = InvalidScopeException$;\nexports.SSOOIDC = SSOOIDC;\nexports.SSOOIDCClient = SSOOIDCClient;\nexports.SSOOIDCServiceException = SSOOIDCServiceException;\nexports.SSOOIDCServiceException$ = SSOOIDCServiceException$;\nexports.SlowDownException = SlowDownException;\nexports.SlowDownException$ = SlowDownException$;\nexports.UnauthorizedClientException = UnauthorizedClientException;\nexports.UnauthorizedClientException$ = UnauthorizedClientException$;\nexports.UnsupportedGrantTypeException = UnsupportedGrantTypeException;\nexports.UnsupportedGrantTypeException$ = UnsupportedGrantTypeException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAiD,MAAO,EAAQ,EAAS,IAAU,CACrF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,YACN,OA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",
"debugId": "8868F7D3AF0A755864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+mistral@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/mistral/dist/index.mjs"],
"sourcesContent": [
"// src/mistral-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/mistral-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n injectJsonInstructionIntoMessages,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-mistral-usage.ts\nfunction convertMistralUsage(usage) {\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = usage.prompt_tokens;\n const completionTokens = usage.completion_tokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens,\n reasoning: void 0\n },\n raw: usage\n };\n}\n\n// src/convert-to-mistral-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction formatFileUrl({\n data,\n mediaType\n}) {\n return data instanceof URL ? data.toString() : `data:${mediaType};base64,${convertToBase64(data)}`;\n}\nfunction convertToMistralChatMessages(prompt) {\n var _a;\n const messages = [];\n for (let i = 0; i < prompt.length; i++) {\n const { role, content } = prompt[i];\n const isLastMessage = i === prompt.length - 1;\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (part.mediaType.startsWith(\"image/\")) {\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: formatFileUrl({ data: part.data, mediaType })\n };\n } else if (part.mediaType === \"application/pdf\") {\n return {\n type: \"document_url\",\n document_url: formatFileUrl({\n data: part.data,\n mediaType: \"application/pdf\"\n })\n };\n } else {\n throw new UnsupportedFunctionalityError({\n functionality: \"Only images and PDF file parts are supported\"\n });\n }\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n case \"reasoning\": {\n text += part.text;\n break;\n }\n default: {\n throw new Error(\n `Unsupported content type in assistant message: ${part.type}`\n );\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n prefix: isLastMessage ? true : void 0,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n name: toolResponse.toolName,\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/map-mistral-finish-reason.ts\nfunction mapMistralFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n case \"model_length\":\n return \"length\";\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/mistral-chat-options.ts\nimport { z } from \"zod/v4\";\nvar mistralLanguageModelOptions = z.object({\n /**\n * Whether to inject a safety prompt before all conversations.\n *\n * Defaults to `false`.\n */\n safePrompt: z.boolean().optional(),\n documentImageLimit: z.number().optional(),\n documentPageLimit: z.number().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n *\n * @default false\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Whether to enable parallel function calling during tool use.\n * When set to false, the model will use at most one tool per response.\n *\n * @default true\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * Controls the reasoning effort for models that support adjustable reasoning.\n *\n * - `'high'`: Enable reasoning\n * - `'none'`: Disable reasoning\n */\n reasoningEffort: z.enum([\"high\", \"none\"]).optional()\n});\n\n// src/mistral-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar mistralErrorDataSchema = z2.object({\n object: z2.literal(\"error\"),\n message: z2.string(),\n type: z2.string(),\n param: z2.string().nullable(),\n code: z2.string().nullable()\n});\nvar mistralFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: mistralErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/mistral-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const mistralTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n mistralTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: mistralTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n return { tools: mistralTools, toolChoice: type, toolWarnings };\n case \"required\":\n return { tools: mistralTools, toolChoice: \"any\", toolWarnings };\n // mistral does not support tool mode directly,\n // so we filter the tools and force the tool choice through 'any'\n case \"tool\":\n return {\n tools: mistralTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"any\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/mistral-chat-language-model.ts\nvar MistralChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"application/pdf\": [/^https:\\/\\/.*$/]\n };\n var _a;\n this.modelId = modelId;\n this.config = config;\n this.generateId = (_a = config.generateId) != null ? _a : generateId;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions,\n tools,\n toolChoice\n }) {\n var _a, _b, _c, _d;\n const warnings = [];\n const options = (_a = await parseProviderOptions({\n provider: \"mistral\",\n providerOptions,\n schema: mistralLanguageModelOptions\n })) != null ? _a : {};\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (frequencyPenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"frequencyPenalty\" });\n }\n if (presencePenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"presencePenalty\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n const structuredOutputs = (_b = options.structuredOutputs) != null ? _b : true;\n const strictJsonSchema = (_c = options.strictJsonSchema) != null ? _c : false;\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && !(responseFormat == null ? void 0 : responseFormat.schema)) {\n prompt = injectJsonInstructionIntoMessages({\n messages: prompt,\n schema: responseFormat.schema\n });\n }\n const baseArgs = {\n // model id:\n model: this.modelId,\n // model specific settings:\n safe_prompt: options.safePrompt,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n random_seed: seed,\n reasoning_effort: options.reasoningEffort,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && (responseFormat == null ? void 0 : responseFormat.schema) != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_d = responseFormat.name) != null ? _d : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // mistral-specific provider options:\n document_image_limit: options.documentImageLimit,\n document_page_limit: options.documentPageLimit,\n // messages:\n messages: convertToMistralChatMessages(prompt)\n };\n const {\n tools: mistralTools,\n toolChoice: mistralToolChoice,\n toolWarnings\n } = prepareTools({\n tools,\n toolChoice\n });\n return {\n args: {\n ...baseArgs,\n tools: mistralTools,\n tool_choice: mistralToolChoice,\n ...mistralTools != null && options.parallelToolCalls !== void 0 ? { parallel_tool_calls: options.parallelToolCalls } : {}\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a;\n const { args: body, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n mistralChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n if (choice.message.content != null && Array.isArray(choice.message.content)) {\n for (const part of choice.message.content) {\n if (part.type === \"thinking\") {\n const reasoningText = extractReasoningContent(part.thinking);\n if (reasoningText.length > 0) {\n content.push({ type: \"reasoning\", text: reasoningText });\n }\n } else if (part.type === \"text\") {\n if (part.text.length > 0) {\n content.push({ type: \"text\", text: part.text });\n }\n }\n }\n } else {\n const text = extractTextContent(choice.message.content);\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertMistralUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n mistralChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let activeText = false;\n let activeReasoningId = null;\n const generateId2 = this.generateId;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (value.usage != null) {\n usage = value.usage;\n }\n const choice = value.choices[0];\n const delta = choice.delta;\n const textContent = extractTextContent(delta.content);\n if (delta.content != null && Array.isArray(delta.content)) {\n for (const part of delta.content) {\n if (part.type === \"thinking\") {\n const reasoningDelta = extractReasoningContent(part.thinking);\n if (reasoningDelta.length > 0) {\n if (activeReasoningId == null) {\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n activeText = false;\n }\n activeReasoningId = generateId2();\n controller.enqueue({\n type: \"reasoning-start\",\n id: activeReasoningId\n });\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: activeReasoningId,\n delta: reasoningDelta\n });\n }\n }\n }\n }\n if (textContent != null && textContent.length > 0) {\n if (!activeText) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n activeReasoningId = null;\n }\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n activeText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n if ((delta == null ? void 0 : delta.tool_calls) != null) {\n for (const toolCall of delta.tool_calls) {\n const toolCallId = toolCall.id;\n const toolName = toolCall.function.name;\n const input = toolCall.function.arguments;\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallId,\n toolName\n });\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCallId,\n delta: input\n });\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCallId\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId,\n toolName,\n input\n });\n }\n }\n if (choice.finish_reason != null) {\n finishReason = {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n },\n flush(controller) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n }\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertMistralUsage(usage)\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction extractReasoningContent(thinking) {\n return thinking.filter((chunk) => chunk.type === \"text\").map((chunk) => chunk.text).join(\"\");\n}\nfunction extractTextContent(content) {\n if (typeof content === \"string\") {\n return content;\n }\n if (content == null) {\n return void 0;\n }\n const textContent = [];\n for (const chunk of content) {\n const { type } = chunk;\n switch (type) {\n case \"text\":\n textContent.push(chunk.text);\n break;\n case \"thinking\":\n case \"image_url\":\n case \"reference\":\n break;\n default: {\n const _exhaustiveCheck = type;\n throw new Error(`Unsupported type: ${_exhaustiveCheck}`);\n }\n }\n }\n return textContent.length ? textContent.join(\"\") : void 0;\n}\nvar mistralContentSchema = z3.union([\n z3.string(),\n z3.array(\n z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"image_url\"),\n image_url: z3.union([\n z3.string(),\n z3.object({\n url: z3.string(),\n detail: z3.string().nullable()\n })\n ])\n }),\n z3.object({\n type: z3.literal(\"reference\"),\n reference_ids: z3.array(z3.union([z3.string(), z3.number()]))\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.array(\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n })\n )\n })\n ])\n )\n]).nullish();\nvar mistralUsageSchema = z3.object({\n prompt_tokens: z3.number(),\n completion_tokens: z3.number(),\n total_tokens: z3.number()\n});\nvar mistralChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n role: z3.literal(\"assistant\"),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n object: z3.literal(\"chat.completion\"),\n usage: mistralUsageSchema\n});\nvar mistralChatChunkSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n role: z3.enum([\"assistant\"]).optional(),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n finish_reason: z3.string().nullish(),\n index: z3.number()\n })\n ),\n usage: mistralUsageSchema.nullish()\n});\n\n// src/mistral-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar MistralEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 32;\n this.supportsParallelCalls = false;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n abortSignal,\n headers\n }) {\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embeddings`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n input: values,\n encoding_format: \"float\"\n },\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n MistralTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.data.map((item) => item.embedding),\n usage: response.usage ? { tokens: response.usage.prompt_tokens } : void 0,\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar MistralTextEmbeddingResponseSchema = z4.object({\n data: z4.array(z4.object({ embedding: z4.array(z4.number()) })),\n usage: z4.object({ prompt_tokens: z4.number() }).nullish()\n});\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/mistral-provider.ts\nfunction createMistral(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.mistral.ai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"MISTRAL_API_KEY\",\n description: \"Mistral\"\n })}`,\n ...options.headers\n },\n `ai-sdk/mistral/${VERSION}`\n );\n const createChatModel = (modelId) => new MistralChatLanguageModel(modelId, {\n provider: \"mistral.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: options.generateId\n });\n const createEmbeddingModel = (modelId) => new MistralEmbeddingModel(modelId, {\n provider: \"mistral.embedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Mistral model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.chat = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar mistral = createMistral();\nexport {\n VER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AAO,GAYhC,OAVA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAU,GAAc",
"debugId": "CBD730BC109EC1F964756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/default.ts"],
"sourcesContent": [
"import { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Effect } from \"effect\"\nimport { Daemon } from \"../../services/daemon\"\n\nexport default Runtime.handler(Commands, () =>\n Effect.gen(function* () {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const { runTui } = yield* Effect.promise(() => import(\"../../tui\"))\n yield* runTui(transport)\n }),\n)\n"
],
"mappings": ";0SAKA,SAAe,SAAQ,aAAQ,OAAU,SACvC,OAAO,IAAI,SAAU,EAAG,CAEtB,IAAM,EAAY,OADH,MAAO,EAAO,SACG,UAAU,GAClC,UAAW,MAAO,EAAO,QAAQ,IAAa,wCAAY,EAClE,MAAO,EAAO,CAAS,EACxB,CACH",
"debugId": "F3A18474D05B760264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/restart.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.restart,\n Effect.fn(\"cli.service.restart\")(function* () {\n const daemon = yield* Daemon.Service\n yield* daemon.stop()\n process.stdout.write((yield* daemon.start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,QAC5B,EAAG,qBAAqB,EAAE,SAAU,EAAG,CAC5C,IAAM,EAAS,MAAO,EAAO,QAC7B,MAAO,EAAO,KAAK,EACnB,QAAQ,OAAO,OAAO,MAAO,EAAO,MAAM,GAAK,CAAG,EACnD,CACH",
"debugId": "1453509DFCA3D93B64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "A43E39744A2E699A64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "13AB8FD47C27689F64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+provider@3.0.8/node_modules/@ai-sdk/provider/dist/index.mjs"],
"sourcesContent": [
"// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n constructor({\n value,\n cause,\n context\n }) {\n let contextPrefix = \"Type validation failed\";\n if (context == null ? void 0 : context.field) {\n contextPrefix += ` for ${context.field}`;\n }\n if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n contextPrefix += \" (\";\n const parts = [];\n if (context.entityName) {\n parts.push(context.entityName);\n }\n if (context.entityId) {\n parts.push(`id: \"${context.entityId}\"`);\n }\n contextPrefix += parts.join(\", \");\n contextPrefix += \")\";\n }\n super({\n name: name12,\n message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n this.context = context;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause,\n context\n }) {\n var _a15, _b15, _c;\n if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n return cause;\n }\n return new _TypeValidationError({ value, cause, context });\n }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";AACA,IAAI,EAAS,kBACT,GAAS,OAAO,IAAI,CAAM,EAC1B,EAAI,EACJ,EAAa,MAAM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iBAC9C,EAAgB,CAAK,IAChC,OACF,CAAC,EACD,KAAK,GAAQ,GACb,KAAK,MAAQ,EACb,KAAK,QAAU,QAEV,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,EAAQ,QAatC,KAAI,EACT,QACA,QACA,WACC,CACD,IAAI,EAAM,EAAM,EAChB,GAAI,EAAqB,WAAW,CAAK,GAAK,EAAM,QAAU,KAAW,EAAO,EAAM,UAAY,KAAY,OAAI,EAAK,UAAY,GAAW,KAAY,OAAI,EAAQ,UAAY,EAAO,EAAM,UAAY,KAAY,OAAI,EAAK,eAAiB,GAAW,KAAY,OAAI,EAAQ,eAAiB,EAAK,EAAM,UAAY,KAAY,OAAI,EAAG,aAAe,GAAW,KAAY,OAAI,EAAQ,UAC/X,OAAO,EAET,OAAO,IAAI,EAAqB,CAAE,QAAO,QAAO,SAAQ,CAAC,EAE7D,EAGI,GAAS,mCACT,GAAW,mBAAmB,KAC9B,GAAW,OAAO,IAAI,EAAQ,EAC9B,EAAM,EACN,GAAgC,cAAe,EAAO,EAAY,EAAO,GAAU,EAAM,CAC3F,WAAW,EACT,gBACA,UAAU,IAAI,mCACb,CACD,MAAM,CAAE,KAAM,GAAQ,SAAQ,CAAC,EAC/B,KAAK,GAAQ,GACb,KAAK,cAAgB,QAEhB,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,EAAQ,EAE/C",
"debugId": "7ED066FEFCB8EC0D64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/constants.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js"],
"sourcesContent": [
"import { CredentialsProviderError, getProfileName, loadSsoSessionData, parseKnownFiles } from \"@smithy/core/config\";\nimport { isSsoProfile } from \"./isSsoProfile\";\nimport { resolveSSOCredentials } from \"./resolveSSOCredentials\";\nimport { validateSsoProfile } from \"./validateSsoProfile\";\nexport const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n};\n",
"export const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromSso as getSsoTokenProvider } from \"@aws-sdk/token-providers\";\nimport { CredentialsProviderError, getSSOTokenFromFile } from \"@smithy/core/config\";\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nexport const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await getSsoTokenProvider({\n profile,\n filepath,\n configFilepath,\n ignoreCache,\n })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = await import(\"./loadSso.js\");\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n",
"import { getProfileName, getSSOTokenFromFile, loadSsoSessionData, parseKnownFiles, TokenProviderError, } from \"@smithy/core/config\";\nimport { EXPIRE_WINDOW_MS, REFRESH_MESSAGE } from \"./constants\";\nimport { getNewSsoOidcToken } from \"./getNewSsoOidcToken\";\nimport { validateTokenExpiry } from \"./validateTokenExpiry\";\nimport { validateTokenKey } from \"./validateTokenKey\";\nimport { writeSSOTokenToFile } from \"./writeSSOTokenToFile\";\nconst lastRefreshAttemptTime = new Date(0);\nexport const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await parseKnownFiles(init);\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n",
"export const EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nexport const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n",
"export const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {\n const { SSOOIDCClient } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: coalesce(\"logger\"),\n userAgentAppId: coalesce(\"userAgentAppId\"),\n }));\n return ssoOidcClient;\n};\n",
"import { getSsoOidcClient } from \"./getSsoOidcClient\";\nexport const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {\n const { CreateTokenCommand } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { getSSOTokenFilepath } from \"@smithy/core/config\";\nimport { promises as fsPromises } from \"node:fs\";\nconst { writeFile } = fsPromises;\nexport const writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n"
],
"mappings": ";4JAAA,oBCAO,SAAM,EAAe,CAAC,IAAQ,IAChC,OAAO,EAAI,gBAAkB,UAC1B,OAAO,EAAI,iBAAmB,UAC9B,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,aAAe,UAC1B,OAAO,EAAI,gBAAkB,UCLrC,gBCAA,eCAO,IAAM,EAAmB,OACnB,EAAkB,kFCDxB,IAAM,EAAmB,MAAO,EAAW,EAAO,CAAC,EAAG,IAAuB,CAChF,IAAQ,iBAAkB,KAAa,0CACjC,EAAW,CAAC,IAAS,EAAK,eAAe,IAAS,EAAK,qBAAqB,IAAS,IAAqB,GAMhH,OALsB,IAAI,EAAc,OAAO,OAAO,CAAC,EAAG,EAAK,cAAgB,CAAC,EAAG,CAC/E,OAAQ,GAAa,EAAK,cAAc,OACxC,OAAQ,EAAS,QAAQ,EACzB,eAAgB,EAAS,gB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AAa,IAAc,EAAQ,WACnC,MAAM,IAAI,2BAAyB,yBAA2B,EAAa,CACvE,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,GAAI,GAAe,IAAgB,EAAQ,cACvC,MAAM,IAAI,2BAAyB,4BAA8B,EAAa,CAC1E,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,EAAQ,WAAa,EAAQ,WAC7B,EAAQ,cAAgB,EAAQ,cAEpC,IAAQ,gBAAe,iBAAgB,aAAY,gBAAe,eAAgB,EAAmB,EAAS,EAAK,MAAM,EACzH,OAAO,EAAsB,CACzB,YAAa,EACb,WAAY,EACZ,aAAc,EACd,UAAW,EACX,YAAa,EACb,UAAW,EACX,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC,EAEA,QAAI,CAAC,GAAe,CAAC,GAAgB,CAAC,GAAa,CAAC,EACrD,MAAM,IAAI,2BAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQ,EAAK,MAAO,CAAC,EAG5G,YAAO,EAAsB,CACzB,cACA,aACA,eACA,YACA,cACA,YACA,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC",
"debugId": "7BCE735D5E36A5A364756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/service/start.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.start,\n Effect.fn(\"cli.service.start\")(function* () {\n process.stdout.write((yield* (yield* Daemon.Service).start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,MAC5B,EAAG,mBAAmB,EAAE,SAAU,EAAG,CAC1C,QAAQ,OAAO,OAAO,OAAQ,MAAO,EAAO,SAAS,MAAM,GAAK,CAAG,EACpE,CACH",
"debugId": "E65AC75CD30E153864756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/service/status.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.status,\n Effect.fn(\"cli.service.status\")(function* () {\n const url = yield* (yield* Daemon.Service).status()\n process.stdout.write((url ? `running ${url}` : \"stopped\") + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,OAC5B,EAAG,oBAAoB,EAAE,SAAU,EAAG,CAC3C,IAAM,EAAM,OAAQ,MAAO,EAAO,SAAS,OAAO,EAClD,QAAQ,OAAO,OAAO,EAAM,WAAW,IAAQ,WAAa,CAAG,EAChE,CACH",
"debugId": "7228E0E6BBA9A5C664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/stop.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.stop,\n Effect.fn(\"cli.service.stop\")(function* () {\n yield* (yield* Daemon.Service).stop()\n }),\n)\n"
],
"mappings": ";6RAKA,SAAe,SAAQ,aACrB,OAAS,cAAS,aAAQ,SAAS,KAC5B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CACzC,OAAQ,MAAO,EAAO,SAAS,KAAK,EACrC,CACH",
"debugId": "0C774BA179C8814D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "19EFAF2CE770095564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+deepinfra@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/deepinfra/dist/index.mjs"],
"sourcesContent": [
"// src/deepinfra-provider.ts\nimport {\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/deepinfra-image-model.ts\nimport {\n combineHeaders,\n convertBase64ToUint8Array,\n convertToFormData,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n downloadBlob,\n postFormDataToApi,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar DeepInfraImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n aspectRatio,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n if (files != null && files.length > 0) {\n const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({\n url: this.getEditUrl(),\n headers: combineHeaders(this.config.headers(), headers),\n formData: convertToFormData(\n {\n model: this.modelId,\n prompt,\n image: await Promise.all(files.map((file) => fileToBlob(file))),\n mask: mask != null ? await fileToBlob(mask) : void 0,\n n,\n size,\n ...(_d = providerOptions.deepinfra) != null ? _d : {}\n },\n { useArrayBrackets: false }\n ),\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraEditErrorSchema,\n errorToMessage: (error) => {\n var _a2, _b2;\n return (_b2 = (_a2 = error.error) == null ? void 0 : _a2.message) != null ? _b2 : \"Unknown error\";\n }\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraEditResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response2.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders2\n }\n };\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi({\n url: `${this.config.baseURL}/${this.modelId}`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n prompt,\n num_images: n,\n ...aspectRatio && { aspect_ratio: aspectRatio },\n ...splitSize && { width: splitSize[0], height: splitSize[1] },\n ...seed != null && { seed },\n ...(_e = providerOptions.deepinfra) != null ? _e : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraErrorSchema,\n errorToMessage: (error) => error.detail.error\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.images.map(\n (image) => image.replace(/^data:image\\/\\w+;base64,/, \"\")\n ),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n getEditUrl() {\n const baseUrl = this.config.baseURL.replace(\"/inference\", \"/openai\");\n return `${baseUrl}/images/edits`;\n }\n};\nvar deepInfraErrorSchema = z.object({\n detail: z.object({\n error: z.string()\n })\n});\nvar deepInfraImageResponseSchema = z.object({\n images: z.array(z.string())\n});\nvar deepInfraEditErrorSchema = z.object({\n error: z.object({\n message: z.string()\n }).optional()\n});\nvar deepInfraEditResponseSchema = z.object({\n data: z.array(z.object({ b64_json: z.string() }))\n});\nasync function fileToBlob(file) {\n if (file.type === \"url\") {\n return downloadBlob(file.url);\n }\n const data = file.data instanceof Uint8Array ? file.data : convertBase64ToUint8Array(file.data);\n return new Blob([data], { type: file.mediaType });\n}\n\n// src/deepinfra-chat-language-model.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nvar DeepInfraChatLanguageModel = class extends OpenAICompatibleChatLanguageModel {\n constructor(modelId, config) {\n super(modelId, config);\n }\n /**\n * Fixes incorrect token usage for Gemini/Gemma models from DeepInfra.\n *\n * DeepInfra's API returns completion_tokens that don't include reasoning_tokens\n * for Gemini/Gemma models, which violates the OpenAI-compatible spec.\n * According to the spec, completion_tokens should include reasoning_tokens.\n *\n * Example of incorrect data from DeepInfra:\n * {\n * \"completion_tokens\": 84, // text-only tokens\n * \"completion_tokens_details\": {\n * \"reasoning_tokens\": 1081 // reasoning tokens not included above\n * }\n * }\n *\n * This would result in negative text tokens: 84 - 1081 = -997\n *\n * The fix: If reasoning_tokens > completion_tokens, add reasoning_tokens\n * to completion_tokens: 84 + 1081 = 1165\n */\n fixUsageForGeminiModels(usage) {\n var _a, _b;\n if (!usage || !((_a = usage.completion_tokens_details) == null ? void 0 : _a.reasoning_tokens)) {\n return usage;\n }\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = usage.completion_tokens_details.reasoning_tokens;\n if (reasoningTokens > completionTokens) {\n const correctedCompletionTokens = completionTokens + reasoningTokens;\n return {\n ...usage,\n // Add reasoning_tokens to completion_tokens to get the correct total\n completion_tokens: correctedCompletionTokens,\n // Update total_tokens if present\n total_tokens: usage.total_tokens != null ? usage.total_tokens + reasoningTokens : void 0\n };\n }\n return usage;\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const result = await super.doGenerate(options);\n if ((_a = result.usage) == null ? void 0 : _a.raw) {\n const fixedRawUsage = this.fixUsageForGeminiModels(result.usage.raw);\n if (fixedRawUsage !== result.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n return {\n ...result,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n };\n }\n }\n return result;\n }\n async doStream(options) {\n const result = await super.doStream(options);\n const originalStream = result.stream;\n const fixUsage = this.fixUsageForGeminiModels.bind(this);\n const transformedStream = new ReadableStream({\n async start(controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n const reader = originalStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value.type === \"finish\" && ((_a = value.usage) == null ? void 0 : _a.raw)) {\n const fixedRawUsage = fixUsage(value.usage.raw);\n if (fixedRawUsage !== value.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n controller.enqueue({\n ...value,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n });\n } else {\n controller.enqueue(value);\n }\n } else {\n controller.enqueue(value);\n }\n }\n controller.close();\n } catch (error) {\n controller.error(error);\n }\n }\n });\n return {\n ...result,\n stream: transformedStream\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/deepinfra-provider.ts\nfunction createDeepInfra(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.deepinfra.com/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"DEEPINFRA_API_KEY\",\n description: \"DeepInfra's API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/deepinfra/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `deepinfra.${modelType}`,\n url: ({ path }) => `${baseURL}/openai${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new DeepInfraChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new DeepInfraImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL ? `${baseURL}/inference` : \"https://api.deepinfra.com/v1/inference\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.chatModel = createChatModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.languageModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n return provider;\n}\nvar deepinfra = createDeepInfra();\nexport {\n VERSION,\n createDeepInfra,\n deepinfra\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wVAuBA,SAAI,OAAsB,UAAM,MAC9B,gBAAW,CAAC,EAAS,EAAQ,CAC3B,KAAK,QAAU,EACf,KAAK,OAAS,EACd,KAAK,qBAAuB,KAC5B,KAAK,iBAAmB,KAEtB,SAAQ,EAAG,CACb,OAAO,KAAK,OAAO,cAEf,WAAU,EACd,SACA,IACA,OACA,cACA,OACA,kBACA,UACA,cACA,QACA,QACC,CACD,IAAI,EAAI,EAAI,EAAI,EAAI,EACpB,IAAM,EAAW,CAAC,EACZ,GAAe,GAAM,GAAM,EAAK,KAAK,OAAO,YAAc,KAAY,OAAI,EAAG,cAAgB,KAAY,OAAI,EAAG,KAAK,CAAE,IAAM,KAAO,EAAqB,IAAI,KACnK,GAAI,GAAS,MAAQ,EAAM,OAAS,EAAG,CACrC,IAAQ,MAAO,EAAW,gBAAiB,GAAqB,MAAM,EAAkB,CACtF,IAAK,KAAK,WAAW,EACrB,QAAS,EAAe,KAAK,OAAO,QAAQ,EAAG,CAAO,EACtD,SAAU,EACR,CACE,MAAO,KAAK,QACZ,SACA,MAAO,MAAM,QAAQ,IAAI,EAAM,IAAI,CAAC,IAAS,EAAW,CAAI,CAAC,CAAC,EAC9D,KAAM,GAAQ,KAAO,MAAM,EAAW,CAAI,EAAS,OACnD,IACA,WACI,EAAK,EAAgB,YAAc,KAAO,EAAK,CAAC,CACtD,EACA,CAAE,iBAAkB,EAAM,CAC5B,EACA,sBAAuB,EAA+B,CACpD,YAAa,EACb,eAAgB,CAAC,IAAU,CACzB,IAAI,EAAK,EACT,OAAQ,GAAO,EAAM,EAAM,QAAU,KAAY,OAAI,EAAI,UAAY,KAAO,EAAM,gBAEtF,CAAC,EACD,0BAA2B,EACzB,CACF,EACA,cACA,MAAO,KAAK,OAA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,EACjB,MAAO,EAAO,CACd,EAAW,MAAM,CAAK,GAG5B,CAAC,EACD,MAAO,IACF,EACH,OAAQ,CACV,EAEJ,EAGI,EAAiB,SAGrB,SAAS,CAAe,CAAC,EAAU,CAAC,EAAG,CACrC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,8BACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,oBACzB,YAAa,qBACf,CAAC,OACE,EAAQ,OACb,EACA,oBAAoB,GACtB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,aAAa,IACvB,IAAK,EAAG,UAAW,GAAG,WAAiB,IACvC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EACT,EACA,EAAqB,MAAM,CAC7B,GAEI,EAAwB,CAAC,IAAY,IAAI,EAC7C,EACA,EAAqB,YAAY,CACnC,EACM,EAAuB,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAoB,EAAS,IAClE,EAAqB,OAAO,EAC/B,QAAS,EAAU,GAAG,cAAsB,wCAC9C,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EASrD,OARA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,UAAY,EACrB,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,cAAgB,EACzB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EACvB,EAET,IAAI,GAAY,EAAgB",
"debugId": "CA4BB620C8DF7F6864756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "381362BD37C303EF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "CE12D768985069CD64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "90D9404431CE635F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js"],
"sourcesContent": [
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nexport const ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nexport const ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nexport const ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = new Set([\"localhost\", \"127.0.0.1\"]);\nconst GREENGRASS_PROTOCOLS = new Set([\"http:\", \"https:\"]);\nconst getCmdsUri = async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n let parsed;\n try {\n parsed = new URL(process.env[ENV_CMDS_FULL_URI]);\n }\n catch {\n throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });\n }\n if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {\n throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger,\n });\n }\n if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {\n throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger,\n });\n }\n return {\n protocol: parsed.protocol,\n hostname: parsed.hostname,\n path: parsed.pathname + parsed.search,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", {\n tryNextLink: false,\n logger,\n });\n};\n",
"export const isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nexport const fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...(creds.AccountId && { accountId: creds.AccountId }),\n});\n",
"export const DEFAULT_TIMEOUT = 1000;\nexport const DEFAULT_MAX_RETRIES = 0;\nexport const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n",
"import { request } from \"node:http\";\nimport { ProviderError } from \"@smithy/core/config\";\nexport function httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = request({\n method: \"GET\",\n ...options,\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n",
"export const retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\n",
"import { CredentialsProviderError, loadConfig } from \"@smithy/core/config\";\nimport { InstanceMetadataV1FallbackError } from \"./error/InstanceMetadataV1FallbackError\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nimport { getInstanceMetadataEndpoint } from \"./utils/getInstanceMetadataEndpoint\";\nimport { staticStabilityProvider } from \"./utils/staticStabilityProvider\";\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport class InstanceMetadataV1FallbackError extends CredentialsProviderError {\n tryNextLink;\n name = \"InstanceMetadataV1FallbackError\";\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);\n }\n}\n",
"import { loadConfig } from \"@smithy/core/config\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { Endpoint as InstanceMetadataEndpoint } from \"../config/Endpoint\";\nimport { ENDPOINT_CONFIG_OPTIONS } from \"../config/EndpointConfigOptions\";\nimport { EndpointMode } from \"../config/EndpointMode\";\nimport { ENDPOINT_MODE_CONFIG_OPTIONS, } from \"../config/EndpointModeConfigOptions\";\nexport const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nconst getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return InstanceMetadataEndpoint.IPv4;\n case EndpointMode.IPv6:\n return InstanceMetadataEndpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);\n }\n};\n",
"export var Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint || (Endpoint = {}));\n",
"export const ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nexport const CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nexport const ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n",
"export var EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n",
"import { EndpointMode } from \"./EndpointMode\";\nexport const ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nexport const CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nexport const ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode.IPv4,\n};\n",
"const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nconst STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nconst STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nexport const getExtendedInstanceMetadataCredentials = (credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS +\n Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1000);\n logger.warn(\"Attempting credential expiration extension due to a credential service availability issue. A refresh of these \" +\n `credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: ` +\n STATIC_STABILITY_DOC_URL);\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...(originalExpiration ? { originalExpiration } : {}),\n expiration: newExpiration,\n };\n};\n",
"import { getExtendedInstanceMetadataCredentials } from \"./getExtendedInstanceMetadataCredentials\";\nexport const staticStabilityProvider = (provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n }\n catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n }\n else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n};\n"
],
"mappings": ";kJAAA,oBCAO,SAAM,EAAoB,CAAC,IAAQ,QAAQ,CAAG,GACjD,OAAO,IAAQ,UACf,OAAO,EAAI,cAAgB,UAC3B,OAAO,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CAAC,EAEA,QAAI,EAAM,UAAY,gBAAkB,CAAC,IAAK,IAAK,GAAG,EAAE,SAAS,EAAM,UAAU,EAClF,EAAoB,GAGxB,OADA,GAAQ,MAAM,4BAA6B,6BAA6B,EACjE,EAAe,EAAY,IAAK,EAAU,SAAQ,CAAC,EAE9D,OAAO,EAAe,EAAY,IAC3B,EACH,QAAS,EACJ,GAA2B,CAChC,EACA,SACJ,CAAC,KAIP,GAAmB,MAAO,IAAY,EAAY,IACjD,EACH,KAAM,GACN,OAAQ,MACR,QAAS,CACL,uCAAwC,OAC5C,CACJ,CAAC,EACK,GAAa,MAAO,KAAa,MAAM,EAAY,IAAK,EAAS,KAAM,CAAU,CAAC,GAAG,SAAS,EAC9F,GAA4B,MAAO,EAAS,EAAS,IAAS,CAChE,IAAM,EAAsB,KAAK,OAAO,MAAM,EAAY,IACnD,EACH,KAAM,EAAY,CACtB,CAAC,GAAG,SAAS,CAAC,EACd,GAAI,CAAC,EAAkB,CAAmB,EACtC,MAAM,IAAI,2BAAyB,4DAA6D,CAC5F,OAAQ,EAAK,MACjB,CAAC,EAEL,OAAO,EAAoB,CAAmB",
"debugId": "5B22FB13A7395CA064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst process = require(\"process\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const args = 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n try {\n const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-win.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,eACA,MACA,MACN,eAAe,CAAY,EAAG,CAE1B,IAAI,EAAU,8BACd,GAAI,EAAQ,OAAS,QAAU,2BAA4B,EAAQ,IAC/D,EAAU,mCAAqC,EAEnD,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,GAAG,8EAAiB,GAC/C,OAAO,MAAM,QAAQ,EAC1C,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,KAAK,EAG7B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "58814DE9DD0F694364756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

+1
-1
{
"name": "@opencode-ai/cli-linux-arm64",
"version": "0.0.0-beta-202607171635",
"version": "0.0.0-beta-202607171732",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/debug/agents.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.debug.commands.agents,\n Effect.fn(\"cli.debug.agents\")(function* () {\n const daemon = yield* Daemon.Service\n const client = yield* daemon.client()\n const response = yield* Effect.promise(() => client.v2.agent.list({ location: { directory: process.cwd() } }))\n process.stdout.write(\n JSON.stringify(\n response.data?.data.toSorted((a, b) => a.id.localeCompare(b.id)),\n null,\n 2,\n ) + EOL,\n )\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,MAAM,SAAS,OAC1B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CAEzC,IAAM,EAAS,OADA,MAAO,EAAO,SACA,OAAO,EAC9B,EAAW,MAAc,EAAQ,IAAM,EAAO,GAAG,MAAM,KAAK,CAAE,SAAU,CAAE,UAAW,QAAQ,IAAI,CAAE,CAAE,CAAC,CAAC,EAC7G,QAAQ,OAAO,MACb,KAAK,UACH,EAAS,MAAM,KAAK,SAAS,CAAC,EAAG,IAAM,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC,EAC/D,KACA,CACF,EAAI,CACN,EACD,CACH",
"debugId": "4AAE57BEA02041B664756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+togetherai@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/togetherai/dist/index.mjs"],
"sourcesContent": [
"// src/togetherai-provider.ts\nimport {\n OpenAICompatibleChatLanguageModel,\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-model.ts\nimport {\n combineHeaders,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar togetheraiErrorSchema = lazySchema(\n () => zodSchema(\n z.object({\n error: z.object({\n message: z.string()\n })\n })\n )\n);\nvar togetheraiRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z.object({\n id: z.string().nullish(),\n model: z.string().nullish(),\n results: z.array(\n z.object({\n index: z.number(),\n relevance_score: z.number()\n })\n ),\n usage: z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number()\n })\n })\n )\n);\n\n// src/reranking/togetherai-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar togetheraiRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z2.object({\n rankFields: z2.array(z2.string()).optional()\n })\n )\n);\n\n// src/reranking/togetherai-reranking-model.ts\nvar TogetherAIRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // see https://docs.together.ai/reference/rerank-1\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a, _b;\n const rerankingOptions = await parseProviderOptions({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiRerankingModelOptionsSchema\n });\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n model: this.modelId,\n documents: documents.values,\n query,\n top_n: topN,\n rank_fields: rerankingOptions == null ? void 0 : rerankingOptions.rankFields,\n return_documents: false\n // reduce response size\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: togetheraiErrorSchema,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler(\n togetheraiRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n modelId: (_b = response.model) != null ? _b : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/togetherai-image-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertImageModelFileToDataUri,\n createJsonResponseHandler as createJsonResponseHandler2,\n createJsonErrorResponseHandler as createJsonErrorResponseHandler2,\n lazySchema as lazySchema3,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2,\n zodSchema as zodSchema3\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\nvar TogetherAIImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c;\n const warnings = [];\n if (mask != null) {\n throw new Error(\n \"Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.\"\n );\n }\n if (size != null) {\n warnings.push({\n type: \"unsupported\",\n feature: \"aspectRatio\",\n details: \"This model does not support the `aspectRatio` option. Use `size` instead.\"\n });\n }\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const togetheraiOptions = await parseProviderOptions2({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiImageModelOptionsSchema\n });\n let imageUrl;\n if (files != null && files.length > 0) {\n imageUrl = convertImageModelFileToDataUri(files[0]);\n if (files.length > 1) {\n warnings.push({\n type: \"other\",\n message: \"Together AI only supports a single input image. Additional images are ignored.\"\n });\n }\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi2({\n url: `${this.config.baseURL}/images/generations`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n prompt,\n seed,\n ...n > 1 ? { n } : {},\n ...splitSize && {\n width: parseInt(splitSize[0]),\n height: parseInt(splitSize[1])\n },\n ...imageUrl != null ? { image_url: imageUrl } : {},\n response_format: \"base64\",\n ...togetheraiOptions != null ? togetheraiOptions : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler2({\n errorSchema: togetheraiErrorSchema2,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler2(\n togetheraiImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n};\nvar togetheraiImageResponseSchema = z3.object({\n data: z3.array(\n z3.object({\n b64_json: z3.string()\n })\n )\n});\nvar togetheraiErrorSchema2 = z3.object({\n error: z3.object({\n message: z3.string()\n })\n});\nvar togetheraiImageModelOptionsSchema = lazySchema3(\n () => zodSchema3(\n z3.object({\n /**\n * Number of generation steps. Higher values can improve quality.\n */\n steps: z3.number().nullish(),\n /**\n * Guidance scale for image generation.\n */\n guidance: z3.number().nullish(),\n /**\n * Negative prompt to guide what to avoid.\n */\n negative_prompt: z3.string().nullish(),\n /**\n * Disable the safety checker for image generation.\n * When true, the API will not reject images flagged as potentially NSFW.\n * Not available for Flux Schnell Free and Flux Pro models.\n */\n disable_safety_checker: z3.boolean().nullish()\n }).passthrough()\n )\n);\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/togetherai-provider.ts\nfunction loadDeprecatedApiKey() {\n if (typeof process === \"undefined\") {\n return void 0;\n }\n if (typeof process.env.TOGETHER_API_KEY === \"string\") {\n return void 0;\n }\n const key = process.env.TOGETHER_AI_API_KEY;\n if (typeof key === \"string\") {\n console.warn(\n \"TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.\"\n );\n }\n return key;\n}\nfunction createTogetherAI(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.together.xyz/v1/\"\n );\n const getHeaders = () => {\n var _a2;\n return withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: (_a2 = options.apiKey) != null ? _a2 : loadDeprecatedApiKey(),\n environmentVariableName: \"TOGETHER_API_KEY\",\n description: \"TogetherAI\"\n })}`,\n ...options.headers\n },\n `ai-sdk/togetherai/${VERSION}`\n );\n };\n const getCommonModelConfig = (modelType) => ({\n provider: `togetherai.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new TogetherAIImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const createRerankingModel = (modelId) => new TogetherAIRerankingModel(modelId, {\n ...getCommonModelConfig(\"reranking\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.languageModel = createChatModel;\n provider.chatModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n return provider;\n}\nvar togetherai = createTogetherAI();\nexport {\n VERSION,\n createTogetherAI,\n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AAS,CAAgB,CAAC,EAAU,CAAC,EAAG,CACtC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,8BACxC,EACM,EAAa,IAAM,CACvB,IAAI,EACJ,OAAO,EACL,CACE,cAAe,UAAU,EAAW,CAClC,QAAS,EAAM,EAAQ,SAAW,KAAO,EAAM,EAAqB,EACpE,wBAAyB,mBACzB,YAAa,YACf,CAAC,OACE,EAAQ,OACb,EACA,qBAAqB,GACvB,GAEI,EAAuB,CAAC,KAAe,CAC3C,SAAU,cAAc,IACxB,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EACT,EACA,EAAqB,MAAM,CAC7B,GAEI,EAAwB,CAAC,IAAY,IAAI,EAC7C,EACA,EAAqB,YAAY,CACnC,EACM,EAAuB,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAqB,EAAS,IACnE,EAAqB,OAAO,EAC/B,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAyB,EAAS,IAC3E,EAAqB,WAAW,EACnC,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EAWrD,OAVA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EAC9B,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,UAAY,EACrB,EAAS,eAAiB,EACnB,EAET,IAAI,GAAa,EAAiB",
"debugId": "E2674265B92191A864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"cognito-identity\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetCredentialsForIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n case \"GetId\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"cognito-identity\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { [m]: \"Region\" }, k = {}, l = [j];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [g, [{ fn: f, argv: [i, \"name\"] }, \"aws\"]],\n [g, [j, \"us-east-1\"]],\n [g, [j, \"us-east-2\"]],\n [g, [j, \"us-west-1\"]],\n [g, [j, \"us-west-2\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://cognito-identity-fips.us-east-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-east-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://cognito-identity.{Region}.amazonaws.com\", k],\n [\"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 17,\n 3,\n 1,\n 4,\n r + 16,\n 2,\n 5,\n r + 16,\n 3,\n 9,\n 6,\n 5,\n 7,\n r + 15,\n 6,\n 8,\n r + 14,\n 7,\n r + 12,\n r + 13,\n 4,\n 11,\n 10,\n 5,\n r + 9,\n r + 11,\n 5,\n 12,\n r + 10,\n 6,\n 13,\n r + 9,\n 8,\n r + 4,\n 14,\n 9,\n r + 5,\n 15,\n 10,\n r + 6,\n 16,\n 11,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 18,\n 5,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass CognitoIdentityServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);\n }\n}\n\nclass ExternalServiceException extends CognitoIdentityServiceException {\n name = \"ExternalServiceException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ExternalServiceException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExternalServiceException.prototype);\n }\n}\nclass InternalErrorException extends CognitoIdentityServiceException {\n name = \"InternalErrorException\";\n $fault = \"server\";\n constructor(opts) {\n super({\n name: \"InternalErrorException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalErrorException.prototype);\n }\n}\nclass InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {\n name = \"InvalidIdentityPoolConfigurationException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidIdentityPoolConfigurationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);\n }\n}\nclass InvalidParameterException extends CognitoIdentityServiceException {\n name = \"InvalidParameterException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidParameterException.prototype);\n }\n}\nclass NotAuthorizedException extends CognitoIdentityServiceException {\n name = \"NotAuthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotAuthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotAuthorizedException.prototype);\n }\n}\nclass ResourceConflictException extends CognitoIdentityServiceException {\n name = \"ResourceConflictException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceConflictException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceConflictException.prototype);\n }\n}\nclass ResourceNotFoundException extends CognitoIdentityServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends CognitoIdentityServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass LimitExceededException extends CognitoIdentityServiceException {\n name = \"LimitExceededException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LimitExceededException.prototype);\n }\n}\n\nconst _AI = \"AccountId\";\nconst _AKI = \"AccessKeyId\";\nconst _C = \"Credentials\";\nconst _CRA = \"CustomRoleArn\";\nconst _E = \"Expiration\";\nconst _ESE = \"ExternalServiceException\";\nconst _GCFI = \"GetCredentialsForIdentity\";\nconst _GCFII = \"GetCredentialsForIdentityInput\";\nconst _GCFIR = \"GetCredentialsForIdentityResponse\";\nconst _GI = \"GetId\";\nconst _GII = \"GetIdInput\";\nconst _GIR = \"GetIdResponse\";\nconst _IEE = \"InternalErrorException\";\nconst _II = \"IdentityId\";\nconst _IIPCE = \"InvalidIdentityPoolConfigurationException\";\nconst _IPE = \"InvalidParameterException\";\nconst _IPI = \"IdentityPoolId\";\nconst _IPT = \"IdentityProviderToken\";\nconst _L = \"Logins\";\nconst _LEE = \"LimitExceededException\";\nconst _LM = \"LoginsMap\";\nconst _NAE = \"NotAuthorizedException\";\nconst _RCE = \"ResourceConflictException\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SK = \"SecretKey\";\nconst _SKS = \"SecretKeyString\";\nconst _ST = \"SessionToken\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _hE = \"httpError\";\nconst _m = \"message\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity\";\nconst _se = \"server\";\nconst n0 = \"com.amazonaws.cognitoidentity\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar CognitoIdentityServiceException$ = [-3, _s, \"CognitoIdentityServiceException\", 0, [], []];\n_s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar ExternalServiceException$ = [-3, n0, _ESE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(ExternalServiceException$, ExternalServiceException);\nvar InternalErrorException$ = [-3, n0, _IEE, { [_e]: _se }, [_m], [0]];\nn0_registry.registerError(InternalErrorException$, InternalErrorException);\nvar InvalidIdentityPoolConfigurationException$ = [\n -3,\n n0,\n _IIPCE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0],\n];\nn0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);\nvar InvalidParameterException$ = [-3, n0, _IPE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(InvalidParameterException$, InvalidParameterException);\nvar LimitExceededException$ = [-3, n0, _LEE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(LimitExceededException$, LimitExceededException);\nvar NotAuthorizedException$ = [-3, n0, _NAE, { [_e]: _c, [_hE]: 403 }, [_m], [0]];\nn0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);\nvar ResourceConflictException$ = [-3, n0, _RCE, { [_e]: _c, [_hE]: 409 }, [_m], [0]];\nn0_registry.registerError(ResourceConflictException$, ResourceConflictException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar IdentityProviderToken = [0, n0, _IPT, 8, 0];\nvar SecretKeyString = [0, n0, _SKS, 8, 0];\nvar Credentials$ = [\n 3,\n n0,\n _C,\n 0,\n [_AKI, _SK, _ST, _E],\n [0, [() => SecretKeyString, 0], 0, 4],\n];\nvar GetCredentialsForIdentityInput$ = [\n 3,\n n0,\n _GCFII,\n 0,\n [_II, _L, _CRA],\n [0, [() => LoginsMap, 0], 0],\n 1,\n];\nvar GetCredentialsForIdentityResponse$ = [\n 3,\n n0,\n _GCFIR,\n 0,\n [_II, _C],\n [0, [() => Credentials$, 0]],\n];\nvar GetIdInput$ = [3, n0, _GII, 0, [_IPI, _AI, _L], [0, 0, [() => LoginsMap, 0]], 1];\nvar GetIdResponse$ = [3, n0, _GIR, 0, [_II], [0]];\nvar LoginsMap = [2, n0, _LM, 0, [0, 0], [() => IdentityProviderToken, 0]];\nvar GetCredentialsForIdentity$ = [\n 9,\n n0,\n _GCFI,\n 0,\n () => GetCredentialsForIdentityInput$,\n () => GetCredentialsForIdentityResponse$,\n];\nvar GetId$ = [9, n0, _GI, 0, () => GetIdInput$, () => GetIdResponse$];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2014-06-30\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCognitoIdentityHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsJson1_1Protocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.cognitoidentity\",\n errorTypeRegistries,\n xmlNamespace: \"http://cognito-identity.amazonaws.com/doc/2014-06-30/\",\n version: \"2014-06-30\",\n serviceTarget: \"AWSCognitoIdentityService\",\n },\n serviceId: config?.serviceId ?? \"Cognito Identity\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass CognitoIdentityClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass GetCredentialsForIdentityCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSCognitoIdentityService\", \"GetCredentialsForIdentity\", {})\n .n(\"CognitoIdentityClient\", \"GetCredentialsForIdentityCommand\")\n .sc(GetCredentialsForIdentity$)\n .build() {\n}\n\nclass GetIdCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSCognitoIdentityService\", \"GetId\", {})\n .n(\"CognitoIdentityClient\", \"GetIdCommand\")\n .sc(GetId$)\n .build() {\n}\n\nconst commands = {\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n};\nclass CognitoIdentity extends CognitoIdentityClient {\n}\nclient.createAggregatedClient(commands, CognitoIdentity);\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.CognitoIdentity = CognitoIdentity;\nexports.CognitoIdentityClient = CognitoIdentityClient;\nexports.CognitoIdentityServiceException = CognitoIdentityServiceException;\nexports.CognitoIdentityServiceException$ = CognitoIdentityServiceException$;\nexports.Credentials$ = Credentials$;\nexports.ExternalServiceException = ExternalServiceException;\nexports.ExternalServiceException$ = ExternalServiceException$;\nexports.GetCredentialsForIdentity$ = GetCredentialsForIdentity$;\nexports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand;\nexports.GetCredentialsForIdentityInput$ = GetCredentialsForIdentityInput$;\nexports.GetCredentialsForIdentityResponse$ = GetCredentialsForIdentityResponse$;\nexports.GetId$ = GetId$;\nexports.GetIdCommand = GetIdCommand;\nexports.GetIdInput$ = GetIdInput$;\nexports.GetIdResponse$ = GetIdResponse$;\nexports.InternalErrorException = InternalErrorException;\nexports.InternalErrorException$ = InternalErrorException$;\nexports.InvalidIdentityPoolConfigurationException = InvalidIdentityPoolConfigurationException;\nexports.InvalidIdentityPoolConfigurationException$ = InvalidIdentityPoolConfigurationException$;\nexports.InvalidParameterException = InvalidParameterException;\nexports.InvalidParameterException$ = InvalidParameterException$;\nexports.LimitExceededException = LimitExceededException;\nexports.LimitExceededException$ = LimitExceededException$;\nexports.NotAuthorizedException = NotAuthorizedException;\nexports.NotAuthorizedException$ = NotAuthorizedException$;\nexports.ResourceConflictException = ResourceConflictException;\nexports.ResourceConflictException$ = ResourceConflictException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAyD,MAAO,EAAQ,EAAS,IAAU,CAC7F,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,mBACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,CAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAA+C,CAAC,IAAmB,CACrE,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,4BAA6B,CAC9B,EAAQ,KAAK,EAAoC,CAAC,EAClD,KACJ,KACK,QAAS,CACV,EAAQ,KAAK,EAAoC,CAAC,EAClD,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEL,GAA8B,CAAC,IAAW,CAC5C,IAAM,EAAW,EAAgB,yBAAyB,CAAM,EAChE,OAAO,OAAO,OAAO,EAAU,CAC3B,qBAAsB,EAAO,kBAAkB,EAAO,sBAAwB,CAAC,CAAC,CACpF,CAAC,GAGC,GAAkC,CAAC,IAAY,CACjD,OAAO,OAAO,OAAO,EAAS,CAC1B,qBAAsB,EAAQ,sBAAwB,GACtD,gBAAiB,EA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B,CAAC,CAAC,EAC9D,EAAE,wBAAyB,kCAAkC,EAC7D,GAAG,EAA0B,EAC7B,MAAM,CAAE,CACb,CAEA,MAAM,UAAqB,EAAO,QAC7B,aAAa,EACb,GAAG,CAAY,EACf,EAAE,QAAS,CAAC,EAAS,EAAI,EAAQ,EAAG,CACrC,MAAO,CAAC,EAAU,kBAAkB,EAAQ,EAAQ,iCAAiC,CAAC,CAAC,EAC1F,EACI,EAAE,4BAA6B,QAAS,CAAC,CAAC,EAC1C,EAAE,wBAAyB,cAAc,EACzC,GAAG,EAAM,EACT,MAAM,CAAE,CACb,CAEA,IAAM,GAAW,CACb,mCACA,cACJ,EACA,MAAM,WAAwB,CAAsB,CACpD,CACA,EAAO,uBAAuB,GAAU,EAAe,EAEvD,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EAEnB,IAAQ,GAAwB,EAOhC,IAAQ,GAAmC,EAI3C,IAAQ,GAAe",
"debugId": "1B4B38F05813029964756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "466DE1B6C8B09AB964756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"signin\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSigninHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateOAuth2Token\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { fn: f, argv: [i, \"name\"] }, k = {}, l = [{ [m]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [g, [j, \"aws\"]],\n [g, [j, \"aws-cn\"]],\n [g, [j, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://{Region}.signin.aws.amazon.com\", k],\n [\"https://{Region}.signin.amazonaws.cn\", k],\n [\"https://{Region}.signin.amazonaws-us-gov.com\", k],\n [\"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://signin.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 15,\n 3,\n 1,\n 4,\n r + 14,\n 2,\n 5,\n r + 14,\n 3,\n 11,\n 6,\n 4,\n 10,\n 7,\n 7,\n r + 4,\n 8,\n 8,\n r + 5,\n 9,\n 9,\n r + 6,\n r + 13,\n 5,\n r + 11,\n r + 12,\n 4,\n 13,\n 12,\n 6,\n r + 9,\n r + 10,\n 5,\n 14,\n r + 8,\n 6,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 16,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SigninServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SigninServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SigninServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n }\n}\nclass InternalServerException extends SigninServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n }\n}\nclass TooManyRequestsError extends SigninServiceException {\n name = \"TooManyRequestsError\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"TooManyRequestsError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsError.prototype);\n this.error = opts.error;\n }\n}\nclass ValidationException extends SigninServiceException {\n name = \"ValidationException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n this.error = opts.error;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _AT = \"AccessToken\";\nconst _COAT = \"CreateOAuth2Token\";\nconst _COATR = \"CreateOAuth2TokenRequest\";\nconst _COATRB = \"CreateOAuth2TokenRequestBody\";\nconst _COATRBr = \"CreateOAuth2TokenResponseBody\";\nconst _COATRr = \"CreateOAuth2TokenResponse\";\nconst _ISE = \"InternalServerException\";\nconst _RT = \"RefreshToken\";\nconst _TMRE = \"TooManyRequestsError\";\nconst _VE = \"ValidationException\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _jN = \"jsonName\";\nconst _m = \"message\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.signin\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _se = \"server\";\nconst _tI = \"tokenInput\";\nconst _tO = \"tokenOutput\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.signin\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SigninServiceException$ = [-3, _s, \"SigninServiceException\", 0, [], []];\n_s_registry.registerError(SigninServiceException$, SigninServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);\nvar ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(ValidationException$, ValidationException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar AccessToken$ = [\n 3,\n n0,\n _AT,\n 8,\n [_aKI, _sAK, _sT],\n [\n [0, { [_jN]: _aKI }],\n [0, { [_jN]: _sAK }],\n [0, { [_jN]: _sT }],\n ],\n 3,\n];\nvar CreateOAuth2TokenRequest$ = [\n 3,\n n0,\n _COATR,\n 0,\n [_tI],\n [[() => CreateOAuth2TokenRequestBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenRequestBody$ = [\n 3,\n n0,\n _COATRB,\n 0,\n [_cI, _gT, _co, _rU, _cV, _rT],\n [\n [0, { [_jN]: _cI }],\n [0, { [_jN]: _gT }],\n 0,\n [0, { [_jN]: _rU }],\n [0, { [_jN]: _cV }],\n [() => RefreshToken, { [_jN]: _rT }],\n ],\n 2,\n];\nvar CreateOAuth2TokenResponse$ = [\n 3,\n n0,\n _COATRr,\n 0,\n [_tO],\n [[() => CreateOAuth2TokenResponseBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenResponseBody$ = [\n 3,\n n0,\n _COATRBr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [\n [() => AccessToken$, { [_jN]: _aT }],\n [0, { [_jN]: _tT }],\n [1, { [_jN]: _eI }],\n [() => RefreshToken, { [_jN]: _rT }],\n [0, { [_jN]: _iT }],\n ],\n 4,\n];\nvar CreateOAuth2Token$ = [\n 9,\n n0,\n _COAT,\n { [_h]: [\"POST\", \"/v1/token\", 200] },\n () => CreateOAuth2TokenRequest$,\n () => CreateOAuth2TokenResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2023-01-01\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.signin\",\n errorTypeRegistries,\n version: \"2023-01-01\",\n serviceTarget: \"Signin\",\n },\n serviceId: config?.serviceId ?? \"Signin\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SigninClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateOAuth2TokenCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"Signin\", \"CreateOAuth2Token\", {})\n .n(\"SigninClient\", \"CreateOAuth2TokenCommand\")\n .sc(CreateOAuth2Token$)\n .build() {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n};\nclass Signin extends SigninClient {\n}\nclient.createAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n SERVER_ERROR: \"server_error\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessToken$ = AccessToken$;\nexports.CreateOAuth2Token$ = CreateOAuth2Token$;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$;\nexports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$;\nexports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$;\nexports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\nexports.SigninServiceException = SigninServiceException;\nexports.SigninServiceException$ = SigninServiceException$;\nexports.TooManyRequestsError = TooManyRequestsError;\nexports.TooManyRequestsError$ = TooManyRequestsError$;\nexports.ValidationException = ValidationException;\nexports.ValidationException$ = ValidationException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAgD,MAAO,EAAQ,EAAS,IAAU,CACpF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,SACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAAsC,CAAC,IAAmB,CAC5D,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,oBAAqB,CACtB,EAAQ,KAAK,GAAoC,CAAC,EAClD,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEL,GAA8B,CAAC,IAAW,CAC5C,IAAM,EAAW,EAAgB,yBAAyB,CAAM,EAChE,OAAO,OAAO,OAAO,EAAU,CAC3B,qBAAsB,EAAO,kBAAkB,EAAO,sBAAwB,CAAC,CAAC,CACpF,CAAC,GAGC,GAAkC,CAAC,IAAY,CACjD,OAAO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I,EAAE,SAAU,oBAAqB,CAAC,CAAC,EACnC,EAAE,eAAgB,0BAA0B,EAC5C,GAAG,EAAkB,EACrB,MAAM,CAAE,CACb,CAEA,IAAM,GAAW,CACb,0BACJ,EACA,MAAM,UAAe,CAAa,CAClC,CACA,EAAO,uBAAuB,GAAU,CAAM,EAE9C,IAAM,GAAkB,CACpB,iBAAkB,mBAClB,yBAA0B,2BAC1B,gBAAiB,kBACjB,aAAc,eACd,cAAe,gBACf,yBAA0B,0BAC9B,EAEA,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EACX,GAAwB,EACxB,GAAyB,GACzB,GAAe,GACf,GAAqB,GACrB,GAA2B,EAC3B,GAA4B,GAC5B,GAAgC,GAChC,GAA6B,GAC7B,GAAiC,GACjC,GAA0B,EAC1B,GAA2B,GAC3B,GAAkB,GAClB,GAAS,EACT,GAAe,EACf,GAAyB,EACzB,GAA0B,GAC1B,GAAuB,EACvB,GAAwB,GACxB,GAAsB,EACtB,GAAuB,GACvB,GAAsB",
"debugId": "F58A67FB5DBAE03164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/start.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.start,\n Effect.fn(\"cli.service.start\")(function* () {\n process.stdout.write((yield* (yield* Daemon.Service).start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,MAC5B,EAAG,mBAAmB,EAAE,SAAU,EAAG,CAC1C,QAAQ,OAAO,OAAO,OAAQ,MAAO,EAAO,SAAS,MAAM,GAAK,CAAG,EACpE,CACH",
"debugId": "E65AC75CD30E153864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://portal.sso.{Region}.amazonaws.com\", i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 13,\n 3,\n 1,\n 4,\n r + 12,\n 2,\n 5,\n r + 12,\n 3,\n 8,\n 6,\n 4,\n 7,\n r + 11,\n 5,\n r + 9,\n r + 10,\n 4,\n 11,\n 9,\n 6,\n 10,\n r + 8,\n 7,\n r + 6,\n r + 7,\n 5,\n 12,\n r + 5,\n 6,\n r + 4,\n r + 5,\n 3,\n r + 1,\n 14,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SSOServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOServiceException.prototype);\n }\n}\n\nclass InvalidRequestException extends SSOServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n }\n}\nclass ResourceNotFoundException extends SSOServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends SSOServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass UnauthorizedException extends SSOServiceException {\n name = \"UnauthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedException.prototype);\n }\n}\n\nconst _ATT = \"AccessTokenType\";\nconst _GRC = \"GetRoleCredentials\";\nconst _GRCR = \"GetRoleCredentialsRequest\";\nconst _GRCRe = \"GetRoleCredentialsResponse\";\nconst _IRE = \"InvalidRequestException\";\nconst _RC = \"RoleCredentials\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SAKT = \"SecretAccessKeyType\";\nconst _STT = \"SessionTokenType\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _UE = \"UnauthorizedException\";\nconst _aI = \"accountId\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _ex = \"expiration\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hQ = \"httpQuery\";\nconst _m = \"message\";\nconst _rC = \"roleCredentials\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.sso\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\nconst n0 = \"com.amazonaws.sso\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SSOServiceException$ = [-3, _s, \"SSOServiceException\", 0, [], []];\n_s_registry.registerError(SSOServiceException$, SSOServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nvar UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];\nn0_registry.registerError(UnauthorizedException$, UnauthorizedException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar AccessTokenType = [0, n0, _ATT, 8, 0];\nvar SecretAccessKeyType = [0, n0, _SAKT, 8, 0];\nvar SessionTokenType = [0, n0, _STT, 8, 0];\nvar GetRoleCredentialsRequest$ = [\n 3,\n n0,\n _GRCR,\n 0,\n [_rN, _aI, _aT],\n [\n [0, { [_hQ]: _rn }],\n [0, { [_hQ]: _ai }],\n [() => AccessTokenType, { [_hH]: _xasbt }],\n ],\n 3,\n];\nvar GetRoleCredentialsResponse$ = [\n 3,\n n0,\n _GRCRe,\n 0,\n [_rC],\n [[() => RoleCredentials$, 0]],\n];\nvar RoleCredentials$ = [\n 3,\n n0,\n _RC,\n 0,\n [_aKI, _sAK, _sT, _ex],\n [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],\n];\nvar GetRoleCredentials$ = [\n 9,\n n0,\n _GRC,\n { [_h]: [\"GET\", \"/federation/credentials\", 200] },\n () => GetRoleCredentialsRequest$,\n () => GetRoleCredentialsResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.sso\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"SWBPortalService\",\n },\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass GetRoleCredentialsCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"SWBPortalService\", \"GetRoleCredentials\", {})\n .n(\"SSOClient\", \"GetRoleCredentialsCommand\")\n .sc(GetRoleCredentials$)\n .build() {\n}\n\nconst commands = {\n GetRoleCredentialsCommand,\n};\nclass SSO extends SSOClient {\n}\nclient.createAggregatedClient(commands, SSO);\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.GetRoleCredentials$ = GetRoleCredentials$;\nexports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;\nexports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;\nexports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.RoleCredentials$ = RoleCredentials$;\nexports.SSO = SSO;\nexports.SSOClient = SSOClient;\nexports.SSOServiceException = SSOServiceException;\nexports.SSOServiceException$ = SSOServiceException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.UnauthorizedException = UnauthorizedException;\nexports.UnauthorizedException$ = UnauthorizedException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAA6C,MAAO,EAAQ,EAAS,IAAU,CACjF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAy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,EASpC,IAAQ,EAAY",
"debugId": "D1BC127F0A6FB6ED64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+groq@3.0.31+d6123d32214422cb/node_modules/@ai-sdk/groq/dist/index.mjs"],
"sourcesContent": [
"// src/groq-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/groq-chat-language-model.ts\nimport {\n InvalidResponseDataError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n isParsableJson,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-groq-usage.ts\nfunction convertGroqUsage(usage) {\n var _a, _b, _c, _d;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_d = (_c = usage.completion_tokens_details) == null ? void 0 : _c.reasoning_tokens) != null ? _d : void 0;\n const textTokens = reasoningTokens != null ? completionTokens - reasoningTokens : completionTokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: textTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-groq-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToGroqChatMessages(prompt) {\n var _a;\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n if (content.length === 1 && content[0].type === \"text\") {\n messages.push({ role: \"user\", content: content[0].text });\n break;\n }\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (!part.mediaType.startsWith(\"image/\")) {\n throw new UnsupportedFunctionalityError({\n functionality: \"Non-image file content parts\"\n });\n }\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: {\n url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`\n }\n };\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n let reasoning = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n // groq supports reasoning for tool-calls in multi-turn conversations\n // https://github.com/vercel/ai/issues/7860\n case \"reasoning\": {\n reasoning += part.text;\n break;\n }\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n ...reasoning.length > 0 ? { reasoning } : null,\n ...toolCalls.length > 0 ? { tool_calls: toolCalls } : null\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/groq-chat-options.ts\nimport { z } from \"zod/v4\";\nvar groqLanguageModelOptions = z.object({\n reasoningFormat: z.enum([\"parsed\", \"raw\", \"hidden\"]).optional(),\n /**\n * Specifies the reasoning effort level for model inference.\n * @see https://console.groq.com/docs/reasoning#reasoning-effort\n */\n reasoningEffort: z.enum([\"none\", \"default\", \"low\", \"medium\", \"high\"]).optional(),\n /**\n * Whether to enable parallel function calling during tool use. Default to true.\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * A unique identifier representing your end-user, which can help OpenAI to\n * monitor and detect abuse. Learn more.\n */\n user: z.string().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n * When true, the model uses constrained decoding to guarantee schema compliance.\n * Only used when structured outputs are enabled and a schema is provided.\n *\n * @default true\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Service tier for the request.\n * - 'on_demand': Default tier with consistent performance and fairness\n * - 'flex': Higher throughput tier optimized for workloads that can handle occasional request failures\n * - 'auto': Uses on_demand rate limits, then falls back to flex tier if exceeded\n *\n * @default 'on_demand'\n */\n serviceTier: z.enum([\"on_demand\", \"flex\", \"auto\"]).optional()\n});\n\n// src/groq-error.ts\nimport { z as z2 } from \"zod/v4\";\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nvar groqErrorDataSchema = z2.object({\n error: z2.object({\n message: z2.string(),\n type: z2.string()\n })\n});\nvar groqFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: groqErrorDataSchema,\n errorToMessage: (data) => data.error.message\n});\n\n// src/groq-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\n\n// src/groq-browser-search-models.ts\nvar BROWSER_SEARCH_SUPPORTED_MODELS = [\n \"openai/gpt-oss-20b\",\n \"openai/gpt-oss-120b\"\n];\nfunction isBrowserSearchSupportedModel(modelId) {\n return BROWSER_SEARCH_SUPPORTED_MODELS.includes(modelId);\n}\nfunction getSupportedModelsString() {\n return BROWSER_SEARCH_SUPPORTED_MODELS.join(\", \");\n}\n\n// src/groq-prepare-tools.ts\nfunction prepareTools({\n tools,\n toolChoice,\n modelId\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const groqTools2 = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n if (tool.id === \"groq.browser_search\") {\n if (!isBrowserSearchSupportedModel(modelId)) {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`,\n details: `Browser search is only supported on the following models: ${getSupportedModelsString()}. Current model: ${modelId}`\n });\n } else {\n groqTools2.push({\n type: \"browser_search\"\n });\n }\n } else {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n }\n } else {\n groqTools2.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: groqTools2, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n case \"required\":\n return { tools: groqTools2, toolChoice: type, toolWarnings };\n case \"tool\":\n return {\n tools: groqTools2,\n toolChoice: {\n type: \"function\",\n function: {\n name: toolChoice.toolName\n }\n },\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/map-groq-finish-reason.ts\nfunction mapGroqFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n return \"length\";\n case \"content_filter\":\n return \"content-filter\";\n case \"function_call\":\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/groq-chat-language-model.ts\nvar GroqChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"image/*\": [/^https?:\\/\\/.*$/]\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n stream,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b, _c;\n const warnings = [];\n const groqOptions = await parseProviderOptions({\n provider: \"groq\",\n providerOptions,\n schema: groqLanguageModelOptions\n });\n const structuredOutputs = (_a = groqOptions == null ? void 0 : groqOptions.structuredOutputs) != null ? _a : true;\n const strictJsonSchema = (_b = groqOptions == null ? void 0 : groqOptions.strictJsonSchema) != null ? _b : true;\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null && !structuredOutputs) {\n warnings.push({\n type: \"unsupported\",\n feature: \"responseFormat\",\n details: \"JSON response format schema is only supported with structuredOutputs\"\n });\n }\n const {\n tools: groqTools2,\n toolChoice: groqToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice, modelId: this.modelId });\n return {\n args: {\n // model id:\n model: this.modelId,\n // model specific settings:\n user: groqOptions == null ? void 0 : groqOptions.user,\n parallel_tool_calls: groqOptions == null ? void 0 : groqOptions.parallelToolCalls,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n stop: stopSequences,\n seed,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && responseFormat.schema != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_c = responseFormat.name) != null ? _c : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // provider options:\n reasoning_format: groqOptions == null ? void 0 : groqOptions.reasoningFormat,\n reasoning_effort: groqOptions == null ? void 0 : groqOptions.reasoningEffort,\n service_tier: groqOptions == null ? void 0 : groqOptions.serviceTier,\n // messages:\n messages: convertToGroqChatMessages(prompt),\n // tools:\n tools: groqTools2,\n tool_choice: groqToolChoice\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b;\n const { args, warnings } = await this.getArgs({\n ...options,\n stream: false\n });\n const body = JSON.stringify(args);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n groqChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n const reasoning = choice.message.reasoning;\n if (reasoning != null && reasoning.length > 0) {\n content.push({\n type: \"reasoning\",\n text: reasoning\n });\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: (_a = toolCall.id) != null ? _a : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: (_b = choice.finish_reason) != null ? _b : void 0\n },\n usage: convertGroqUsage(response.usage),\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n request: { body }\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs({ ...options, stream: true });\n const body = JSON.stringify({ ...args, stream: true });\n const { responseHeaders, value: response } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: {\n ...args,\n stream: true\n },\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(groqChatChunkSchema),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const toolCalls = [];\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let isActiveText = false;\n let isActiveReasoning = false;\n let providerMetadata;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (\"error\" in value) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: value.error });\n return;\n }\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (((_a = value.x_groq) == null ? void 0 : _a.usage) != null) {\n usage = value.x_groq.usage;\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n if (delta.reasoning != null && delta.reasoning.length > 0) {\n if (!isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-start\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = true;\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: \"reasoning-0\",\n delta: delta.reasoning\n });\n }\n if (delta.content != null && delta.content.length > 0) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n if (!isActiveText) {\n controller.enqueue({ type: \"text-start\", id: \"txt-0\" });\n isActiveText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"txt-0\",\n delta: delta.content\n });\n }\n if (delta.tool_calls != null) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n for (const toolCallDelta of delta.tool_calls) {\n const index = toolCallDelta.index;\n if (toolCalls[index] == null) {\n if (toolCallDelta.type !== \"function\") {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function' type.`\n });\n }\n if (toolCallDelta.id == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'id' to be a string.`\n });\n }\n if (((_b = toolCallDelta.function) == null ? void 0 : _b.name) == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function.name' to be a string.`\n });\n }\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallDelta.id,\n toolName: toolCallDelta.function.name\n });\n toolCalls[index] = {\n id: toolCallDelta.id,\n type: \"function\",\n function: {\n name: toolCallDelta.function.name,\n arguments: (_c = toolCallDelta.function.arguments) != null ? _c : \"\"\n },\n hasFinished: false\n };\n const toolCall2 = toolCalls[index];\n if (((_d = toolCall2.function) == null ? void 0 : _d.name) != null && ((_e = toolCall2.function) == null ? void 0 : _e.arguments) != null) {\n if (toolCall2.function.arguments.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall2.id,\n delta: toolCall2.function.arguments\n });\n }\n if (isParsableJson(toolCall2.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall2.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_f = toolCall2.id) != null ? _f : generateId(),\n toolName: toolCall2.function.name,\n input: toolCall2.function.arguments\n });\n toolCall2.hasFinished = true;\n }\n }\n continue;\n }\n const toolCall = toolCalls[index];\n if (toolCall.hasFinished) {\n continue;\n }\n if (((_g = toolCallDelta.function) == null ? void 0 : _g.arguments) != null) {\n toolCall.function.arguments += (_i = (_h = toolCallDelta.function) == null ? void 0 : _h.arguments) != null ? _i : \"\";\n }\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall.id,\n delta: (_j = toolCallDelta.function.arguments) != null ? _j : \"\"\n });\n if (((_k = toolCall.function) == null ? void 0 : _k.name) != null && ((_l = toolCall.function) == null ? void 0 : _l.arguments) != null && isParsableJson(toolCall.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_m = toolCall.id) != null ? _m : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n toolCall.hasFinished = true;\n }\n }\n }\n },\n flush(controller) {\n if (isActiveReasoning) {\n controller.enqueue({ type: \"reasoning-end\", id: \"reasoning-0\" });\n }\n if (isActiveText) {\n controller.enqueue({ type: \"text-end\", id: \"txt-0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertGroqUsage(usage),\n ...providerMetadata != null ? { providerMetadata } : {}\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nvar groqChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string().nullish(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n});\nvar groqChatChunkSchema = z3.union([\n z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n index: z3.number(),\n id: z3.string().nullish(),\n type: z3.literal(\"function\").optional(),\n function: z3.object({\n name: z3.string().nullish(),\n arguments: z3.string().nullish()\n })\n })\n ).nullish()\n }).nullish(),\n finish_reason: z3.string().nullable().optional(),\n index: z3.number()\n })\n ),\n x_groq: z3.object({\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n }).nullish()\n }),\n groqErrorDataSchema\n]);\n\n// src/groq-transcription-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertBase64ToUint8Array,\n createJsonResponseHandler as createJsonResponseHandler2,\n mediaTypeToExtension,\n parseProviderOptions as parseProviderOptions2,\n postFormDataToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/groq-transcription-options.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar groqTranscriptionModelOptions = lazySchema(\n () => zodSchema(\n z4.object({\n language: z4.string().nullish(),\n prompt: z4.string().nullish(),\n responseFormat: z4.string().nullish(),\n temperature: z4.number().min(0).max(1).nullish(),\n timestampGranularities: z4.array(z4.string()).nullish()\n })\n )\n);\n\n// src/groq-transcription-model.ts\nvar GroqTranscriptionModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n audio,\n mediaType,\n providerOptions\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const groqOptions = await parseProviderOptions2({\n provider: \"groq\",\n providerOptions,\n schema: groqTranscriptionModelOptions\n });\n const formData = new FormData();\n const blob = audio instanceof Uint8Array ? new Blob([audio]) : new Blob([convertBase64ToUint8Array(audio)]);\n formData.append(\"model\", this.modelId);\n const fileExtension = mediaTypeToExtension(mediaType);\n formData.append(\n \"file\",\n new File([blob], \"audio\", { type: mediaType }),\n `audio.${fileExtension}`\n );\n if (groqOptions) {\n const transcriptionModelOptions = {\n language: (_a = groqOptions.language) != null ? _a : void 0,\n prompt: (_b = groqOptions.prompt) != null ? _b : void 0,\n response_format: (_c = groqOptions.responseFormat) != null ? _c : void 0,\n temperature: (_d = groqOptions.temperature) != null ? _d : void 0,\n timestamp_granularities: (_e = groqOptions.timestampGranularities) != null ? _e : void 0\n };\n for (const key in transcriptionModelOptions) {\n const value = transcriptionModelOptions[key];\n if (value !== void 0) {\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${key}[]`, String(item));\n }\n } else {\n formData.append(key, String(value));\n }\n }\n }\n }\n return {\n formData,\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const { formData, warnings } = await this.getArgs(options);\n const {\n value: response,\n responseHeaders,\n rawValue: rawResponse\n } = await postFormDataToApi({\n url: this.config.url({\n path: \"/audio/transcriptions\",\n modelId: this.modelId\n }),\n headers: combineHeaders2(this.config.headers(), options.headers),\n formData,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n groqTranscriptionResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n return {\n text: response.text,\n segments: (_e = (_d = response.segments) == null ? void 0 : _d.map((segment) => ({\n text: segment.text,\n startSecond: segment.start,\n endSecond: segment.end\n }))) != null ? _e : [],\n language: (_f = response.language) != null ? _f : void 0,\n durationInSeconds: (_g = response.duration) != null ? _g : void 0,\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders,\n body: rawResponse\n }\n };\n }\n};\nvar groqTranscriptionResponseSchema = z5.object({\n text: z5.string(),\n x_groq: z5.object({\n id: z5.string()\n }),\n // additional properties are returned when `response_format: 'verbose_json'` is\n task: z5.string().nullish(),\n language: z5.string().nullish(),\n duration: z5.number().nullish(),\n segments: z5.array(\n z5.object({\n id: z5.number(),\n seek: z5.number(),\n start: z5.number(),\n end: z5.number(),\n text: z5.string(),\n tokens: z5.array(z5.number()),\n temperature: z5.number(),\n avg_logprob: z5.number(),\n compression_ratio: z5.number(),\n no_speech_prob: z5.number()\n })\n ).nullish()\n});\n\n// src/tool/browser-search.ts\nimport { createProviderToolFactory } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar browserSearch = createProviderToolFactory({\n id: \"groq.browser_search\",\n inputSchema: z6.object({})\n});\n\n// src/groq-tools.ts\nvar groqTools = {\n browserSearch\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.31\" : \"0.0.0-test\";\n\n// src/groq-provider.ts\nfunction createGroq(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.groq.com/openai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"GROQ_API_KEY\",\n description: \"Groq\"\n })}`,\n ...options.headers\n },\n `ai-sdk/groq/${VERSION}`\n );\n const createChatModel = (modelId) => new GroqChatLanguageModel(modelId, {\n provider: \"groq.chat\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createLanguageModel = (modelId) => {\n if (new.target) {\n throw new Error(\n \"The Groq model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n const createTranscriptionModel = (modelId) => {\n return new GroqTranscriptionModel(modelId, {\n provider: \"groq.transcription\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n };\n const provider = function(modelId) {\n return createLanguageModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n provider.transcription = createTranscriptionModel;\n provider.transcriptionModel = createTranscriptionModel;\n provider.tools = groqTools;\n return provider;\n}\nvar groq = createGroq();\nexport {\n VERSION,\n browserSearch,\n createGroq,\n groq\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qXA0BA,cAAS,MAAgB,MAAC,OAAO,CAC/B,IAAI,EAAI,EAAI,EAAI,EAChB,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAAM,GAAgB,EAAK,EAAM,gBAAkB,KAAO,EAAK,EACzD,GAAoB,EAAK,EAAM,oBAAsB,KAAO,EAAK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ACJ,IAAM,GAAW,EAAK,GAAqB,EAAQ,OAAO,IAAM,KAAO,EAAK,iCACtE,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,eACzB,YAAa,MACf,CAAC,OACE,EAAQ,OACb,EACA,eAAe,IACjB,EACM,EAAkB,CAAC,IAAY,IAAI,GAAsB,EAAS,CACtE,SAAU,YACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAsB,CAAC,IAAY,CACvC,GAAI,WACF,MAAU,MACR,gEACF,EAEF,OAAO,EAAgB,CAAO,GAE1B,EAA2B,CAAC,IAAY,CAC5C,OAAO,IAAI,GAAuB,EAAS,CACzC,SAAU,qBACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,GAEG,EAAW,QAAQ,CAAC,EAAS,CACjC,OAAO,EAAoB,CAAO,GAepC,OAbA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAEjE,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,MAAQ,GACV,EAET,IAAI,GAAO,GAAW",
"debugId": "43C3EF7FCD1EFC0564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/aws4fetch@1.0.20/node_modules/aws4fetch/dist/aws4fetch.esm.mjs"],
"sourcesContent": [
"/**\n * @license MIT <https://opensource.org/licenses/MIT>\n * @copyright Michael Hart 2024\n */\nconst encoder = new TextEncoder();\nconst HOST_SERVICES = {\n appstream2: 'appstream',\n cloudhsmv2: 'cloudhsm',\n email: 'ses',\n marketplace: 'aws-marketplace',\n mobile: 'AWSMobileHubService',\n pinpoint: 'mobiletargeting',\n queue: 'sqs',\n 'git-codecommit': 'codecommit',\n 'mturk-requester-sandbox': 'mturk-requester',\n 'personalize-runtime': 'personalize',\n};\nconst UNSIGNABLE_HEADERS = new Set([\n 'authorization',\n 'content-type',\n 'content-length',\n 'user-agent',\n 'presigned-expires',\n 'expect',\n 'x-amzn-trace-id',\n 'range',\n 'connection',\n]);\nclass AwsClient {\n constructor({ accessKeyId, secretAccessKey, sessionToken, service, region, cache, retries, initRetryMs }) {\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n this.service = service;\n this.region = region;\n this.cache = cache || new Map();\n this.retries = retries != null ? retries : 10;\n this.initRetryMs = initRetryMs || 50;\n }\n async sign(input, init) {\n if (input instanceof Request) {\n const { method, url, headers, body } = input;\n init = Object.assign({ method, url, headers }, init);\n if (init.body == null && headers.has('Content-Type')) {\n init.body = body != null && headers.has('X-Amz-Content-Sha256') ? body : await input.clone().arrayBuffer();\n }\n input = url;\n }\n const signer = new AwsV4Signer(Object.assign({ url: input.toString() }, init, this, init && init.aws));\n const signed = Object.assign({}, init, await signer.sign());\n delete signed.aws;\n try {\n return new Request(signed.url.toString(), signed)\n } catch (e) {\n if (e instanceof TypeError) {\n return new Request(signed.url.toString(), Object.assign({ duplex: 'half' }, signed))\n }\n throw e\n }\n }\n async fetch(input, init) {\n for (let i = 0; i <= this.retries; i++) {\n const fetched = fetch(await this.sign(input, init));\n if (i === this.retries) {\n return fetched\n }\n const res = await fetched;\n if (res.status < 500 && res.status !== 429) {\n return res\n }\n await new Promise(resolve => setTimeout(resolve, Math.random() * this.initRetryMs * Math.pow(2, i)));\n }\n throw new Error('An unknown error occurred, ensure retries is not negative')\n }\n}\nclass AwsV4Signer {\n constructor({ method, url, headers, body, accessKeyId, secretAccessKey, sessionToken, service, region, cache, datetime, signQuery, appendSessionToken, allHeaders, singleEncode }) {\n if (url == null) throw new TypeError('url is a required option')\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.method = method || (body ? 'POST' : 'GET');\n this.url = new URL(url);\n this.headers = new Headers(headers || {});\n this.body = body;\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n let guessedService, guessedRegion;\n if (!service || !region) {\n[guessedService, guessedRegion] = guessServiceRegion(this.url, this.headers);\n }\n this.service = service || guessedService || '';\n this.region = region || guessedRegion || 'us-east-1';\n this.cache = cache || new Map();\n this.datetime = datetime || new Date().toISOString().replace(/[:-]|\\.\\d{3}/g, '');\n this.signQuery = signQuery;\n this.appendSessionToken = appendSessionToken || this.service === 'iotdevicegateway';\n this.headers.delete('Host');\n if (this.service === 's3' && !this.signQuery && !this.headers.has('X-Amz-Content-Sha256')) {\n this.headers.set('X-Amz-Content-Sha256', 'UNSIGNED-PAYLOAD');\n }\n const params = this.signQuery ? this.url.searchParams : this.headers;\n params.set('X-Amz-Date', this.datetime);\n if (this.sessionToken && !this.appendSessionToken) {\n params.set('X-Amz-Security-Token', this.sessionToken);\n }\n this.signableHeaders = ['host', ...this.headers.keys()]\n .filter(header => allHeaders || !UNSIGNABLE_HEADERS.has(header))\n .sort();\n this.signedHeaders = this.signableHeaders.join(';');\n this.canonicalHeaders = this.signableHeaders\n .map(header => header + ':' + (header === 'host' ? this.url.host : (this.headers.get(header) || '').replace(/\\s+/g, ' ')))\n .join('\\n');\n this.credentialString = [this.datetime.slice(0, 8), this.region, this.service, 'aws4_request'].join('/');\n if (this.signQuery) {\n if (this.service === 's3' && !params.has('X-Amz-Expires')) {\n params.set('X-Amz-Expires', '86400');\n }\n params.set('X-Amz-Algorithm', 'AWS4-HMAC-SHA256');\n params.set('X-Amz-Credential', this.accessKeyId + '/' + this.credentialString);\n params.set('X-Amz-SignedHeaders', this.signedHeaders);\n }\n if (this.service === 's3') {\n try {\n this.encodedPath = decodeURIComponent(this.url.pathname.replace(/\\+/g, ' '));\n } catch (e) {\n this.encodedPath = this.url.pathname;\n }\n } else {\n this.encodedPath = this.url.pathname.replace(/\\/+/g, '/');\n }\n if (!singleEncode) {\n this.encodedPath = encodeURIComponent(this.encodedPath).replace(/%2F/g, '/');\n }\n this.encodedPath = encodeRfc3986(this.encodedPath);\n const seenKeys = new Set();\n this.encodedSearch = [...this.url.searchParams]\n .filter(([k]) => {\n if (!k) return false\n if (this.service === 's3') {\n if (seenKeys.has(k)) return false\n seenKeys.add(k);\n }\n return true\n })\n .map(pair => pair.map(p => encodeRfc3986(encodeURIComponent(p))))\n .sort(([k1, v1], [k2, v2]) => k1 < k2 ? -1 : k1 > k2 ? 1 : v1 < v2 ? -1 : v1 > v2 ? 1 : 0)\n .map(pair => pair.join('='))\n .join('&');\n }\n async sign() {\n if (this.signQuery) {\n this.url.searchParams.set('X-Amz-Signature', await this.signature());\n if (this.sessionToken && this.appendSessionToken) {\n this.url.searchParams.set('X-Amz-Security-Token', this.sessionToken);\n }\n } else {\n this.headers.set('Authorization', await this.authHeader());\n }\n return {\n method: this.method,\n url: this.url,\n headers: this.headers,\n body: this.body,\n }\n }\n async authHeader() {\n return [\n 'AWS4-HMAC-SHA256 Credential=' + this.accessKeyId + '/' + this.credentialString,\n 'SignedHeaders=' + this.signedHeaders,\n 'Signature=' + (await this.signature()),\n ].join(', ')\n }\n async signature() {\n const date = this.datetime.slice(0, 8);\n const cacheKey = [this.secretAccessKey, date, this.region, this.service].join();\n let kCredentials = this.cache.get(cacheKey);\n if (!kCredentials) {\n const kDate = await hmac('AWS4' + this.secretAccessKey, date);\n const kRegion = await hmac(kDate, this.region);\n const kService = await hmac(kRegion, this.service);\n kCredentials = await hmac(kService, 'aws4_request');\n this.cache.set(cacheKey, kCredentials);\n }\n return buf2hex(await hmac(kCredentials, await this.stringToSign()))\n }\n async stringToSign() {\n return [\n 'AWS4-HMAC-SHA256',\n this.datetime,\n this.credentialString,\n buf2hex(await hash(await this.canonicalString())),\n ].join('\\n')\n }\n async canonicalString() {\n return [\n this.method.toUpperCase(),\n this.encodedPath,\n this.encodedSearch,\n this.canonicalHeaders + '\\n',\n this.signedHeaders,\n await this.hexBodyHash(),\n ].join('\\n')\n }\n async hexBodyHash() {\n let hashHeader = this.headers.get('X-Amz-Content-Sha256') || (this.service === 's3' && this.signQuery ? 'UNSIGNED-PAYLOAD' : null);\n if (hashHeader == null) {\n if (this.body && typeof this.body !== 'string' && !('byteLength' in this.body)) {\n throw new Error('body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header')\n }\n hashHeader = buf2hex(await hash(this.body || ''));\n }\n return hashHeader\n }\n}\nasync function hmac(key, string) {\n const cryptoKey = await crypto.subtle.importKey(\n 'raw',\n typeof key === 'string' ? encoder.encode(key) : key,\n { name: 'HMAC', hash: { name: 'SHA-256' } },\n false,\n ['sign'],\n );\n return crypto.subtle.sign('HMAC', cryptoKey, encoder.encode(string))\n}\nasync function hash(content) {\n return crypto.subtle.digest('SHA-256', typeof content === 'string' ? encoder.encode(content) : content)\n}\nconst HEX_CHARS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\nfunction buf2hex(arrayBuffer) {\n const buffer = new Uint8Array(arrayBuffer);\n let out = '';\n for (let idx = 0; idx < buffer.length; idx++) {\n const n = buffer[idx];\n out += HEX_CHARS[(n >>> 4) & 0xF];\n out += HEX_CHARS[n & 0xF];\n }\n return out\n}\nfunction encodeRfc3986(urlEncodedStr) {\n return urlEncodedStr.replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase())\n}\nfunction guessServiceRegion(url, headers) {\n const { hostname, pathname } = url;\n if (hostname.endsWith('.on.aws')) {\n const match = hostname.match(/^[^.]{1,63}\\.lambda-url\\.([^.]{1,63})\\.on\\.aws$/);\n return match != null ? ['lambda', match[1] || ''] : ['', '']\n }\n if (hostname.endsWith('.r2.cloudflarestorage.com')) {\n return ['s3', 'auto']\n }\n if (hostname.endsWith('.backblazeb2.com')) {\n const match = hostname.match(/^(?:[^.]{1,63}\\.)?s3\\.([^.]{1,63})\\.backblazeb2\\.com$/);\n return match != null ? ['s3', match[1] || ''] : ['', '']\n }\n const match = hostname.replace('dualstack.', '').match(/([^.]{1,63})\\.(?:([^.]{0,63})\\.)?amazonaws\\.com(?:\\.cn)?$/);\n let service = (match && match[1]) || '';\n let region = match && match[2];\n if (region === 'us-gov') {\n region = 'us-gov-west-1';\n } else if (region === 's3' || region === 's3-accelerate') {\n region = 'us-east-1';\n service = 's3';\n } else if (service === 'iot') {\n if (hostname.startsWith('iot.')) {\n service = 'execute-api';\n } else if (hostname.startsWith('data.jobs.iot.')) {\n service = 'iot-jobs-data';\n } else {\n service = pathname === '/mqtt' ? 'iotdevicegateway' : 'iotdata';\n }\n } else if (service === 'autoscaling') {\n const targetPrefix = (headers.get('X-Amz-Target') || '').split('.')[0];\n if (targetPrefix === 'AnyScaleFrontendService') {\n service = 'application-autoscaling';\n } else if (targetPrefix === 'AnyScaleScalingPlannerFrontendService') {\n service = 'autoscaling-plans';\n }\n } else if (region == null && service.startsWith('s3-')) {\n region = service.slice(3).replace(/^fips-|^external-1/, '');\n service = 's3';\n } else if (service.endsWith('-fips')) {\n service = service.slice(0, -5);\n } else if (region && /-\\d$/.test(service) && !/-\\d$/.test(region)) {\n[service, region] = [region, service];\n }\n return [HOST_SERVICES[service] || service, region || '']\n}\n\nexport { AwsClient, AwsV4Signer };\n"
],
"mappings": ";AAIA,IAAM,EAAU,IAAI,YACd,EAAgB,CACpB,WAAY,YACZ,WAAY,WACZ,MAAO,MACP,YAAa,kBACb,OAAQ,sBACR,SAAU,kBACV,MAAO,MACP,iBAAkB,aAClB,0BAA2B,kBAC3B,sBAAuB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,wCAC1B,EAAU,oBAEP,QAAI,GAAU,MAAQ,EAAQ,WAAW,KAAK,EACnD,EAAS,EAAQ,MAAM,CAAC,EAAE,QAAQ,qBAAsB,EAAE,EAC1D,EAAU,KACL,QAAI,EAAQ,SAAS,OAAO,EACjC,EAAU,EAAQ,MAAM,EAAG,EAAE,EACxB,QAAI,GAAU,OAAO,KAAK,CAAO,GAAK,CAAC,OAAO,KAAK,CAAM,EAClE,CAAC,EAAS,CAAM,EAAI,CAAC,EAAQ,CAAO,EAElC,MAAO,CAAC,EAAc,IAAY,EAAS,GAAU,EAAE",
"debugId": "EEBD8607B2F8A33464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/ai-gateway-provider@3.1.2+a6631614dda8d488/node_modules/ai-gateway-provider/dist/providers/unified.mjs"],
"sourcesContent": [
"// src/providers/unified.ts\nimport { createOpenAICompatible } from \"@ai-sdk/openai-compatible\";\nvar createUnified = (arg) => {\n return createOpenAICompatible({\n baseURL: \"https://gateway.ai.cloudflare.com/v1/compat\",\n // intercepted and replaced with actual base URL later\n name: \"Unified\",\n ...arg || {}\n });\n};\nvar unified = createUnified();\nexport {\n createUnified,\n unified\n};\n//# sourceMappingURL=unified.mjs.map"
],
"mappings": ";8NAEA,SAAI,OAAgB,MAAC,SAAQ,MAC3B,OAAO,EAAuB,CAC5B,QAAS,8CAET,KAAM,aACH,GAAO,CAAC,CACb,CAAC,GAEC,EAAU,EAAc",
"debugId": "3CEFADB76B5D81FA64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js"],
"sourcesContent": [
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nexport const ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nexport const ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nexport const ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = new Set([\"localhost\", \"127.0.0.1\"]);\nconst GREENGRASS_PROTOCOLS = new Set([\"http:\", \"https:\"]);\nconst getCmdsUri = async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n let parsed;\n try {\n parsed = new URL(process.env[ENV_CMDS_FULL_URI]);\n }\n catch {\n throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });\n }\n if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {\n throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger,\n });\n }\n if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {\n throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger,\n });\n }\n return {\n protocol: parsed.protocol,\n hostname: parsed.hostname,\n path: parsed.pathname + parsed.search,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", {\n tryNextLink: false,\n logger,\n });\n};\n",
"export const isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nexport const fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...(creds.AccountId && { accountId: creds.AccountId }),\n});\n",
"export const DEFAULT_TIMEOUT = 1000;\nexport const DEFAULT_MAX_RETRIES = 0;\nexport const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n",
"import { request } from \"node:http\";\nimport { ProviderError } from \"@smithy/core/config\";\nexport function httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = request({\n method: \"GET\",\n ...options,\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n",
"export const retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\n",
"import { CredentialsProviderError, loadConfig } from \"@smithy/core/config\";\nimport { InstanceMetadataV1FallbackError } from \"./error/InstanceMetadataV1FallbackError\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nimport { getInstanceMetadataEndpoint } from \"./utils/getInstanceMetadataEndpoint\";\nimport { staticStabilityProvider } from \"./utils/staticStabilityProvider\";\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport class InstanceMetadataV1FallbackError extends CredentialsProviderError {\n tryNextLink;\n name = \"InstanceMetadataV1FallbackError\";\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);\n }\n}\n",
"import { loadConfig } from \"@smithy/core/config\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { Endpoint as InstanceMetadataEndpoint } from \"../config/Endpoint\";\nimport { ENDPOINT_CONFIG_OPTIONS } from \"../config/EndpointConfigOptions\";\nimport { EndpointMode } from \"../config/EndpointMode\";\nimport { ENDPOINT_MODE_CONFIG_OPTIONS, } from \"../config/EndpointModeConfigOptions\";\nexport const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nconst getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return InstanceMetadataEndpoint.IPv4;\n case EndpointMode.IPv6:\n return InstanceMetadataEndpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);\n }\n};\n",
"export var Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint || (Endpoint = {}));\n",
"export const ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nexport const CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nexport const ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n",
"export var EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n",
"import { EndpointMode } from \"./EndpointMode\";\nexport const ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nexport const CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nexport const ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode.IPv4,\n};\n",
"const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nconst STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nconst STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nexport const getExtendedInstanceMetadataCredentials = (credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS +\n Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1000);\n logger.warn(\"Attempting credential expiration extension due to a credential service availability issue. A refresh of these \" +\n `credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: ` +\n STATIC_STABILITY_DOC_URL);\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...(originalExpiration ? { originalExpiration } : {}),\n expiration: newExpiration,\n };\n};\n",
"import { getExtendedInstanceMetadataCredentials } from \"./getExtendedInstanceMetadataCredentials\";\nexport const staticStabilityProvider = (provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n }\n catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n }\n else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n};\n"
],
"mappings": ";kJAAA,oBCAO,SAAM,EAAoB,CAAC,IAAQ,QAAQ,CAAG,GACjD,OAAO,IAAQ,UACf,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,kBAAoB,UAC/B,OAAO,EAAI,QAAU,UACrB,OAAO,EAAI,aAAe,SACjB,EAAsB,CAAC,KAAW,CAC3C,YAAa,EAAM,YACnB,gBAAiB,EAAM,gBACvB,aAAc,EAAM,MACpB,WAAY,IAAI,KAAK,EAAM,UAAU,KACjC,EAAM,WAAa,CAAE,UAAW,EAAM,SAAU,CACxD,GCZO,IAAM,GAAkB,KAClB,GAAsB,EACtB,EAAyB,EAAG,aADN,EACwC,UAF5C,SAE8E,CAAE,aAAY,SAAQ,GCDnI,eADA,kBAAS,aAEF,SAAS,CAAW,CAAC,EAAS,CACjC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O,KAAa,MAAM,EAAY,IAAK,EAAS,KAAM,CAAU,CAAC,GAAG,SAAS,EAC9F,GAA4B,MAAO,EAAS,EAAS,IAAS,CAChE,IAAM,EAAsB,KAAK,OAAO,MAAM,EAAY,IACnD,EACH,KAAM,EAAY,CACtB,CAAC,GAAG,SAAS,CAAC,EACd,GAAI,CAAC,EAAkB,CAAmB,EACtC,MAAM,IAAI,2BAAyB,4DAA6D,CAC5F,OAAQ,EAAK,MACjB,CAAC,EAEL,OAAO,EAAoB,CAAmB",
"debugId": "8ACB9A34C95FDB2D64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/service/restart.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.restart,\n Effect.fn(\"cli.service.restart\")(function* () {\n const daemon = yield* Daemon.Service\n yield* daemon.stop()\n process.stdout.write((yield* daemon.start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,QAC5B,EAAG,qBAAqB,EAAE,SAAU,EAAG,CAC5C,IAAM,EAAS,MAAO,EAAO,QAC7B,MAAO,EAAO,KAAK,EACnB,QAAQ,OAAO,OAAO,MAAO,EAAO,MAAM,GAAK,CAAG,EACnD,CACH",
"debugId": "1453509DFCA3D93B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js", "../../node_modules/.bun/@smithy+is-array-buffer@2.2.0/node_modules/@smithy/is-array-buffer/dist-cjs/index.js", "../../node_modules/.bun/@smithy+util-buffer-from@2.2.0/node_modules/@smithy/util-buffer-from/dist-cjs/index.js", "../../node_modules/.bun/@smithy+util-utf8@2.3.0/node_modules/@smithy/util-utf8/dist-cjs/index.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/convertToBuffer.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/isEmptyData.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/numToUint8.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/index.js", "../../node_modules/.bun/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js", "../../node_modules/.bun/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/index.js"],
"sourcesContent": [
"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __esDecorate;\r\nvar __runInitializers;\r\nvar __propKey;\r\nvar __setFunctionName;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\nvar __addDisposableResource;\r\nvar __disposeResources;\r\nvar __rewriteRelativeImportExtension;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n };\r\n\r\n __runInitializers = function (thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n };\r\n\r\n __propKey = function (x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n };\r\n\r\n __setFunctionName = function (f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n var ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n __addDisposableResource = function (env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n };\r\n\r\n var _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n };\r\n\r\n __disposeResources = function (env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n };\r\n\r\n __rewriteRelativeImportExtension = function (path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__esDecorate\", __esDecorate);\r\n exporter(\"__runInitializers\", __runInitializers);\r\n exporter(\"__propKey\", __propKey);\r\n exporter(\"__setFunctionName\", __setFunctionName);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n exporter(\"__addDisposableResource\", __addDisposableResource);\r\n exporter(\"__disposeResources\", __disposeResources);\r\n exporter(\"__rewriteRelativeImportExtension\", __rewriteRelativeImportExtension);\r\n});\r\n\r\n0 && (module.exports = {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __exportStar: __exportStar,\r\n __createBinding: __createBinding,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n});\r\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToBuffer = void 0;\nvar util_utf8_1 = require(\"@smithy/util-utf8\");\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : util_utf8_1.fromUtf8;\nfunction convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\nexports.convertToBuffer = convertToBuffer;\n//# sourceMappingURL=convertToBuffer.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;\n//# sourceMappingURL=isEmptyData.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.numToUint8 = void 0;\nfunction numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\nexports.numToUint8 = numToUint8;\n//# sourceMappingURL=numToUint8.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = void 0;\n// IE 11 does not support Array.from, so we do it manually\nfunction uint32ArrayFrom(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\nexports.uint32ArrayFrom = uint32ArrayFrom;\n//# sourceMappingURL=uint32ArrayFrom.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;\nvar convertToBuffer_1 = require(\"./convertToBuffer\");\nObject.defineProperty(exports, \"convertToBuffer\", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } });\nvar isEmptyData_1 = require(\"./isEmptyData\");\nObject.defineProperty(exports, \"isEmptyData\", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } });\nvar numToUint8_1 = require(\"./numToUint8\");\nObject.defineProperty(exports, \"numToUint8\", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } });\nvar uint32ArrayFrom_1 = require(\"./uint32ArrayFrom\");\nObject.defineProperty(exports, \"uint32ArrayFrom\", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } });\n//# sourceMappingURL=index.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nvar index_1 = require(\"./index\");\nvar AwsCrc32 = /** @class */ (function () {\n function AwsCrc32() {\n this.crc32 = new index_1.Crc32();\n }\n AwsCrc32.prototype.update = function (toHash) {\n if ((0, util_1.isEmptyData)(toHash))\n return;\n this.crc32.update((0, util_1.convertToBuffer)(toHash));\n };\n AwsCrc32.prototype.digest = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())];\n });\n });\n };\n AwsCrc32.prototype.reset = function () {\n this.crc32 = new index_1.Crc32();\n };\n return AwsCrc32;\n}());\nexports.AwsCrc32 = AwsCrc32;\n//# sourceMappingURL=aws_crc32.js.map",
"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nfunction crc32(data) {\n return new Crc32().update(data).digest();\n}\nexports.crc32 = crc32;\nvar Crc32 = /** @class */ (function () {\n function Crc32() {\n this.checksum = 0xffffffff;\n }\n Crc32.prototype.update = function (data) {\n var e_1, _a;\n try {\n for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {\n var byte = data_1_1.value;\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return this;\n };\n Crc32.prototype.digest = function () {\n return (this.checksum ^ 0xffffffff) >>> 0;\n };\n return Crc32;\n}());\nexports.Crc32 = Crc32;\n// prettier-ignore\nvar a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nvar lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);\nvar aws_crc32_1 = require(\"./aws_crc32\");\nObject.defineProperty(exports, \"AwsCrc32\", { enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } });\n//# sourceMappingURL=index.js.map"
],
"mappings": ";8EAeA,IAAI,EACA,EACA,EACA,EACA,EACA,E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AAY,WAAY,WAAY,SACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,WACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,SACxC,EACI,IAAe,EAAG,GAAO,iBAAiB,EAAa,EACvD,QACJ,OAAO,eAAe,EAAS,WAAY,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,GAAY,SAAY,CAAC",
"debugId": "1708507D70FF9F6F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "482DBF980CF344FC64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/stop.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.stop,\n Effect.fn(\"cli.service.stop\")(function* () {\n yield* (yield* Daemon.Service).stop()\n }),\n)\n"
],
"mappings": ";6RAKA,SAAe,SAAQ,aACrB,OAAS,cAAS,aAAQ,SAAS,KAC5B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CACzC,OAAQ,MAAO,EAAO,SAAS,KAAK,EACrC,CACH",
"debugId": "0C774BA179C8814D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "D36F3D61F52615EB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "B7F0882AB2659FDA64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://oidc.{Region}.amazonaws.com\", i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 13,\n 3,\n 1,\n 4,\n r + 12,\n 2,\n 5,\n r + 12,\n 3,\n 8,\n 6,\n 4,\n 7,\n r + 11,\n 5,\n r + 9,\n r + 10,\n 4,\n 11,\n 9,\n 6,\n 10,\n r + 8,\n 7,\n r + 6,\n r + 7,\n 5,\n 12,\n r + 5,\n 6,\n r + 4,\n r + 5,\n 3,\n r + 1,\n 14,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SSOOIDCServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SSOOIDCServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass AuthorizationPendingException extends SSOOIDCServiceException {\n name = \"AuthorizationPendingException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass ExpiredTokenException extends SSOOIDCServiceException {\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InternalServerException extends SSOOIDCServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidClientException extends SSOOIDCServiceException {\n name = \"InvalidClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidGrantException extends SSOOIDCServiceException {\n name = \"InvalidGrantException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidRequestException extends SSOOIDCServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidScopeException extends SSOOIDCServiceException {\n name = \"InvalidScopeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass SlowDownException extends SSOOIDCServiceException {\n name = \"SlowDownException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnauthorizedClientException extends SSOOIDCServiceException {\n name = \"UnauthorizedClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnsupportedGrantTypeException extends SSOOIDCServiceException {\n name = \"UnsupportedGrantTypeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _APE = \"AuthorizationPendingException\";\nconst _AT = \"AccessToken\";\nconst _CS = \"ClientSecret\";\nconst _CT = \"CreateToken\";\nconst _CTR = \"CreateTokenRequest\";\nconst _CTRr = \"CreateTokenResponse\";\nconst _CV = \"CodeVerifier\";\nconst _ETE = \"ExpiredTokenException\";\nconst _ICE = \"InvalidClientException\";\nconst _IGE = \"InvalidGrantException\";\nconst _IRE = \"InvalidRequestException\";\nconst _ISE = \"InternalServerException\";\nconst _ISEn = \"InvalidScopeException\";\nconst _IT = \"IdToken\";\nconst _RT = \"RefreshToken\";\nconst _SDE = \"SlowDownException\";\nconst _UCE = \"UnauthorizedClientException\";\nconst _UGTE = \"UnsupportedGrantTypeException\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cS = \"clientSecret\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _dC = \"deviceCode\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _ed = \"error_description\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _r = \"reason\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.ssooidc\";\nconst _sc = \"scope\";\nconst _se = \"server\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.ssooidc\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SSOOIDCServiceException$ = [-3, _s, \"SSOOIDCServiceException\", 0, [], []];\n_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar AccessDeniedException$ = [\n -3,\n n0,\n _ADE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0],\n];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar AuthorizationPendingException$ = [\n -3,\n n0,\n _APE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);\nvar ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);\nvar InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidClientException$, InvalidClientException);\nvar InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidGrantException$, InvalidGrantException);\nvar InvalidRequestException$ = [\n -3,\n n0,\n _IRE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0],\n];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidScopeException$, InvalidScopeException);\nvar SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(SlowDownException$, SlowDownException);\nvar UnauthorizedClientException$ = [\n -3,\n n0,\n _UCE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);\nvar UnsupportedGrantTypeException$ = [\n -3,\n n0,\n _UGTE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar AccessToken = [0, n0, _AT, 8, 0];\nvar ClientSecret = [0, n0, _CS, 8, 0];\nvar CodeVerifier = [0, n0, _CV, 8, 0];\nvar IdToken = [0, n0, _IT, 8, 0];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar CreateTokenRequest$ = [\n 3,\n n0,\n _CTR,\n 0,\n [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],\n [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],\n 3,\n];\nvar CreateTokenResponse$ = [\n 3,\n n0,\n _CTRr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]],\n];\nvar CreateToken$ = [\n 9,\n n0,\n _CT,\n { [_h]: [\"POST\", \"/token\", 200] },\n () => CreateTokenRequest$,\n () => CreateTokenResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.ssooidc\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"AWSSSOOIDCService\",\n },\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOOIDCClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateTokenCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSSOOIDCService\", \"CreateToken\", {})\n .n(\"SSOOIDCClient\", \"CreateTokenCommand\")\n .sc(CreateToken$)\n .build() {\n}\n\nconst commands = {\n CreateTokenCommand,\n};\nclass SSOOIDC extends SSOOIDCClient {\n}\nclient.createAggregatedClient(commands, SSOOIDC);\n\nconst AccessDeniedExceptionReason = {\n KMS_ACCESS_DENIED: \"KMS_AccessDeniedException\",\n};\nconst InvalidRequestExceptionReason = {\n KMS_DISABLED_KEY: \"KMS_DisabledException\",\n KMS_INVALID_KEY_USAGE: \"KMS_InvalidKeyUsageException\",\n KMS_INVALID_STATE: \"KMS_InvalidStateException\",\n KMS_KEY_NOT_FOUND: \"KMS_NotFoundException\",\n};\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;\nexports.AuthorizationPendingException = AuthorizationPendingException;\nexports.AuthorizationPendingException$ = AuthorizationPendingException$;\nexports.CreateToken$ = CreateToken$;\nexports.CreateTokenCommand = CreateTokenCommand;\nexports.CreateTokenRequest$ = CreateTokenRequest$;\nexports.CreateTokenResponse$ = CreateTokenResponse$;\nexports.ExpiredTokenException = ExpiredTokenException;\nexports.ExpiredTokenException$ = ExpiredTokenException$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.InvalidClientException = InvalidClientException;\nexports.InvalidClientException$ = InvalidClientException$;\nexports.InvalidGrantException = InvalidGrantException;\nexports.InvalidGrantException$ = InvalidGrantException$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;\nexports.InvalidScopeException = InvalidScopeException;\nexports.InvalidScopeException$ = InvalidScopeException$;\nexports.SSOOIDC = SSOOIDC;\nexports.SSOOIDCClient = SSOOIDCClient;\nexports.SSOOIDCServiceException = SSOOIDCServiceException;\nexports.SSOOIDCServiceException$ = SSOOIDCServiceException$;\nexports.SlowDownException = SlowDownException;\nexports.SlowDownException$ = SlowDownException$;\nexports.UnauthorizedClientException = UnauthorizedClientException;\nexports.UnauthorizedClientException$ = UnauthorizedClientException$;\nexports.UnsupportedGrantTypeException = UnsupportedGrantTypeException;\nexports.UnsupportedGrantTypeException$ = UnsupportedGrantTypeException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAiD,MAAO,EAAQ,EAAS,IAAU,CACrF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,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,EAChC,GAAiC,GACjC,GAAsB",
"debugId": "ABFFFDD82393A0F264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "F66C9C0A5CA11AE264756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "DFC31ACD12C9721664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "802172186216958964756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/default.ts"],
"sourcesContent": [
"import { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Effect } from \"effect\"\nimport { Daemon } from \"../../services/daemon\"\n\nexport default Runtime.handler(Commands, () =>\n Effect.gen(function* () {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const { runTui } = yield* Effect.promise(() => import(\"../../tui\"))\n yield* runTui(transport)\n }),\n)\n"
],
"mappings": ";0SAKA,SAAe,SAAQ,aAAQ,OAAU,SACvC,OAAO,IAAI,SAAU,EAAG,CAEtB,IAAM,EAAY,OADH,MAAO,EAAO,SACG,UAAU,GAClC,UAAW,MAAO,EAAO,QAAQ,IAAa,wCAAY,EAClE,MAAO,EAAO,CAAS,EACxB,CACH",
"debugId": "F3A18474D05B760264756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0DBFD97B8F8B298764756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst fs_1 = require(\"fs\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n try {\n const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-bsd.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,UACA,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,OADe,MAAM,EAAK,SAAS,SAAS,cAAe,CAAE,SAAU,MAAO,CAAC,GACjE,KAAK,EAEvB,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,GAAI,CAEA,OADe,MAAO,EAAG,EAAY,WAAW,4BAA4B,GAC9D,OAAO,KAAK,EAE9B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "4AA6DA8BE0ED613864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentui+core-linux-arm64@0.4.3/node_modules/@opentui/core-linux-arm64/index.bun.js"],
"sourcesContent": [
"const module = await import(\"./libopentui.so\", { with: { type: \"file\" } })\n\nexport default module.default\n"
],
"mappings": ";oDAAA,IAAM,EAAS,KAAa,yCAAmB,CAAE,KAAM,CAAE,KAAM,MAAO,CAAE,GAEzD,IAAO",
"debugId": "A70FA6F6EE6F022664756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst process = require(\"process\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const args = 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n try {\n const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-win.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,eACA,MACA,MACN,eAAe,CAAY,EAAG,CAE1B,IAAI,EAAU,8BACd,GAAI,EAAQ,OAAS,QAAU,2BAA4B,EAAQ,IAC/D,EAAU,mCAAqC,EAEnD,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,GAAG,8EAAiB,GAC/C,OAAO,MAAM,QAAQ,EAC1C,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,KAAK,EAG7B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "77371D1402BC086464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3D9B0B74B33F256464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.45/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.45/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { readFileSync } from \"node:fs\";\nimport { fromWebToken } from \"./fromWebToken\";\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nexport const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await fromWebToken({\n ...init,\n webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\n",
"export const fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACA,uBAAS,WCFF,IAAM,EAAe,CAAC,IAAS,MAAO,IAA0B,CACnE,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,IAAQ,UAAS,kBAAiB,mBAAkB,aAAY,aAAY,SAAQ,mBAAoB,GAClG,8BAA+B,EACrC,GAAI,CAAC,EAA4B,CAC7B,IAAQ,wCAAyC,KAAa,0CAC9D,EAA6B,EAAqC,IAC3D,EAAK,aACR,yBAA0B,EAAK,OAC/B,mBAAoB,IACb,GAAuB,sBACvB,EAAK,kBACZ,CACJ,EAAG,EAAK,aAAa,EAEzB,OAAO,EAA2B,CAC9B,QAAS,EACT,gBAAiB,GAAmB,sBAAsB,KAAK,IAAI,IACnE,iBAAkB,EAClB,WAAY,EACZ,WAAY,EACZ,OAAQ,EACR,gBAAiB,CACrB,CAAC,GDnBL,IAAM,EAAiB,8BACjB,EAAe,eACf,EAAwB,wBACjB,EAAgB,CAAC,EAAO,CAAC,IAAM,MAAO,IAA0B,CACzE,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,IAAM,EAAuB,GAAM,sBAAwB,QAAQ,IAAI,GACjE,EAAU,GAAM,SAAW,QAAQ,IAAI,GACvC,EAAkB,GAAM,iBAAmB,QAAQ,IAAI,GAC7D,GAAI,CAAC,GAAwB,CAAC,EAC1B,MAAM,IAAI,2BAAyB,2CAA4C,CAC3E,OAAQ,EAAK,MACjB,CAAC,EAEL,IAAM,EAAc,MAAM,EAAa,IAChC,EACH,iBAAkB,2BAAyB,iBAAiB,EAAE,IAC1D,EAAa,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC5D,UACA,iBACJ,CAAC,EAAE,CAAqB,EACxB,GAAI,IAAyB,QAAQ,IAAI,GACrC,uBAAqB,EAAa,wCAAyC,GAAG,EAElF,OAAO",
"debugId": "9B716ECEDD99BEA564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/createCredentialChain.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/resolveLogins.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/IndexedDbStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/InMemoryStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/localStorage.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromEnv.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromNodeProviderChain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.base.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { ProviderError } from \"@smithy/core/config\";\nexport const createCredentialChain = (...credentialProviders) => {\n let expireAfter = -1;\n const baseFunction = async (awsIdentityProperties) => {\n const credentials = await propertyProviderChain(...credentialProviders)(awsIdentityProperties);\n if (!credentials.expiration && expireAfter !== -1) {\n credentials.expiration = new Date(Date.now() + expireAfter);\n }\n return credentials;\n };\n const withOptions = Object.assign(baseFunction, {\n expireAfter(milliseconds) {\n if (milliseconds < 5 * 60_000) {\n throw new Error(\"@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.\");\n }\n expireAfter = milliseconds;\n return withOptions;\n },\n });\n return withOptions;\n};\nexport const propertyProviderChain = (...providers) => async (awsIdentityProperties) => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\", { tryNextLink: false });\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentity(parameters) {\n return async (awsIdentityProperties) => {\n parameters.logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const { GetCredentialsForIdentityCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => parameters.clientConfig?.[property] ??\n parameters.parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters.logger), SessionToken, } = throwOnMissingCredentials(parameters.logger), } = await (parameters.client ??\n new CognitoIdentityClient(Object.assign({}, parameters.clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }))).send(new GetCredentialsForIdentityCommand({\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId,\n Logins: parameters.logins ? await resolveLogins(parameters.logins) : undefined,\n }));\n return {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration,\n };\n };\n}\nfunction throwOnMissingAccessKeyId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no access key ID\", { logger });\n}\nfunction throwOnMissingCredentials(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no credentials\", { logger });\n}\nfunction throwOnMissingSecretKey(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no secret key\", { logger });\n}\n",
"export function resolveLogins(logins) {\n return Promise.all(Object.keys(logins).reduce((arr, name) => {\n const tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n }\n else {\n arr.push(tokenOrProvider().then((token) => [name, token]));\n }\n return arr;\n }, [])).then((resolvedPairs) => resolvedPairs.reduce((logins, [key, value]) => {\n logins[key] = value;\n return logins;\n }, {}));\n}\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromCognitoIdentity } from \"./fromCognitoIdentity\";\nimport { localStorage } from \"./localStorage\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentityPool({ accountId, cache = localStorage(), client, clientConfig, customRoleArn, identityPoolId, logins, userIdentifier = !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : undefined, logger, parentClientConfig, }) {\n logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const cacheKey = userIdentifier\n ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}`\n : undefined;\n let provider = async (awsIdentityProperties) => {\n const { GetIdCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => clientConfig?.[property] ??\n parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const _client = client ??\n new CognitoIdentityClient(Object.assign({}, clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }));\n let identityId = (cacheKey && (await cache.getItem(cacheKey)));\n if (!identityId) {\n const { IdentityId = throwOnMissingId(logger) } = await _client.send(new GetIdCommand({\n AccountId: accountId,\n IdentityPoolId: identityPoolId,\n Logins: logins ? await resolveLogins(logins) : undefined,\n }));\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => { });\n }\n }\n provider = fromCognitoIdentity({\n client: _client,\n customRoleArn,\n logins,\n identityId,\n });\n return provider(awsIdentityProperties);\n };\n return (awsIdentityProperties) => provider(awsIdentityProperties).catch(async (err) => {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(() => { });\n }\n throw err;\n });\n}\nfunction throwOnMissingId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no identity ID\", { logger });\n}\n",
"const STORE_NAME = \"IdentityIds\";\nexport class IndexedDbStorage {\n dbName;\n constructor(dbName = \"aws:cognito-identity-ids\") {\n this.dbName = dbName;\n }\n getItem(key) {\n return this.withObjectStore(\"readonly\", (store) => {\n const req = store.get(key);\n return new Promise((resolve) => {\n req.onerror = () => resolve(null);\n req.onsuccess = () => resolve(req.result ? req.result.value : null);\n });\n }).catch(() => null);\n }\n removeItem(key) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.delete(key);\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n setItem(id, value) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.put({ id, value });\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n getDb() {\n const openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise((resolve, reject) => {\n openDbRequest.onsuccess = () => {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = () => {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = () => {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = () => {\n const db = openDbRequest.result;\n db.onerror = () => {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n }\n withObjectStore(mode, action) {\n return this.getDb().then((db) => {\n const tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = () => db.close();\n return new Promise((resolve, reject) => {\n tx.onerror = () => reject(tx.error);\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch((err) => {\n db.close();\n throw err;\n });\n });\n }\n}\n",
"export class InMemoryStorage {\n store;\n constructor(store = {}) {\n this.store = store;\n }\n getItem(key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n }\n removeItem(key) {\n delete this.store[key];\n }\n setItem(key, value) {\n this.store[key] = value;\n }\n}\n",
"import { IndexedDbStorage } from \"./IndexedDbStorage\";\nimport { InMemoryStorage } from \"./InMemoryStorage\";\nconst inMemoryStorage = new InMemoryStorage();\nexport function localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}\n",
"import { fromCognitoIdentity as _fromCognitoIdentity } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentity = (options) => _fromCognitoIdentity({\n ...options,\n});\n",
"import { fromCognitoIdentityPool as _fromCognitoIdentityPool } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentityPool = (options) => _fromCognitoIdentityPool({\n ...options,\n});\n",
"import { fromContainerMetadata as _fromContainerMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromContainerMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromContainerMetadata\");\n return _fromContainerMetadata(init);\n};\n",
"import { fromEnv as _fromEnv } from \"@aws-sdk/credential-provider-env\";\nexport const fromEnv = (init) => _fromEnv(init);\n",
"import { fromIni as _fromIni } from \"@aws-sdk/credential-provider-ini\";\nexport const fromIni = (init = {}) => _fromIni({\n ...init,\n});\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromInstanceMetadata as _fromInstanceMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromInstanceMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromInstanceMetadata\");\n return async () => _fromInstanceMetadata(init)().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_IMDS\", \"0\"));\n};\n",
"import { fromLoginCredentials as _fromLoginCredentials, } from \"@aws-sdk/credential-provider-login\";\nexport const fromLoginCredentials = (init) => _fromLoginCredentials({\n ...init,\n});\n",
"import { ENV_KEY, ENV_SECRET, fromEnv } from \"@aws-sdk/credential-provider-env\";\nimport { CredentialsProviderError, ENV_PROFILE } from \"@smithy/core/config\";\nimport { remoteProvider } from \"./remoteProvider\";\nimport { memoizeChain } from \"./runtime/memoize-chain\";\nlet multipleCredentialSourceWarningEmitted = false;\nexport const defaultProvider = (init = {}) => memoizeChain([\n async () => {\n const profile = init.profile ?? process.env[ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\"\n ? init.logger.warn.bind(init.logger)\n : console.warn;\n warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true,\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return fromEnv(init)();\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new CredentialsProviderError(\"Skipping SSO provider in default chain (inputs do not include SSO fields).\", { logger: init.logger });\n }\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await import(\"@aws-sdk/credential-provider-ini\");\n return fromIni(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await import(\"@aws-sdk/credential-provider-process\");\n return fromProcess(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await import(\"@aws-sdk/credential-provider-web-identity\");\n return fromTokenFile(init)(awsIdentityProperties);\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger,\n });\n },\n], credentialsTreatedAsExpired);\nexport const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;\nexport const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;\n",
"import { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nexport const remoteProvider = async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n return chain(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== \"false\") {\n return async () => {\n throw new CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n};\n",
"export function memoizeChain(providers, treatAsExpired) {\n const chain = internalCreateChain(providers);\n let activeLock;\n let passiveLock;\n let credentials;\n const provider = async (options) => {\n if (options?.forceRefresh) {\n return await chain(options);\n }\n if (credentials?.expiration) {\n if (credentials?.expiration?.getTime() < Date.now()) {\n credentials = undefined;\n }\n }\n if (activeLock) {\n await activeLock;\n }\n else if (!credentials || treatAsExpired?.(credentials)) {\n if (credentials) {\n if (!passiveLock) {\n passiveLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n passiveLock = undefined;\n });\n }\n }\n else {\n activeLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n activeLock = undefined;\n });\n return provider(options);\n }\n }\n return credentials;\n };\n return provider;\n}\nexport const internalCreateChain = (providers) => async (awsIdentityProperties) => {\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { defaultProvider } from \"@aws-sdk/credential-provider-node\";\nexport const fromNodeProviderChain = (init = {}) => defaultProvider({\n ...init,\n});\n",
"import { fromProcess as _fromProcess } from \"@aws-sdk/credential-provider-process\";\nexport const fromProcess = (init) => _fromProcess(init);\n",
"import { fromSSO as _fromSSO } from \"@aws-sdk/credential-provider-sso\";\nexport const fromSSO = (init = {}) => {\n return _fromSSO({ ...init });\n};\n",
"import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS } from \"@smithy/core/config\";\nimport { fromNodeProviderChain } from \"./fromNodeProviderChain\";\nimport { fromTemporaryCredentials as fromTemporaryCredentialsBase } from \"./fromTemporaryCredentials.base\";\nexport const fromTemporaryCredentials = (options) => {\n return fromTemporaryCredentialsBase(options, fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => loadConfig({\n environmentVariableSelector: (env) => env.AWS_REGION,\n configFileSelector: (profileData) => {\n return profileData.region;\n },\n default: () => undefined,\n }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, profile })());\n};\n",
"import { normalizeProvider } from \"@smithy/core\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nconst ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nexport const fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {\n let stsClient;\n return async (awsIdentityProperties = {}) => {\n const { callerClientConfig } = awsIdentityProperties;\n const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;\n const logger = options.logger ?? callerClientConfig?.logger;\n logger?.debug(\"@aws-sdk/credential-providers - fromTemporaryCredentials (STS)\");\n const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? \"aws-sdk-js-\" + Date.now() };\n if (params?.SerialNumber) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {\n tryNextLink: false,\n logger,\n });\n }\n params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);\n }\n const { AssumeRoleCommand, STSClient } = await import(\"./loadSts.js\");\n if (!stsClient) {\n const defaultCredentialsOrError = typeof credentialDefaultProvider === \"function\" ? credentialDefaultProvider() : undefined;\n const credentialSources = [\n options.masterCredentials,\n options.clientConfig?.credentials,\n void callerClientConfig?.credentials,\n callerClientConfig?.credentialDefaultProvider?.(),\n defaultCredentialsOrError,\n ];\n let credentialSource = \"STS client default credentials\";\n if (credentialSources[0]) {\n credentialSource = \"options.masterCredentials\";\n }\n else if (credentialSources[1]) {\n credentialSource = \"options.clientConfig.credentials\";\n }\n else if (credentialSources[2]) {\n credentialSource = \"caller client's credentials\";\n throw new Error(\"fromTemporaryCredentials recursion in callerClientConfig.credentials\");\n }\n else if (credentialSources[3]) {\n credentialSource = \"caller client's credentialDefaultProvider\";\n }\n else if (credentialSources[4]) {\n credentialSource = \"AWS SDK default credentials\";\n }\n const regionSources = [\n options.clientConfig?.region,\n callerClientConfig?.region,\n await regionProvider?.({\n profile,\n }),\n ASSUME_ROLE_DEFAULT_REGION,\n ];\n let regionSource = \"default partition's default region\";\n if (regionSources[0]) {\n regionSource = \"options.clientConfig.region\";\n }\n else if (regionSources[1]) {\n regionSource = \"caller client's region\";\n }\n else if (regionSources[2]) {\n regionSource = \"file or env region\";\n }\n const requestHandlerSources = [\n filterRequestHandler(options.clientConfig?.requestHandler),\n filterRequestHandler(callerClientConfig?.requestHandler),\n ];\n let requestHandlerSource = \"STS default requestHandler\";\n if (requestHandlerSources[0]) {\n requestHandlerSource = \"options.clientConfig.requestHandler\";\n }\n else if (requestHandlerSources[1]) {\n requestHandlerSource = \"caller client's requestHandler\";\n }\n logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +\n `${regionSource}=${await normalizeProvider(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);\n stsClient = new STSClient({\n userAgentAppId: callerClientConfig?.userAgentAppId,\n ...options.clientConfig,\n credentials: coalesce(credentialSources),\n logger,\n profile,\n region: coalesce(regionSources),\n requestHandler: coalesce(requestHandlerSources),\n });\n }\n if (options.clientPlugins) {\n for (const plugin of options.clientPlugins) {\n stsClient.middlewareStack.use(plugin);\n }\n }\n const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {\n logger,\n });\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n credentialScope: Credentials.CredentialScope,\n };\n };\n};\nconst filterRequestHandler = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\" ? undefined : requestHandler;\n};\nconst coalesce = (args) => {\n for (const item of args) {\n if (item !== undefined) {\n return item;\n }\n }\n};\n",
"import { fromTokenFile as _fromTokenFile } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromTokenFile = (init = {}) => _fromTokenFile({\n ...init,\n});\n",
"import { fromWebToken as _fromWebToken } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromWebToken = (init) => _fromWebToken({\n ...init,\n});\n"
],
"mappings": ";4lBAAA,oBACa,QAAwB,SAAI,SAAwB,MAC7D,SAAI,OAAc,QAQZ,OAAc,YAAO,YAPN,MAAO,IAA0B,CAClD,IAAM,EAAc,MAAM,GAAsB,GAAG,CAAmB,EAAE,CAAqB,EAC7F,GAAI,CAAC,EAAY,YAAc,IAAgB,GAC3C,EAAY,WAAa,IAAI,KAAK,KAAK,IAAI,EAAI,CAAW,EAE9D,OAAO,GAEqC,CAC5C,WAAW,CAAC,EAAc,CACtB,GAAI,EAAe,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.41+d6123d32214422cb/node_modules/@ai-sdk/deepinfra/dist/index.mjs"],
"sourcesContent": [
"// src/deepinfra-provider.ts\nimport {\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/deepinfra-image-model.ts\nimport {\n combineHeaders,\n convertBase64ToUint8Array,\n convertToFormData,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n downloadBlob,\n postFormDataToApi,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar DeepInfraImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n aspectRatio,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n if (files != null && files.length > 0) {\n const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({\n url: this.getEditUrl(),\n headers: combineHeaders(this.config.headers(), headers),\n formData: convertToFormData(\n {\n model: this.modelId,\n prompt,\n image: await Promise.all(files.map((file) => fileToBlob(file))),\n mask: mask != null ? await fileToBlob(mask) : void 0,\n n,\n size,\n ...(_d = providerOptions.deepinfra) != null ? _d : {}\n },\n { useArrayBrackets: false }\n ),\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraEditErrorSchema,\n errorToMessage: (error) => {\n var _a2, _b2;\n return (_b2 = (_a2 = error.error) == null ? void 0 : _a2.message) != null ? _b2 : \"Unknown error\";\n }\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraEditResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response2.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders2\n }\n };\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi({\n url: `${this.config.baseURL}/${this.modelId}`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n prompt,\n num_images: n,\n ...aspectRatio && { aspect_ratio: aspectRatio },\n ...splitSize && { width: splitSize[0], height: splitSize[1] },\n ...seed != null && { seed },\n ...(_e = providerOptions.deepinfra) != null ? _e : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraErrorSchema,\n errorToMessage: (error) => error.detail.error\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.images.map(\n (image) => image.replace(/^data:image\\/\\w+;base64,/, \"\")\n ),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n getEditUrl() {\n const baseUrl = this.config.baseURL.replace(\"/inference\", \"/openai\");\n return `${baseUrl}/images/edits`;\n }\n};\nvar deepInfraErrorSchema = z.object({\n detail: z.object({\n error: z.string()\n })\n});\nvar deepInfraImageResponseSchema = z.object({\n images: z.array(z.string())\n});\nvar deepInfraEditErrorSchema = z.object({\n error: z.object({\n message: z.string()\n }).optional()\n});\nvar deepInfraEditResponseSchema = z.object({\n data: z.array(z.object({ b64_json: z.string() }))\n});\nasync function fileToBlob(file) {\n if (file.type === \"url\") {\n return downloadBlob(file.url);\n }\n const data = file.data instanceof Uint8Array ? file.data : convertBase64ToUint8Array(file.data);\n return new Blob([data], { type: file.mediaType });\n}\n\n// src/deepinfra-chat-language-model.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nvar DeepInfraChatLanguageModel = class extends OpenAICompatibleChatLanguageModel {\n constructor(modelId, config) {\n super(modelId, config);\n }\n /**\n * Fixes incorrect token usage for Gemini/Gemma models from DeepInfra.\n *\n * DeepInfra's API returns completion_tokens that don't include reasoning_tokens\n * for Gemini/Gemma models, which violates the OpenAI-compatible spec.\n * According to the spec, completion_tokens should include reasoning_tokens.\n *\n * Example of incorrect data from DeepInfra:\n * {\n * \"completion_tokens\": 84, // text-only tokens\n * \"completion_tokens_details\": {\n * \"reasoning_tokens\": 1081 // reasoning tokens not included above\n * }\n * }\n *\n * This would result in negative text tokens: 84 - 1081 = -997\n *\n * The fix: If reasoning_tokens > completion_tokens, add reasoning_tokens\n * to completion_tokens: 84 + 1081 = 1165\n */\n fixUsageForGeminiModels(usage) {\n var _a, _b;\n if (!usage || !((_a = usage.completion_tokens_details) == null ? void 0 : _a.reasoning_tokens)) {\n return usage;\n }\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = usage.completion_tokens_details.reasoning_tokens;\n if (reasoningTokens > completionTokens) {\n const correctedCompletionTokens = completionTokens + reasoningTokens;\n return {\n ...usage,\n // Add reasoning_tokens to completion_tokens to get the correct total\n completion_tokens: correctedCompletionTokens,\n // Update total_tokens if present\n total_tokens: usage.total_tokens != null ? usage.total_tokens + reasoningTokens : void 0\n };\n }\n return usage;\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const result = await super.doGenerate(options);\n if ((_a = result.usage) == null ? void 0 : _a.raw) {\n const fixedRawUsage = this.fixUsageForGeminiModels(result.usage.raw);\n if (fixedRawUsage !== result.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n return {\n ...result,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n };\n }\n }\n return result;\n }\n async doStream(options) {\n const result = await super.doStream(options);\n const originalStream = result.stream;\n const fixUsage = this.fixUsageForGeminiModels.bind(this);\n const transformedStream = new ReadableStream({\n async start(controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n const reader = originalStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value.type === \"finish\" && ((_a = value.usage) == null ? void 0 : _a.raw)) {\n const fixedRawUsage = fixUsage(value.usage.raw);\n if (fixedRawUsage !== value.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n controller.enqueue({\n ...value,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n });\n } else {\n controller.enqueue(value);\n }\n } else {\n controller.enqueue(value);\n }\n }\n controller.close();\n } catch (error) {\n controller.error(error);\n }\n }\n });\n return {\n ...result,\n stream: transformedStream\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/deepinfra-provider.ts\nfunction createDeepInfra(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.deepinfra.com/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"DEEPINFRA_API_KEY\",\n description: \"DeepInfra's API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/deepinfra/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `deepinfra.${modelType}`,\n url: ({ path }) => `${baseURL}/openai${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new DeepInfraChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new DeepInfraImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL ? `${baseURL}/inference` : \"https://api.deepinfra.com/v1/inference\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.chatModel = createChatModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.languageModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n return provider;\n}\nvar deepinfra = createDeepInfra();\nexport {\n VERSION,\n createDeepInfra,\n deepinfra\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wVAuBA,SAAI,OAAsB,UAAM,MAC9B,gBAAW,CAAC,EAAS,EAAQ,CAC3B,KAAK,QAAU,EACf,KAAK,OAAS,EACd,KAAK,qBAAuB,KAC5B,KAAK,iBAAmB,KAEtB,SAAQ,EAAG,CACb,OAAO,KAAK,OAAO,cAEf,WAAU,EACd,SACA,IAC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GACtB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,aAAa,IACvB,IAAK,EAAG,UAAW,GAAG,WAAiB,IACvC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EACT,EACA,EAAqB,MAAM,CAC7B,GAEI,EAAwB,CAAC,IAAY,IAAI,EAC7C,EACA,EAAqB,YAAY,CACnC,EACM,EAAuB,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAoB,EAAS,IAClE,EAAqB,OAAO,EAC/B,QAAS,EAAU,GAAG,cAAsB,wCAC9C,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EASrD,OARA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,UAAY,EACrB,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,cAAgB,EACzB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EACvB,EAET,IAAI,GAAY,EAAgB",
"debugId": "6CC809BC0AFEFFEA64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "7850CC4D8970D0EB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nimport { NodeHttpHandler } from \"@smithy/node-http-handler\";\nimport fs from \"node:fs/promises\";\nimport { checkUrl } from \"./checkUrl\";\nimport { createGetRequest, getCredentials } from \"./requestHelpers\";\nimport { retryWrapper } from \"./retry-wrapper\";\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger?.warn\n ? console.warn\n : options.logger.warn.bind(options.logger);\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n checkUrl(url, options.logger);\n const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 });\n const requestTimeout = options.timeout ?? 1000;\n const provider = retryWrapper(async () => {\n const request = createGetRequest(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await fs.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request, { requestTimeout });\n return getCredentials(result.response).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n return async () => {\n try {\n return await provider();\n }\n finally {\n requestHandler.destroy?.();\n }\n };\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nexport const checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { parseRfc3339DateTime } from \"@smithy/core/serde\";\nimport { sdkStreamMixin } from \"@smithy/core/serde\";\nexport function createGetRequest(url) {\n return new HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexport async function getCredentials(response, logger) {\n const stream = sdkStreamMixin(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: parseRfc3339DateTime(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n",
"export const retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n"
],
"mappings": ";wPAAA,oBACA,gBACA,gBACA,gCCHA,eAGA,IAAM,EAAqB,gBACrB,EAA0B,iBAC1B,EAA0B,iBACnB,EAAW,CAAC,EAAK,IAAW,CACrC,GAAI,EAAI,WAAa,SACjB,OAEJ,GAAI,EAAI,WAAa,GACjB,EAAI,WAAa,GACjB,EAAI,WAAa,EACjB,OAEJ,GAAI,EAAI,SAAS,SAAS,GAAG,GACzB,GAAI,EAAI,WAAa,SAAW,EAAI,WAAa,4CAC7C,OAGH,KACD,GAAI,EAAI,WAAa,YACjB,OAEJ,IAAM,EAAe,EAAI,SAAS,MAAM,GAAG,EACrC,EAAU,CAAC,IAAc,CAC3B,IAAM,EAAM,SAAS,EAAW,EAAE,EAClC,MAAO,IAAK,GAAO,GAAO,KAE9B,GAAI,EAAa,KAAO,OACpB,EAAQ,EAAa,EAAE,GACvB,EAAQ,EAAa,EAAE,GACvB,EAAQ,EAAa,EAAE,GACvB,EAAa,SAAW,EACxB,OAGR,MAAM,IAAI,2BAAyB;AAAA;AAAA;AAAA,yDAGmB,CAAE,QAAO,CAAC,GCxCpE,eACA,WACA,WACA,WACO,SAAS,CAAgB,CAAC,EAAK,CAClC,OAAO,IAAI,cAAY,CACnB,SAAU,EAAI,SACd,SAAU,EAAI,SACd,KAAM,OAAO,EAAI,IAAI,EACrB,KAAM,EAAI,SACV,MAAO,MAAM,KAAK,EAAI,aAAa,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAM,EAAG,KAAO,CAElE,OADA,EAAI,GAAK,EACF,GACR,CAAC,CAAC,EACL,SAAU,EAAI,IACl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64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/service/status.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.status,\n Effect.fn(\"cli.service.status\")(function* () {\n const url = yield* (yield* Daemon.Service).status()\n process.stdout.write((url ? `running ${url}` : \"stopped\") + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,OAC5B,EAAG,oBAAoB,EAAE,SAAU,EAAG,CAC3C,IAAM,EAAM,OAAQ,MAAO,EAAO,SAAS,OAAO,EAClD,QAAQ,OAAO,OAAO,EAAM,WAAW,IAAQ,WAAa,CAAG,EAChE,CACH",
"debugId": "7228E0E6BBA9A5C664756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "C12335D2112B8E6564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cerebras@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/cerebras/dist/index.mjs"],
"sourcesContent": [
"// src/cerebras-provider.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/cerebras-provider.ts\nvar cerebrasErrorSchema = z.object({\n message: z.string(),\n type: z.string(),\n param: z.string(),\n code: z.string()\n});\nvar cerebrasErrorStructure = {\n errorSchema: cerebrasErrorSchema,\n errorToMessage: (data) => data.message\n};\nfunction createCerebras(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.cerebras.ai/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"CEREBRAS_API_KEY\",\n description: \"Cerebras API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cerebras/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n provider: `cerebras.chat`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch,\n errorStructure: cerebrasErrorStructure,\n supportsStructuredOutputs: true\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cerebras = createCerebras();\nexport {\n VERSION,\n cerebras,\n createCerebras\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qRAaA,SAAI,OAAiB,cAGjB,OAAsB,OAAE,OAAO,CACjC,QAAS,EAAE,OAAO,EAClB,KAAM,EAAE,OAAO,EACf,MAAO,EAAE,OAAO,EAChB,KAAM,EAAE,OAAO,CACjB,CAAC,EACG,EAAyB,CAC3B,YAAa,EACb,eAAgB,CAAC,IAAS,EAAK,OACjC,EACA,SAAS,CAAc,CAAC,EAAU,CAAC,EAAG,CACpC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,4BACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,mBACzB,YAAa,kBACf,CAAC,OACE,EAAQ,OACb,EACA,mBAAmB,GACrB,EACM,EAAsB,CAAC,IAAY,CACvC,OAAO,IAAI,EAAkC,EAAS,CACpD,SAAU,gBACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,MACf,eAAgB,EAChB,0BAA2B,EAC7B,CAAC,GAEG,EAAW,CAAC,IAAY,EAAoB,CAAO,EAWzD,OAVA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAW,EAAe",
"debugId": "0DF9C0B64F95F47764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/api.ts"],
"sourcesContent": [
"import { EOL } from \"node:os\"\nimport { Effect, Option } from \"effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Daemon } from \"../../services/daemon\"\n\nconst methods = new Set([\"delete\", \"get\", \"head\", \"options\", \"patch\", \"post\", \"put\"])\n\ntype Operation = {\n operationId?: string\n}\n\ntype OpenApi = {\n paths?: Record<string, Record<string, Operation>>\n}\n\nexport default Runtime.handler(\n Commands.commands.api,\n Effect.fn(\"cli.api\")(function* (input) {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const params = Option.getOrElse(input.param, () => ({}))\n const request = yield* resolveRequest(transport, input.request, params)\n const headers = new Headers(transport.headers)\n for (const header of input.header) {\n const index = header.indexOf(\":\")\n if (index < 1) return yield* Effect.fail(new Error(`Invalid header, expected name:value: ${header}`))\n headers.set(header.slice(0, index).trim(), header.slice(index + 1).trim())\n }\n const body = Option.getOrUndefined(input.data)\n if (body !== undefined && !headers.has(\"content-type\")) headers.set(\"content-type\", \"application/json\")\n\n const response = yield* Effect.tryPromise(() =>\n fetch(new URL(request.path, transport.url), {\n method: request.method,\n headers,\n body,\n }),\n )\n const output = yield* Effect.promise(() => response.text())\n if (output) process.stdout.write(output + (output.endsWith(EOL) ? \"\" : EOL))\n }),\n)\n\nexport function resolveOperation(spec: OpenApi, operationID: string, params: Record<string, string>) {\n for (const [path, operations] of Object.entries(spec.paths ?? {})) {\n for (const [method, operation] of Object.entries(operations)) {\n if (!methods.has(method) || operation.operationId !== operationID) continue\n return { method: method.toUpperCase(), path: interpolate(path, params) }\n }\n }\n throw new Error(`Operation not found: ${operationID}`)\n}\n\nexport function rawRequest(input: readonly string[]) {\n if (input.length !== 2 || !methods.has(input[0].toLowerCase()) || !input[1].startsWith(\"/\")) return\n return { method: input[0].toUpperCase(), path: input[1] }\n}\n\nfunction resolveRequest(\n transport: { url: string; headers: RequestInit[\"headers\"] },\n input: readonly string[],\n params: Record<string, string>,\n) {\n const raw = rawRequest(input)\n if (raw) return Effect.succeed(raw)\n if (input.length !== 1) return Effect.fail(new Error(\"Expected an operation name or an HTTP method and path\"))\n return Effect.tryPromise(async () => {\n const response = await fetch(new URL(\"/openapi.json\", transport.url), { headers: transport.headers })\n if (!response.ok) throw new Error(`Failed to load OpenAPI document: HTTP ${response.status}`)\n return resolveOperation((await response.json()) as OpenApi, input[0], params)\n })\n}\n\nfunction interpolate(path: string, params: Record<string, string>) {\n const used = new Set<string>()\n const pathname = path.replaceAll(/\\{([^}]+)\\}/g, (_, name: string) => {\n const value = params[name]\n if (value === undefined) throw new Error(`Missing path parameter: ${name}`)\n used.add(name)\n return encodeURIComponent(value)\n })\n const query = new URLSearchParams(Object.entries(params).filter(([name]) => !used.has(name))).toString()\n return query ? `${pathname}?${query}` : pathname\n}\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAM,OAAU,SAAI,S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+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProcessCredentials } from \"./resolveProcessCredentials\";\nexport const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await parseKnownFiles(init);\n return resolveProcessCredentials(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init.logger);\n};\n",
"import { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { getValidatedProcessCredentials } from \"./getValidatedProcessCredentials\";\nexport const resolveProcessCredentials = async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n }\n catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n }\n catch (error) {\n throw new CredentialsProviderError(error.message, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger,\n });\n }\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n};\n"
],
"mappings": ";kJAAA,oBCAA,oBACA,eAAS,sBACT,oBAAS,aCFT,eACa,EAAiC,CAAC,EAAa,EAAM,IAAa,CAC3E,GAAI,EAAK,UAAY,EACjB,MAAM,MAAM,WAAW,gDAA0D,EAErF,GAAI,EAAK,cAAgB,QAAa,EAAK,kBAAoB,OAC3D,MAAM,MAAM,WAAW,oDAA8D,EAEzF,GAAI,EAAK,WAAY,CACjB,IAAM,EAAc,IAAI,KAExB,GADmB,IAAI,KAAK,EAAK,UAAU,EAC1B,EACb,MAAM,MAAM,WAAW,oDAA8D,EAG7F,IAAI,EAAY,EAAK,UACrB,GAAI,CAAC,GAAa,IAAW,IAAc,eACvC,EAAY,EAAS,GAAa,eAEtC,IAAM,EAAc,CAChB,YAAa,EAAK,YAClB,gBAAiB,EAAK,mBAClB,EAAK,cAAgB,CAAE,aAAc,EAAK,YAAa,KACvD,EAAK,YAAc,CAAE,WAAY,IAAI,KAAK,EAAK,UAAU,CAAE,KAC3D,EAAK,iBAAmB,CAAE,gBAAiB,EAAK,eAAgB,KAChE,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,sBAAuB,GAAG,EACrD,GDxBJ,IAAM,EAA4B,MAAO,EAAa,EAAU,IAAW,CAC9E,IAAM,EAAU,EAAS,GACzB,GAAI,EAAS,GAAc,CACvB,IAAM,EAAoB,EAAQ,mBAClC,GAAI,IAAsB,OAAW,CACjC,IAAM,EAAc,EAAU,2BAAyB,iBAAiB,EAAE,MAAQ,CAAI,EACtF,GAAI,CACA,IAAQ,UAAW,MAAM,EAAY,CAAiB,EAClD,EACJ,GAAI,CACA,EAAO,KAAK,MAAM,EAAO,KAAK,CAAC,EAEnC,KAAM,CACF,MAAM,MAAM,WAAW,6CAAuD,EAElF,OAAO,EAA+B,EAAa,EAAM,CAAQ,EAErE,MAAO,EAAO,CACV,MAAM,IAAI,2BAAyB,EAAM,QAAS,CAAE,QAAO,CAAC,GAIhE,WAAM,IAAI,2BAAyB,WAAW,wCAAmD,CAAE,QAAO,CAAC,EAI/G,WAAM,IAAI,2BAAyB,WAAW,mDAA8D,CACxG,QACJ,CAAC,GD9BF,IAAM,EAAc,CAAC,EAAO,CAAC,IAAM,OAAS,sBAAuB,CAAC,IAAM,CAC7E,EAAK,QAAQ,MAAM,oDAAoD,EACvE,IAAM,EAAW,MAAM,kBAAgB,CAAI,EAC3C,OAAO,EAA0B,iBAAe,CAC5C,QAAS,EAAK,SAAW,GAAoB,OACjD,CAAC,EAAG,EAAU,EAAK,MAAM",
"debugId": "371001CEBC11B52C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/index.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractAsyncHooksContextManager = void 0;\nconst events_1 = require(\"events\");\nconst ADD_LISTENER_METHODS = [\n 'addListener',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n];\nclass AbstractAsyncHooksContextManager {\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n bind(context, target) {\n if (target instanceof events_1.EventEmitter) {\n return this._bindEventEmitter(context, target);\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n return target;\n }\n _bindFunction(context, target) {\n const manager = this;\n const contextWrapper = function (...args) {\n return manager.with(context, () => target.apply(this, args));\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n /**\n * It isn't possible to tell Typescript that contextWrapper is the same as T\n * so we forced to cast as any here.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return contextWrapper;\n }\n /**\n * By default, EventEmitter call their callback with their context, which we do\n * not want, instead we will bind a specific context to all callbacks that\n * go through it.\n * @param context the context we want to bind\n * @param ee EventEmitter an instance of EventEmitter to patch\n */\n _bindEventEmitter(context, ee) {\n const map = this._getPatchMap(ee);\n if (map !== undefined)\n return ee;\n this._createPatchMap(ee);\n // patch methods that add a listener to propagate context\n ADD_LISTENER_METHODS.forEach(methodName => {\n if (ee[methodName] === undefined)\n return;\n ee[methodName] = this._patchAddListener(ee, ee[methodName], context);\n });\n // patch methods that remove a listener\n if (typeof ee.removeListener === 'function') {\n ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);\n }\n if (typeof ee.off === 'function') {\n ee.off = this._patchRemoveListener(ee, ee.off);\n }\n // patch method that remove all listeners\n if (typeof ee.removeAllListeners === 'function') {\n ee.removeAllListeners = this._patchRemoveAllListeners(ee, ee.removeAllListeners);\n }\n return ee;\n }\n /**\n * Patch methods that remove a given listener so that we match the \"patched\"\n * version of that listener (the one that propagate context).\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveListener(ee, original) {\n const contextManager = this;\n return function (event, listener) {\n const events = contextManager._getPatchMap(ee)?.[event];\n if (events === undefined) {\n return original.call(this, event, listener);\n }\n const patchedListener = events.get(listener);\n return original.call(this, event, patchedListener || listener);\n };\n }\n /**\n * Patch methods that remove all listeners so we remove our\n * internal references for a given event.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveAllListeners(ee, original) {\n const contextManager = this;\n return function (event) {\n const map = contextManager._getPatchMap(ee);\n if (map !== undefined) {\n if (arguments.length === 0) {\n contextManager._createPatchMap(ee);\n }\n else if (map[event] !== undefined) {\n delete map[event];\n }\n }\n return original.apply(this, arguments);\n };\n }\n /**\n * Patch methods on an event emitter instance that can add listeners so we\n * can force them to propagate a given context.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n * @param [context] context to propagate when calling listeners\n */\n _patchAddListener(ee, original, context) {\n const contextManager = this;\n return function (event, listener) {\n /**\n * This check is required to prevent double-wrapping the listener.\n * The implementation for ee.once wraps the listener and calls ee.on.\n * Without this check, we would wrap that wrapped listener.\n * This causes an issue because ee.removeListener depends on the onceWrapper\n * to properly remove the listener. If we wrap their wrapper, we break\n * that detection.\n */\n if (contextManager._wrapped) {\n return original.call(this, event, listener);\n }\n let map = contextManager._getPatchMap(ee);\n if (map === undefined) {\n map = contextManager._createPatchMap(ee);\n }\n let listeners = map[event];\n if (listeners === undefined) {\n listeners = new WeakMap();\n map[event] = listeners;\n }\n const patchedListener = contextManager.bind(context, listener);\n // store a weak reference of the user listener to ours\n listeners.set(listener, patchedListener);\n /**\n * See comment at the start of this function for the explanation of this property.\n */\n contextManager._wrapped = true;\n try {\n return original.call(this, event, patchedListener);\n }\n finally {\n contextManager._wrapped = false;\n }\n };\n }\n _createPatchMap(ee) {\n const map = Object.create(null);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ee[this._kOtListeners] = map;\n return map;\n }\n _getPatchMap(ee) {\n return ee[this._kOtListeners];\n }\n _kOtListeners = Symbol('OtListeners');\n _wrapped = false;\n}\nexports.AbstractAsyncHooksContextManager = AbstractAsyncHooksContextManager;\n//# sourceMappingURL=AbstractAsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncHooksContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst asyncHooks = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\n/**\n * @deprecated Use AsyncLocalStorageContextManager instead.\n */\nclass AsyncHooksContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncHook;\n _contexts = new Map();\n _stack = [];\n constructor() {\n super();\n this._asyncHook = asyncHooks.createHook({\n init: this._init.bind(this),\n before: this._before.bind(this),\n after: this._after.bind(this),\n destroy: this._destroy.bind(this),\n promiseResolve: this._destroy.bind(this),\n });\n }\n active() {\n return this._stack[this._stack.length - 1] ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n this._enterContext(context);\n try {\n return fn.call(thisArg, ...args);\n }\n finally {\n this._exitContext();\n }\n }\n enable() {\n this._asyncHook.enable();\n return this;\n }\n disable() {\n this._asyncHook.disable();\n this._contexts.clear();\n this._stack = [];\n return this;\n }\n /**\n * Init hook will be called when userland create a async context, setting the\n * context as the current one if it exist.\n * @param uid id of the async context\n * @param type the resource type\n */\n _init(uid, type) {\n // ignore TIMERWRAP as they combine timers with same timeout which can lead to\n // false context propagation. TIMERWRAP has been removed in node 11\n // every timer has it's own `Timeout` resource anyway which is used to propagate\n // context.\n if (type === 'TIMERWRAP')\n return;\n const context = this._stack[this._stack.length - 1];\n if (context !== undefined) {\n this._contexts.set(uid, context);\n }\n }\n /**\n * Destroy hook will be called when a given context is no longer used so we can\n * remove its attached context.\n * @param uid uid of the async context\n */\n _destroy(uid) {\n this._contexts.delete(uid);\n }\n /**\n * Before hook is called just before executing a async context.\n * @param uid uid of the async context\n */\n _before(uid) {\n const context = this._contexts.get(uid);\n if (context !== undefined) {\n this._enterContext(context);\n }\n }\n /**\n * After hook is called just after completing the execution of a async context.\n */\n _after() {\n this._exitContext();\n }\n /**\n * Set the given context as active\n */\n _enterContext(context) {\n this._stack.push(context);\n }\n /**\n * Remove the context at the root of the stack\n */\n _exitContext() {\n this._stack.pop();\n }\n}\nexports.AsyncHooksContextManager = AsyncHooksContextManager;\n//# sourceMappingURL=AsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst async_hooks_1 = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\nclass AsyncLocalStorageContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncLocalStorage;\n constructor() {\n super();\n this._asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();\n }\n active() {\n return this._asyncLocalStorage.getStore() ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n const cb = thisArg == null ? fn : fn.bind(thisArg);\n return this._asyncLocalStorage.run(context, cb, ...args);\n }\n enable() {\n return this;\n }\n disable() {\n this._asyncLocalStorage.disable();\n return this;\n }\n}\nexports.AsyncLocalStorageContextManager = AsyncLocalStorageContextManager;\n//# sourceMappingURL=AsyncLocalStorageContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0;\nvar AsyncHooksContextManager_1 = require(\"./AsyncHooksContextManager\");\nObject.defineProperty(exports, \"AsyncHooksContextManager\", { enumerable: true, get: function () { return AsyncHooksContextManager_1.AsyncHooksContextManager; } });\nvar AsyncLocalStorageContextManager_1 = require(\"./AsyncLocalStorageContextManager\");\nObject.defineProperty(exports, \"AsyncLocalStorageContextManager\", { enumerable: true, get: function () { return AsyncLocalStorageContextManager_1.AsyncLocalStorageContextManager; } });\n//# sourceMappingURL=index.js.map"
],
"mappings": ";yHAKA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,mCAAwC,OAChD,IAAM,cACA,EAAuB,CACzB,cACA,KACA,OACA,kBACA,qBACJ,EACA,MAAM,CAAiC,CAOnC,IAAI,CAAC,EAAS,EAAQ,CAClB,GAAI,aAAkB,EAAS,aAC3B,OAAO,KAAK,kBAAkB,EAAS,CAAM,EAEjD,GAAI,OAAO,IAAW,WAClB,OAAO,KAAK,cAAc,EAAS,CAAM,EAE7C,OAAO,EAEX,aAAa,CAAC,EAAS,EAAQ,CAC3B,IAAM,EAAU,KACV,EAAiB,QAAS,IAAI,EAAM,CACtC,OAAO,EAAQ,KAAK,EAAS,IAAM,EAAO,MAAM,KAAM,CAAI,CAAC,GAa/D,OAXA,OAAO,eAAe,EAAgB,SAAU,CAC5C,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,EAAO,MAClB,CAAC,EAMM,EASX,iBAAiB,CAAC,EAAS,EAAI,CAE3B,GADY,KAAK,aAAa,CAAE,IACpB,OACR,OAAO,EASX,GARA,KAAK,gBAAgB,CAAE,EAEvB,EAAqB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AE,OAAO,EAAkC,gCAAmC,CAAC",
"debugId": "6BA51238ED26533964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+node-http-handler@4.7.5/node_modules/@smithy/node-http-handler/dist-cjs/index.js"],
"sourcesContent": [
"'use strict';\n\nvar node_https = require('node:https');\nvar protocols = require('@smithy/core/protocols');\nvar node_stream = require('node:stream');\nvar http2 = require('node:http2');\n\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n\nconst NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\nconst getTransformedHeaders = (headers) => {\n const transformedHeaders = {};\n for (const name in headers) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n};\n\nconst timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n};\n\nconst DEFER_EVENT_LISTENER_TIME$2 = 1000;\nconst setConnectionTimeout = (request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = (offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {\n name: \"TimeoutError\",\n }));\n }, timeoutInMs - offset);\n const doWithSocket = (socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n }\n else {\n timing.clearTimeout(timeoutId);\n }\n };\n if (request.socket) {\n doWithSocket(request.socket);\n }\n else {\n request.on(\"socket\", doWithSocket);\n }\n };\n if (timeoutInMs < 2000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);\n};\n\nconst setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {\n if (timeoutInMs) {\n return timing.setTimeout(() => {\n let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? \"ERROR\" : \"WARN\"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;\n if (throwOnRequestTimeout) {\n const error = Object.assign(new Error(msg), {\n name: \"TimeoutError\",\n code: \"ETIMEDOUT\",\n });\n req.destroy(error);\n reject(error);\n }\n else {\n msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;\n logger?.warn?.(msg);\n }\n }, timeoutInMs);\n }\n return -1;\n};\n\nconst DEFER_EVENT_LISTENER_TIME$1 = 3000;\nconst setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = () => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n }\n else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n };\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n};\n\nconst DEFER_EVENT_LISTENER_TIME = 3000;\nconst setSocketTimeout = (request, reject, timeoutInMs = 0) => {\n const registerTimeout = (offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = () => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: \"TimeoutError\" }));\n };\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n }\n else {\n request.setTimeout(timeout, onTimeout);\n }\n };\n if (0 < timeoutInMs && timeoutInMs < 6000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n};\n\nconst MIN_WAIT_TIME = 6_000;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {\n const headers = request.headers;\n const expect = headers ? headers.Expect || headers.expect : undefined;\n let timeoutId = -1;\n let sendBody = true;\n if (!externalAgent && expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n }),\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\nfunction writeBody(httpRequest, body) {\n if (body instanceof node_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n const isBuffer = Buffer.isBuffer(body);\n const isString = typeof body === \"string\";\n if (isBuffer || isString) {\n if (isBuffer && body.byteLength === 0) {\n httpRequest.end();\n }\n else {\n httpRequest.end(body);\n }\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" &&\n uint8.buffer &&\n typeof uint8.byteOffset === \"number\" &&\n typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n\nconst DEFAULT_REQUEST_TIMEOUT = 0;\nlet hAgent = undefined;\nlet hRequest = undefined;\nclass NodeHttpHandler {\n config;\n configProvider;\n socketWarningTimestamp = 0;\n externalAgent = false;\n metadata = { handlerProtocol: \"http/1.1\" };\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttpHandler(instanceOrOptions);\n }\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15_000;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n })\n .catch(reject);\n }\n else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const config = this.config;\n const isSSL = request.protocol === \"https:\";\n if (!isSSL && !this.config.httpAgent) {\n this.config.httpAgent = await this.config.httpAgentProvider();\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = undefined;\n let socketWarningTimeoutId = -1;\n let connectionTimeoutId = -1;\n let requestTimeoutId = -1;\n let socketTimeoutId = -1;\n let keepAliveTimeoutId = -1;\n const clearTimeouts = () => {\n timing.clearTimeout(socketWarningTimeoutId);\n timing.clearTimeout(connectionTimeoutId);\n timing.clearTimeout(requestTimeoutId);\n timing.clearTimeout(socketTimeoutId);\n timing.clearTimeout(keepAliveTimeoutId);\n };\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const headers = request.headers;\n const expectContinue = headers ? (headers.Expect ?? headers.expect) === \"100-continue\" : false;\n let agent = isSSL ? config.httpsAgent : config.httpAgent;\n if (expectContinue && !this.externalAgent) {\n agent = new (isSSL ? node_https.Agent : hAgent)({\n keepAlive: false,\n maxSockets: Infinity,\n });\n }\n socketWarningTimeoutId = timing.setTimeout(() => {\n this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);\n }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));\n const queryString = request.query ? protocols.buildQueryString(request.query) : \"\";\n let auth = undefined;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n }\n else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth,\n };\n const requestFunc = isSSL ? node_https.request : hRequest;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new protocols.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res,\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n }\n else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = () => {\n req.destroy();\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;\n connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);\n requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);\n socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n keepAliveTimeoutId = setSocketKeepAlive(req, {\n keepAlive: httpAgent.keepAlive,\n keepAliveMsecs: httpAgent.keepAliveMsecs,\n });\n }\n writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {\n clearTimeouts();\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout,\n socketTimeout,\n socketAcquisitionWarningTimeout,\n throwOnRequestTimeout,\n httpAgentProvider: async () => {\n const { Agent, request } = await import('node:http');\n hRequest = request;\n hAgent = Agent;\n if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpAgent;\n }\n return new hAgent({ keepAlive, maxSockets, ...httpAgent });\n },\n httpsAgent: (() => {\n if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpsAgent;\n }\n return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger,\n };\n }\n}\n\nconst ids = new Uint16Array(1);\nclass ClientHttp2SessionRef {\n id = ids[0]++;\n total = 0;\n max = 0;\n session;\n refs = 0;\n constructor(session) {\n session.unref();\n this.session = session;\n }\n retain() {\n if (this.session.destroyed) {\n throw new Error(\"@smithy/node-http-handler - cannot acquire reference to destroyed session.\");\n }\n this.refs += 1;\n this.total += 1;\n this.max = Math.max(this.refs, this.max);\n this.session.ref();\n }\n free() {\n if (this.session.destroyed) {\n return;\n }\n this.refs -= 1;\n if (this.refs === 0) {\n this.session.unref();\n }\n if (this.refs < 0) {\n throw new Error(\"@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.\");\n }\n }\n deref() {\n return this.session;\n }\n close() {\n if (!this.session.closed) {\n this.session.close();\n }\n }\n destroy() {\n this.refs = 0;\n if (!this.session.destroyed) {\n this.session.destroy();\n }\n }\n useCount() {\n return this.refs;\n }\n}\n\nclass NodeHttp2ConnectionPool {\n sessions = [];\n maxConcurrency = 0;\n constructor(sessions) {\n this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));\n }\n poll() {\n let cleanup = false;\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n cleanup = true;\n continue;\n }\n if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {\n return session;\n }\n }\n if (cleanup) {\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n this.remove(session);\n }\n }\n }\n }\n offerLast(ref) {\n this.sessions.push(ref);\n }\n remove(ref) {\n const ix = this.sessions.indexOf(ref);\n if (ix > -1) {\n this.sessions.splice(ix, 1);\n }\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n setMaxConcurrency(maxConcurrency) {\n this.maxConcurrency = maxConcurrency;\n }\n destroy(ref) {\n this.remove(ref);\n ref.destroy();\n }\n}\n\nclass NodeHttp2ConnectionManager {\n config;\n connectOptions;\n connectionPools = new Map();\n constructor(config) {\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const pool = this.getPool(url);\n if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {\n const available = pool.poll();\n if (available) {\n available.retain();\n return available;\n }\n }\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\"Fail to set maxConcurrentStreams to \" +\n this.config.maxConcurrency +\n \"when creating new session for \" +\n requestContext.destination.toString());\n }\n });\n }\n const graceful = () => {\n this.removeFromPoolAndClose(url, ref);\n };\n const ensureDestroyed = () => {\n this.removeFromPoolAndCheckedDestroy(url, ref);\n };\n session.on(\"goaway\", graceful);\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n pool.offerLast(ref);\n ref.retain();\n return ref;\n }\n release(_requestContext, ref) {\n ref.free();\n }\n createIsolatedSession(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n session.settings({ maxConcurrentStreams: 1 });\n const ensureDestroyed = () => {\n ref.destroy();\n };\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n ref.retain();\n return ref;\n }\n destroy() {\n for (const [url, connectionPool] of this.connectionPools) {\n for (const session of [...connectionPool]) {\n session.destroy();\n }\n this.connectionPools.delete(url);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n for (const pool of this.connectionPools.values()) {\n pool.setMaxConcurrency(maxConcurrentStreams);\n }\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) {\n this.connectOptions = nodeHttp2ConnectOptions;\n }\n debug() {\n const pools = {};\n for (const [url, pool] of this.connectionPools) {\n const sessions = [];\n for (const ref of pool) {\n sessions.push({\n id: ref.id,\n active: ref.useCount(),\n maxConcurrent: ref.max,\n totalRequests: ref.total,\n });\n }\n pools[url] = { sessions };\n }\n return pools;\n }\n removeFromPoolAndClose(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.close();\n }\n removeFromPoolAndCheckedDestroy(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.destroy();\n }\n getPool(url) {\n if (!this.connectionPools.has(url)) {\n const pool = new NodeHttp2ConnectionPool();\n if (this.config.maxConcurrency) {\n pool.setMaxConcurrency(this.config.maxConcurrency);\n }\n this.connectionPools.set(url, pool);\n }\n return this.connectionPools.get(url);\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n connect(url) {\n return this.connectOptions === undefined ? http2.connect(url) : http2.connect(url, this.connectOptions);\n }\n}\n\nclass NodeHttp2Handler {\n config;\n configProvider;\n metadata = { handlerProtocol: \"h2\" };\n connectionManager = new NodeHttp2ConnectionManager({});\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttp2Handler(instanceOrOptions);\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((opts) => {\n resolve(opts || {});\n })\n .catch(reject);\n }\n else {\n resolve(options || {});\n }\n });\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;\n this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);\n if (maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);\n }\n if (nodeHttp2ConnectOptions) {\n this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);\n }\n }\n const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;\n const useIsolatedSession = disableConcurrentStreams || isEventStream;\n const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = undefined;\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const connectConfig = {\n requestTimeout: this.config?.sessionTimeout,\n isEventStream,\n };\n const ref = useIsolatedSession\n ? this.connectionManager.createIsolatedSession(requestContext, connectConfig)\n : this.connectionManager.lease(requestContext, connectConfig);\n const session = ref.deref();\n const rejectWithDestroy = (err) => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n fulfilled = true;\n reject(err);\n };\n const queryString = query ? protocols.buildQueryString(query) : \"\";\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const clientHttp2Stream = session.request({\n ...request.headers,\n [http2.constants.HTTP2_HEADER_PATH]: path,\n [http2.constants.HTTP2_HEADER_METHOD]: method,\n });\n if (effectiveRequestTimeout) {\n clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {\n clientHttp2Stream.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = () => {\n clientHttp2Stream.close();\n const abortError = buildAbortError(abortSignal);\n rejectWithDestroy(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n clientHttp2Stream.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n clientHttp2Stream.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n clientHttp2Stream.on(\"error\", rejectWithDestroy);\n clientHttp2Stream.on(\"aborted\", () => {\n rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));\n });\n clientHttp2Stream.on(\"response\", (headers) => {\n const httpResponse = new protocols.HttpResponse({\n statusCode: headers[\":status\"] ?? -1,\n headers: getTransformedHeaders(headers),\n body: clientHttp2Stream,\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (useIsolatedSession) {\n session.close();\n }\n });\n clientHttp2Stream.on(\"close\", () => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n else {\n this.connectionManager.release(requestContext, ref);\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\n\nclass Collector extends node_stream.Writable {\n bufferedBytes = [];\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n}\n\nconst streamCollector = (stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n};\nconst isReadableStreamInstance = (stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream;\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n\nexports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;\nexports.NodeHttp2Handler = NodeHttp2Handler;\nexports.NodeHttpHandler = NodeHttpHandler;\nexports.streamCollector = streamCollector;\n"
],
"mappings": ";2HAEA,SAAI,aACA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AO,IACA,GACF,GAAM,CACX,EACH,EAEL,kBAAkB,EAAG,CACjB,OAAO,KAAK,QAAU,CAAC,EAE/B,CAEA,MAAM,UAAkB,EAAY,QAAS,CACzC,cAAgB,CAAC,EACjB,MAAM,CAAC,EAAO,EAAU,EAAU,CAC9B,KAAK,cAAc,KAAK,CAAK,EAC7B,EAAS,EAEjB,CAEA,IAAM,GAAkB,CAAC,IAAW,CAChC,GAAI,GAAyB,CAAM,EAC/B,OAAO,GAAsB,CAAM,EAEvC,OAAO,IAAI,QAAQ,CAAC,EAAS,IAAW,CACpC,IAAM,EAAY,IAAI,EACtB,EAAO,KAAK,CAAS,EACrB,EAAO,GAAG,QAAS,CAAC,IAAQ,CACxB,EAAU,IAAI,EACd,EAAO,CAAG,EACb,EACD,EAAU,GAAG,QAAS,CAAM,EAC5B,EAAU,GAAG,SAAU,QAAS,EAAG,CAC/B,IAAM,EAAQ,IAAI,WAAW,OAAO,OAAO,KAAK,aAAa,CAAC,EAC9D,EAAQ,CAAK,EAChB,EACJ,GAEC,GAA2B,CAAC,IAAW,OAAO,iBAAmB,YAAc,aAAkB,eACvG,eAAe,EAAqB,CAAC,EAAQ,CACzC,IAAM,EAAS,CAAC,EACV,EAAS,EAAO,UAAU,EAC5B,EAAS,GACT,EAAS,EACb,MAAO,CAAC,EAAQ,CACZ,IAAQ,OAAM,SAAU,MAAM,EAAO,KAAK,EAC1C,GAAI,EACA,EAAO,KAAK,CAAK,EACjB,GAAU,EAAM,OAEpB,EAAS,EAEb,IAAM,EAAY,IAAI,WAAW,CAAM,EACnC,EAAS,EACb,QAAW,KAAS,EAChB,EAAU,IAAI,EAAO,CAAM,EAC3B,GAAU,EAAM,OAEpB,OAAO,EAGH,2BAA0B,GAC1B,oBAAmB,EACnB,mBAAkB,EAClB,mBAAkB",
"debugId": "B72DDA0B4CEDB10764756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../core/src/image/photon.ts"],
"sourcesContent": [
"// @ts-ignore Bun's static file import is embedded by `bun build --compile`; some consumers also declare *.wasm.\nimport photonWasm from \"@silvia-odwyer/photon-node/photon_rs_bg.wasm\" with { type: \"file\" }\nimport { Effect } from \"effect\"\nimport path from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\nimport { FileSystem } from \"../filesystem\"\nimport { DecodeError, ResizerUnavailableError, SizeError } from \"../image\"\n\nconst JPEG_QUALITIES = [80, 85, 70, 55, 40]\n\nexport const make = Effect.gen(function* () {\n ;(globalThis as typeof globalThis & { __OPENCODE_PHOTON_WASM_PATH?: string }).__OPENCODE_PHOTON_WASM_PATH =\n path.isAbsolute(photonWasm) ? photonWasm : fileURLToPath(new URL(photonWasm, import.meta.url))\n const loadPhoton = yield* Effect.cached(\n Effect.tryPromise({\n try: () => import(\"@silvia-odwyer/photon-node\"),\n catch: () => new ResizerUnavailableError(),\n }),\n )\n return Effect.fn(\"Image.Photon.normalize\")(function* (\n resource: string,\n content: FileSystem.Content & { readonly encoding: \"base64\" },\n limits: {\n readonly autoResize: boolean\n readonly maxWidth: number\n readonly maxHeight: number\n readonly maxBase64Bytes: number\n },\n ) {\n const photon = yield* loadPhoton\n const decoded = yield* Effect.try({\n try: () => photon.PhotonImage.new_from_byteslice(Buffer.from(content.content, \"base64\")),\n catch: () => new DecodeError({ resource }),\n })\n try {\n const width = decoded.get_width()\n const height = decoded.get_height()\n const bytes = Buffer.byteLength(content.content, \"utf-8\")\n if (width <= limits.maxWidth && height <= limits.maxHeight && bytes <= limits.maxBase64Bytes) return content\n if (!limits.autoResize)\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n const scale = Math.min(1, limits.maxWidth / width, limits.maxHeight / height)\n const sizes = Array.from({ length: 32 }).reduce<Array<{ width: number; height: number }>>((acc) => {\n const previous = acc.at(-1) ?? {\n width: Math.max(1, Math.round(width * scale)),\n height: Math.max(1, Math.round(height * scale)),\n }\n const next =\n acc.length === 0\n ? previous\n : {\n width: previous.width === 1 ? 1 : Math.max(1, Math.floor(previous.width * 0.75)),\n height: previous.height === 1 ? 1 : Math.max(1, Math.floor(previous.height * 0.75)),\n }\n return acc.some((item) => item.width === next.width && item.height === next.height) ? acc : [...acc, next]\n }, [])\n for (const size of sizes) {\n const resized = photon.resize(decoded, size.width, size.height, photon.SamplingFilter.Lanczos3)\n try {\n const encoders: Array<readonly [mime: string, encode: () => Uint8Array]> = [\n [\"image/png\", () => resized.get_bytes()],\n ...JPEG_QUALITIES.map((quality) => [\"image/jpeg\", () => resized.get_bytes_jpeg(quality)] as const),\n ]\n for (const [mime, encode] of encoders) {\n const candidate = Buffer.from(encode()).toString(\"base64\")\n if (Buffer.byteLength(candidate, \"utf-8\") <= limits.maxBase64Bytes)\n return { ...content, content: candidate, encoding: \"base64\" as const, mime }\n }\n } finally {\n resized.free()\n }\n }\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n } finally {\n decoded.free()\n }\n })\n})\n"
],
"mappings": ";qaAGA,yBACA,6BAAS,iBAIT,SAAM,OAAiB,MAAC,QAAI,QAAI,QAAI,iBAAI,EAAE,EAE7B,EAAO,EAAO,IAAI,SAAU,EAAG,CACxC,WAA4E,4BAC5E,EAAK,WAAW,CAAU,EAAI,EAAa,EAAc,IAAI,IAAI,EAAY,YAAY,GAAG,CAAC,EAC/F,IAAM,EAAa,MAAO,EAAO,OAC/B,EAAO,WAAW,CAChB,IAAK,IAAa,yCAClB,MAAO,IAAM,IAAI,CACnB,CAAC,CACH,EACA,OAAO,EAAO,GAAG,wBAAwB,EAAE,SAAU,CACnD,EACA,EACA,EAMA,CACA,IAAM,EAAS,MAAO,EAChB,EAAU,MAAO,EAAO,IAAI,CAChC,IAAK,IAAM,EAAO,YAAY,mBAAmB,OAAO,KAAK,EAAQ,QAAS,QAAQ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AAM,EAAQ,UAAU,CAAC,EACvC,GAAG,EAAe,IAAI,CAAC,IAAY,CAAC,aAAc,IAAM,EAAQ,eAAe,CAAO,CAAC,CAAU,CACnG,EACA,QAAY,EAAM,KAAW,EAAU,CACrC,IAAM,EAAY,OAAO,KAAK,EAAO,CAAC,EAAE,SAAS,QAAQ,EACzD,GAAI,OAAO,WAAW,EAAW,OAAO,GAAK,EAAO,eAClD,MAAO,IAAK,EAAS,QAAS,EAAW,SAAU,SAAmB,MAAK,UAE/E,CACA,EAAQ,KAAK,GAGjB,OAAO,MAAO,IAAI,EAAU,CAC1B,WACA,QACA,SACA,QACA,SAAU,EAAO,SACjB,UAAW,EAAO,UAClB,SAAU,EAAO,cACnB,CAAC,SACD,CACA,EAAQ,KAAK,GAEhB,EACF",
"debugId": "CF88F24E19CB0D4F64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "E3E638146C8030F164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+core@3.24.5/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js"],
"sourcesContent": [
"'use strict';\n\nvar serde = require('@smithy/core/serde');\nvar schema = require('@smithy/core/schema');\nvar transport = require('@smithy/core/transport');\nvar types = require('@smithy/types');\n\nconst collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return serde.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return serde.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return serde.Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\nclass SerdeContext {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n\nclass HttpProtocol extends SerdeContext {\n options;\n compositeErrorRegistry;\n constructor(options) {\n super();\n this.options = options;\n this.compositeErrorRegistry = schema.TypeRegistry.for(options.defaultNamespace);\n for (const etr of options.errorTypeRegistries ?? []) {\n this.compositeErrorRegistry.copyFrom(etr);\n }\n }\n getRequestType() {\n return transport.HttpRequest;\n }\n getResponseType() {\n return transport.HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n if (!request.query) {\n request.query = {};\n }\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n request.query[k] = v;\n }\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name].join(\", \");\n }\n }\n return request;\n }\n else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : undefined;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query,\n };\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name];\n }\n }\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n if (this.serdeContext?.disableHostPrefix) {\n return;\n }\n const inputNs = schema.NormalizedSchema.of(operationSchema.input);\n const opTraits = schema.translateTraits(operationSchema.traits ?? {});\n if (opTraits.endpoint) {\n let hostPrefix = opTraits.endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n for (const [name, member] of inputNs.structIterator()) {\n if (!member.getMergedTraits().hostLabel) {\n continue;\n }\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n };\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.serializeEventStream({\n eventStream,\n requestSchema,\n initialRequest,\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.deserializeEventStream({\n response,\n responseSchema,\n initialResponseContainer,\n });\n }\n async loadEventStreamCapability() {\n const { EventStreamSerde } = await import('@smithy/core/event-streams');\n return new EventStreamSerde({\n marshaller: this.getEventStreamMarshaller(),\n serializer: this.serializer,\n deserializer: this.deserializer,\n serdeContext: this.serdeContext,\n defaultContentType: this.getDefaultContentType(),\n });\n }\n getDefaultContentType() {\n throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n return [];\n }\n getEventStreamMarshaller() {\n const context = this.serdeContext;\n if (!context.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n return context.eventStreamMarshaller;\n }\n}\n\nclass HttpBindingProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const input = _input && typeof _input === \"object\" ? _input : {};\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = schema.NormalizedSchema.of(operationSchema?.input);\n const payloadMemberNames = [];\n const payloadMemberSchemas = [];\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new transport.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = schema.translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n }\n else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n for (const [key, value] of traitSearchParams) {\n query[key] = value;\n }\n }\n }\n for (const [memberName, memberNs] of ns.structIterator()) {\n const memberTraits = memberNs.getMergedTraits() ?? {};\n const inputMemberValue = input[memberName];\n if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {\n if (memberTraits.httpLabel) {\n if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {\n throw new Error(`No value provided for input HTTP label: ${memberName}.`);\n }\n }\n continue;\n }\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n if (input[memberName]) {\n payload = await this.serializeEventStream({\n eventStream: input[memberName],\n requestSchema: ns,\n });\n }\n }\n else {\n payload = inputMemberValue;\n }\n }\n else {\n serializer.write(memberNs, inputMemberValue);\n payload = serializer.flush();\n }\n }\n else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMemberValue);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(`{${memberName}+}`, replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\"));\n }\n else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n }\n else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMemberValue);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n }\n else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const key in inputMemberValue) {\n const val = inputMemberValue[key];\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n }\n else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMemberValue, query);\n }\n else {\n hasNonHttpBindingMember = true;\n payloadMemberNames.push(memberName);\n payloadMemberSchemas.push(memberNs);\n }\n }\n if (hasNonHttpBindingMember && input) {\n const [namespace, name] = (ns.getName(true) ?? \"#Unknown\").split(\"#\");\n const requiredMembers = ns.getSchema()[6];\n const payloadSchema = [\n 3,\n namespace,\n name,\n ns.getMergedTraits(),\n payloadMemberNames,\n payloadMemberSchemas,\n undefined,\n ];\n if (requiredMembers) {\n payloadSchema[6] = requiredMembers;\n }\n else {\n payloadSchema.pop();\n }\n serializer.write(payloadSchema, input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const key in data) {\n if (!(key in query)) {\n const val = data[key];\n const valueSchema = ns.getValueSchema();\n Object.assign(valueSchema.getMergedTraits(), {\n ...traits,\n httpQuery: key,\n httpQueryParams: undefined,\n });\n this.serializeQuery(valueSchema, val, query);\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== undefined) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n }\n else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n if (dataFromBody[member] != null) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n }\n else if (nonHttpBindingMembers.discardResponseBody) {\n await collectBody(response.body, context);\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n async deserializeHttpMessage(schema$1, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n }\n else {\n dataObject = arg4;\n }\n let discardResponseBody = true;\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(schema$1);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n discardResponseBody = false;\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n dataObject[memberName] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n });\n }\n else {\n dataObject[memberName] = serde.sdkStreamMixin(response.body);\n }\n }\n else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n }\n else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n headerListValueSchema.getMergedTraits().httpHeader = key;\n let sections;\n if (headerListValueSchema.isTimestampSchema() &&\n headerListValueSchema.getSchema() === 4) {\n sections = serde.splitEvery(value, \",\", 2);\n }\n else {\n sections = serde.splitHeader(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read(headerListValueSchema, section.trim()));\n }\n dataObject[memberName] = list;\n }\n else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n }\n else if (memberTraits.httpPrefixHeaders !== undefined) {\n dataObject[memberName] = {};\n for (const header in response.headers) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n const value = response.headers[header];\n const valueSchema = memberSchema.getValueSchema();\n valueSchema.getMergedTraits().httpHeader = header;\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);\n }\n }\n }\n else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n }\n else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n nonHttpBindingMembers.discardResponseBody = discardResponseBody;\n return nonHttpBindingMembers;\n }\n}\n\nclass RpcProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = schema.NormalizedSchema.of(operationSchema?.input);\n const schema$1 = ns.getSchema();\n let payload;\n const input = _input && typeof _input === \"object\" ? _input : {};\n const request = new transport.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"/\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n if (input) {\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n if (input[eventStreamMember]) {\n const initialRequest = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n if (memberName !== eventStreamMember && input[memberName]) {\n serializer.write(memberSchema, input[memberName]);\n initialRequest[memberName] = serializer.flush();\n }\n }\n payload = await this.serializeEventStream({\n eventStream: input[eventStreamMember],\n requestSchema: ns,\n initialRequest,\n });\n }\n }\n else {\n serializer.write(schema$1, input);\n payload = serializer.flush();\n }\n }\n request.headers = Object.assign(request.headers, headers);\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n dataObject[eventStreamMember] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n initialResponseContainer: dataObject,\n });\n }\n else {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n}\n\nconst resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== undefined) {\n const labelValue = labelValueProvider();\n if (labelValue == null || labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel\n ? labelValue\n .split(\"/\")\n .map((segment) => extendedEncodeURIComponent(segment))\n .join(\"/\")\n : extendedEncodeURIComponent(labelValue));\n }\n else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath;\n};\n\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nclass RequestBuilder {\n input;\n context;\n query = {};\n method = \"\";\n headers = {};\n path = \"\";\n body = null;\n hostname = \"\";\n resolvePathStack = [];\n constructor(input, context) {\n this.input = input;\n this.context = context;\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new transport.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n\nfunction determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() &&\n (ns.getSchema() === 5 ||\n ns.getSchema() === 6 ||\n ns.getSchema() === 7)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings\n ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader)\n ? 6\n : Boolean(httpQuery) || Boolean(httpLabel)\n ? 5\n : undefined\n : undefined;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n\nclass FromStringShapeDeserializer extends SerdeContext {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n read(_schema, data) {\n const ns = schema.NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? serde.fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return serde._parseRfc3339DateTimeWithOffset(data);\n case 6:\n return serde._parseRfc7231DateTime(data);\n case 7:\n return serde._parseEpochTimestamp(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = serde.LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n if (ns.isNumericSchema()) {\n return Number(data);\n }\n if (ns.isBigIntegerSchema()) {\n return BigInt(data);\n }\n if (ns.isBigDecimalSchema()) {\n return new serde.NumericValue(data, \"bigDecimal\");\n }\n if (ns.isBooleanSchema()) {\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? serde.toUtf8)((this.serdeContext?.base64Decoder ?? serde.fromBase64)(base64String));\n }\n}\n\nclass HttpInterceptingShapeDeserializer extends SerdeContext {\n codecDeserializer;\n stringDeserializer;\n constructor(codecDeserializer, codecSettings) {\n super();\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema$1, data) {\n const ns = schema.NormalizedSchema.of(schema$1);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? serde.toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? serde.fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n }\n else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n}\n\nclass ToStringShapeSerializer extends SerdeContext {\n settings;\n stringBuffer = \"\";\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema$1, value) {\n const ns = schema.NormalizedSchema.of(schema$1);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n this.stringBuffer = serde.dateToUtcString(value);\n break;\n case 7:\n this.stringBuffer = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1000);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? serde.toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : serde.quoteHeader(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = serde.LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? serde.toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n if (ns.isIdempotencyToken()) {\n this.stringBuffer = serde.generateIdempotencyToken();\n }\n else {\n this.stringBuffer = String(value);\n }\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n}\n\nclass HttpInterceptingShapeSerializer {\n codecSerializer;\n stringSerializer;\n buffer;\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema$1, value) {\n const ns = schema.NormalizedSchema.of(schema$1);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== undefined) {\n const buffer = this.buffer;\n this.buffer = undefined;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n}\n\nclass Field {\n name;\n kind;\n values;\n constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n\nclass Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n\nconst getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nconst resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (transport.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n catch (error) {\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nconst contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nconst getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n});\n\nconst escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n\nconst escapeUriPath = (uri) => uri.split(\"/\").map(escapeUri).join(\"/\");\n\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n\nexports.HttpRequest = transport.HttpRequest;\nexports.HttpResponse = transport.HttpResponse;\nexports.isValidHostname = transport.isValidHostname;\nexports.parseQueryString = transport.parseQueryString;\nexports.parseUrl = transport.parseUrl;\nexports.Field = Field;\nexports.Fields = Fields;\nexports.FromStringShapeDeserializer = FromStringShapeDeserializer;\nexports.HttpBindingProtocol = HttpBindingProtocol;\nexports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;\nexports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;\nexports.HttpProtocol = HttpProtocol;\nexports.RequestBuilder = RequestBuilder;\nexports.RpcProtocol = RpcProtocol;\nexports.SerdeContext = SerdeContext;\nexports.ToStringShapeSerializer = ToStringShapeSerializer;\nexports.buildQueryString = buildQueryString;\nexports.collectBody = collectBody;\nexports.contentLengthMiddleware = contentLengthMiddleware;\nexports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions;\nexports.determineTimestampFormat = determineTimestampFormat;\nexports.escapeUri = escapeUri;\nexports.escapeUriPath = escapeUriPath;\nexports.extendedEncodeURIComponent = extendedEncodeURIComponent;\nexports.getContentLengthPlugin = getContentLengthPlugin;\nexports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;\nexports.requestBuilder = requestBuilder;\nexports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;\nexports.resolvedPath = resolvedPath;\n"
],
"mappings": ";2IAEA,SAAI,MACA,MACA,MACA,MAEE,EAAc,MAAO,EAAa,IAAI,WAAc,IAAY,CAClE,GAAI,aAAsB,WACtB,OAAO,EAAM,sBAAsB,OAAO,CAAU,EAExD,GAAI,CAAC,EACD,OAAO,EAAM,sBAAsB,OAAO,IAAI,UAAY,EAE9D,IAAM,EAAc,EAAQ,gBAAgB,CAAU,EACtD,OAAO,EAAM,sBAAsB,OAAO,MAAM,CAAW,GAG/D,SAAS,CAA0B,CAAC,EAAK,CACrC,OAAO,mBAAmB,CAAG,EAAE,QAAQ,WAAY,QAAS,CAAC,EAAG,CAC5D,MAAO,IAAM,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,YAAY,EACzD,EAGL,MAAM,CAAa,CACf,aACA,eAAe,CAAC,EAAc,CAC1B,KAAK,aAAe,EAE5B,CAEA,MAAM,UAAqB,CAAa,CACpC,QACA,uBACA,WAAW,CAAC,EAAS,CACjB,MAAM,EACN,KAAK,QAAU,EACf,KAAK,uBAAyB,EAAO,aAAa,IAAI,EAAQ,gBAAgB,EAC9E,QAAW,KAAO,EAAQ,qBAAuB,CAAC,EAC9C,KAAK,uBAAuB,SAAS,CAAG,EAGhD,cAAc,EAAG,CACb,OAAO,EAAU,YAErB,eAAe,EAAG,CACd,OAAO,EAAU,aAErB,eAAe,CAAC,EAAc,CAI1B,GAHA,KAAK,aAAe,EACpB,KAAK,WAAW,gBAAgB,CAAY,EAC5C,KAAK,aAAa,gBAAgB,CAAY,EAC1C,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAAE,gBAAgB,CAAY,EAG3D,qBAAqB,CAAC,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,IAAM,EAAQ,EAAM,GAEpB,GADA,EAAM,EAAU,CAAG,EACf,MAAM,QAAQ,CAAK,EACnB,QAAS,EAAI,EAAG,EAAO,EAAM,OAAQ,EAAI,EAAM,IAC3C,EAAM,KAAK,GAAG,KAAO,EAAU,EAAM,EAAE,GAAG,EAG7C,KACD,IAAI,EAAU,EACd,GAAI,GAAS,OAAO,IAAU,SAC1B,GAAW,IAAI,EAAU,CAAK,IAElC,EAAM,KAAK,CAAO,GAG1B,OAAO,EAAM,KAAK,GAAG,EAGjB,eAAc,EAAU,YACxB,gBAAe,EAAU,aACzB,mBAAkB,EAAU,gBAC5B,oBAAmB,EAAU,iBAC7B,YAAW,EAAU,SACrB,SAAQ,EACR,UAAS,EACT,+BAA8B,EAC9B,uBAAsB,EACtB,qCAAoC,EACpC,mCAAkC,EAClC,gBAAe,EACf,kBAAiB,EACjB,eAAc,EACd,gBAAe,EACf,2BAA0B,EAC1B,oBAAmB,GACnB,eAAc,EACd,2BAA0B,EAC1B,kCAAiC,EACjC,4BAA2B,EAC3B,aAAY,EACZ,iBAAgB,GAChB,8BAA6B,EAC7B,0BAAyB,EACzB,wCAAuC,EACvC,kBAAiB,EACjB,mCAAkC,EAClC,gBAAe",
"debugId": "93024032240A612B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "81DFA47AB4C6CB4464756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+provider@3.0.10/node_modules/@ai-sdk/provider/dist/index.mjs"],
"sourcesContent": [
"// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n constructor({\n value,\n cause,\n context\n }) {\n let contextPrefix = \"Type validation failed\";\n if (context == null ? void 0 : context.field) {\n contextPrefix += ` for ${context.field}`;\n }\n if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n contextPrefix += \" (\";\n const parts = [];\n if (context.entityName) {\n parts.push(context.entityName);\n }\n if (context.entityId) {\n parts.push(`id: \"${context.entityId}\"`);\n }\n contextPrefix += parts.join(\", \");\n contextPrefix += \")\";\n }\n super({\n name: name12,\n message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n this.context = context;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause,\n context\n }) {\n var _a15, _b15, _c;\n if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n return cause;\n }\n return new _TypeValidationError({ value, cause, context });\n }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";AACA,IAAI,EAAS,kBACT,GAAS,OAAO,IAAI,CAAM,EAC1B,EAAI,EACJ,EAAa,MAAM,UAAqB,EAAK,MAAO,EAAK,GAAQ,EAAI,CASvE,WAAW,EACT,KAAM,EACN,UACA,SACC,CACD,MAAM,CAAO,EACb,KAAK,GAAM,GACX,KAAK,KAAO,EACZ,KAAK,MAAQ,QAOR,WAAU,CAAC,EAAO,CACvB,OAAO,EAAY,UAAU,EAAO,CAAM,QAErC,UAAS,CAAC,EAAO,EAAU,CAChC,IAAM,EAAe,OAAO,IAAI,CAAQ,EACxC,OAAO,GAAS,MAAQ,OAAO,IAAU,UAAY,KAAgB,GAAS,OAAO,EAAM,KAAkB,WAAa,EAAM,KAAkB,GAEtJ,EAGI,EAAO,kBACP,EAAU,mBAAmB,IAC7B,GAAU,OAAO,IAAI,CAAO,EAC5B,EAAK,EACL,GAAe,cAAe,EAAM,EAAY,EAAM,GAAS,EAAK,CACtE,WAAW,EACT,UACA,MACA,oBACA,aACA,kBACA,eACA,QACA,eAAc,GAAc,OAAS,IAAe,KACpD,IAAe,KACf,IAAe,KACf,GAAc,KAEd,SACC,CACD,MAAM,CAAE,OAAM,UAAS,OAAM,CAAC,EAC9B,KAAK,GAAO,GACZ,KAAK,IAAM,EACX,KAAK,kBAAoB,EACzB,KAAK,WAAa,EAClB,KAAK,gBAAkB,EACvB,KAAK,aAAe,EACpB,KAAK,YAAc,GACnB,KAAK,KAAO,SAEP,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,CAAO,EAE9C,EAG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241AD2E52541D1D64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "CF0AF1E0AE98E44664756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "47AECE0DEBE8E49F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "5C1357249B3C04C864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/password.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport { Option } from \"effect\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.password,\n Effect.fn(\"cli.service.password\")(function* (input) {\n const daemon = yield* Daemon.Service\n const value = Option.getOrUndefined(input.value)\n if (value !== undefined) yield* daemon.stop()\n process.stdout.write((yield* daemon.password(value)) + EOL)\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAOT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,SAC5B,EAAG,sBAAsB,EAAE,SAAU,CAAC,EAAO,CAClD,IAAM,EAAS,MAAO,EAAO,QACvB,EAAQ,EAAO,eAAe,EAAM,KAAK,EAC/C,GAAI,IAAU,OAAW,MAAO,EAAO,KAAK,EAC5C,QAAQ,OAAO,OAAO,MAAO,EAAO,SAAS,CAAK,GAAK,CAAG,EAC3D,CACH",
"debugId": "62FD65243A1EBB3D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js", "../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js"],
"sourcesContent": [
"class ParseError extends Error {\n constructor(message, options) {\n super(message), this.name = \"ParseError\", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;\n }\n}\nconst LF = 10, CR = 13, SPACE = 32;\nfunction noop(_arg) {\n}\nfunction createParser(config) {\n if (typeof config == \"function\")\n throw new TypeError(\n \"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?\"\n );\n const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];\n let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = \"\", dataLines = 0, eventType, terminated = !1;\n function feed(chunk) {\n if (terminated)\n throw new Error(\n \"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.\"\n );\n if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {\n const trailing2 = processLines(chunk);\n trailing2 !== \"\" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();\n return;\n }\n if (chunk.indexOf(`\n`) === -1 && chunk.indexOf(\"\\r\") === -1) {\n pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();\n return;\n }\n pendingFragments.push(chunk);\n const input = pendingFragments.join(\"\");\n pendingFragments.length = 0, pendingFragmentsLength = 0;\n const trailing = processLines(input);\n trailing !== \"\" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();\n }\n function checkBufferSize() {\n maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, onError(\n new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {\n type: \"max-buffer-size-exceeded\"\n })\n )));\n }\n function processLines(chunk) {\n let searchIndex = 0;\n if (chunk.indexOf(\"\\r\") === -1) {\n let lfIndex = chunk.indexOf(`\n`, searchIndex);\n for (; lfIndex !== -1; ) {\n if (searchIndex === lfIndex) {\n dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = \"\", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n const firstCharCode = chunk.charCodeAt(searchIndex);\n if (isDataPrefix(chunk, searchIndex, firstCharCode)) {\n const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);\n if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {\n onEvent({ id, event: eventType, data: value }), id = void 0, data = \"\", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n } else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(\n chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,\n lfIndex\n ) || void 0 : parseLine(chunk, searchIndex, lfIndex);\n searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n }\n return chunk.slice(searchIndex);\n }\n for (; searchIndex < chunk.length; ) {\n const crIndex = chunk.indexOf(\"\\r\", searchIndex), lfIndex = chunk.indexOf(`\n`, searchIndex);\n let lineEnd = -1;\n if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)\n break;\n parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;\n }\n return chunk.slice(searchIndex);\n }\n function parseLine(chunk, start, end) {\n if (start === end) {\n dispatchEvent();\n return;\n }\n const firstCharCode = chunk.charCodeAt(start);\n if (isDataPrefix(chunk, start, firstCharCode)) {\n const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);\n data = dataLines === 0 ? value2 : `${data}\n${value2}`, dataLines++;\n return;\n }\n if (isEventPrefix(chunk, start, firstCharCode)) {\n eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;\n return;\n }\n if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {\n const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);\n id = value2.includes(\"\\0\") ? void 0 : value2;\n return;\n }\n if (firstCharCode === 58) {\n if (onComment) {\n const line2 = chunk.slice(start, end);\n onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));\n }\n return;\n }\n const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(\":\");\n if (fieldSeparatorIndex === -1) {\n processField(line, \"\", line);\n return;\n }\n const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);\n processField(field, value, line);\n }\n function processField(field, value, line) {\n switch (field) {\n case \"event\":\n eventType = value || void 0;\n break;\n case \"data\":\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n break;\n case \"id\":\n id = value.includes(\"\\0\") ? void 0 : value;\n break;\n case \"retry\":\n /^\\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(\n new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n type: \"invalid-retry\",\n value,\n line\n })\n );\n break;\n default:\n onError(\n new ParseError(\n `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}\\u2026` : field}\"`,\n { type: \"unknown-field\", field, value, line }\n )\n );\n break;\n }\n }\n function dispatchEvent() {\n dataLines > 0 && onEvent({\n id,\n event: eventType,\n data\n }), id = void 0, data = \"\", dataLines = 0, eventType = void 0;\n }\n function reset(options = {}) {\n if (options.consume && pendingFragments.length > 0) {\n const incompleteLine = pendingFragments.join(\"\");\n parseLine(incompleteLine, 0, incompleteLine.length);\n }\n isFirstChunk = !0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;\n }\n return { feed, reset };\n}\nfunction isDataPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;\n}\nfunction isEventPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;\n}\nexport {\n ParseError,\n createParser\n};\n//# sourceMappingURL=index.js.map\n",
"import { createParser } from \"./index.js\";\nimport { ParseError } from \"./index.js\";\nclass EventSourceParserStream extends TransformStream {\n constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {\n let parser;\n super({\n start(controller) {\n parser = createParser({\n onEvent: (event) => {\n controller.enqueue(event);\n },\n onError(error) {\n typeof onError == \"function\" && onError(error), (onError === \"terminate\" || error.type === \"max-buffer-size-exceeded\") && controller.error(error);\n },\n onRetry,\n onComment,\n maxBufferSize\n });\n },\n transform(chunk) {\n parser.feed(chunk);\n }\n });\n }\n}\nexport {\n EventSourceParserStream,\n ParseError\n};\n//# sourceMappingURL=stream.js.map\n"
],
"mappings": ";AAAA,MAAM,UAAmB,KAAM,CAC7B,WAAW,CAAC,EAAS,EAAS,CAC5B,MAAM,CAAO,EAAG,KAAK,KAAO,aAAc,KAAK,KAAO,EAAQ,KAAM,KAAK,MAAQ,EAAQ,MAAO,KAAK,MAAQ,EAAQ,MAAO,KAAK,KAAO,EAAQ,KAEpJ,CAC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Y,CAAC,EAAO,EAAG,EAAe,CAC7C,OAAO,IAAkB,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,IAAM,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,IAAM,EAAM,WAAW,EAAI,CAAC,IAAM,GAErK,SAAS,CAAa,CAAC,EAAO,EAAG,EAAe,CAC9C,OAAO,IAAkB,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,GCxK1M,MAAM,UAAgC,eAAgB,CACpD,WAAW,EAAG,UAAS,UAAS,YAAW,iBAAkB,CAAC,EAAG,CAC/D,IAAI,EACJ,MAAM,CACJ,KAAK,CAAC,EAAY,CAChB,EAAS,EAAa,CACpB,QAAS,CAAC,IAAU,CAClB,EAAW,QAAQ,CAAK,GAE1B,OAAO,CAAC,EAAO,CACb,OAAO,GAAW,YAAc,EAAQ,CAAK,GAAI,IAAY,aAAe,EAAM,OAAS,6BAA+B,EAAW,MAAM,CAAK,GAElJ,UACA,YACA,eACF,CAAC,GAEH,SAAS,CAAC,EAAO,CACf,EAAO,KAAK,CAAK,EAErB,CAAC,EAEL",
"debugId": "E81836D2B2F373E464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/util/which.ts"],
"sourcesContent": [
"import whichPkg from \"which\"\nimport path from \"path\"\nimport { Global } from \"../global\"\n\nexport function which(cmd: string, env?: NodeJS.ProcessEnv) {\n const base = env?.PATH ?? env?.Path ?? process.env.PATH ?? process.env.Path ?? \"\"\n const full = base ? base + path.delimiter + Global.Path.bin : Global.Path.bin\n const result = whichPkg.sync(cmd, {\n nothrow: true,\n path: full,\n pathExt: env?.PATHEXT ?? env?.PathExt ?? process.env.PATHEXT ?? process.env.PathExt,\n })\n return typeof result === \"string\" ? result : null\n}\n"
],
"mappings": ";kJAAA,oBACA,yBAGO,SAAS,CAAK,CAAC,EAAa,EAAyB,CAC1D,IAAM,EAAO,GAAK,MAAQ,GAAK,MAAQ,QAAQ,IAAI,MAAQ,QAAQ,IAAI,MAAQ,GACzE,EAAO,EAAO,EAAO,EAAK,UAAY,EAAO,KAAK,IAAM,EAAO,KAAK,IACpE,EAAS,UAAS,KAAK,EAAK,CAChC,QAAS,GACT,KAAM,EACN,QAAS,GAAK,SAAW,GAAK,SAAW,QAAQ,IAAI,SAAW,QAAQ,IAAI,OAC9E,CAAC,EACD,OAAO,OAAO,IAAW,SAAW,EAAS",
"debugId": "17837521B3ECF78464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.js", "../../node_modules/.bun/which@2.0.2/node_modules/which/which.js", "../../node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js", "../../node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.js", "../../node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"],
"sourcesContent": [
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n",
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n",
"var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n",
"const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n",
"'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n",
"'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n",
"'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input\n // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(?=(\\\\+?)?)\\1\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(?=(\\\\+?)?)\\1$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n",
"'use strict';\nmodule.exports = /^#!(.*)/;\n",
"'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n",
"'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n",
"'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n",
"'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed);\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n",
"'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = sp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,QAAQ,OAAS,EACxB,EAAO,QAAQ,QAAU",
"debugId": "25DC3F2FA69B64DB64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+perplexity@3.0.26+d6123d32214422cb/node_modules/@ai-sdk/perplexity/dist/index.mjs"],
"sourcesContent": [
"// src/perplexity-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/perplexity-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/convert-perplexity-usage.ts\nfunction convertPerplexityUsage(usage) {\n var _a, _b, _c;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_c = usage.reasoning_tokens) != null ? _c : 0;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-perplexity-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertUint8ArrayToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToPerplexityMessages(prompt) {\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\":\n case \"assistant\": {\n const hasMultipartContent = content.some(\n (part) => part.type === \"file\" && part.mediaType.startsWith(\"image/\") || part.type === \"file\" && part.mediaType === \"application/pdf\"\n );\n const messageContent = content.map((part, index) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return {\n type: \"text\",\n text: part.text\n };\n }\n case \"file\": {\n if (part.mediaType === \"application/pdf\") {\n return part.data instanceof URL ? {\n type: \"file_url\",\n file_url: {\n url: part.data.toString()\n },\n file_name: part.filename\n } : {\n type: \"file_url\",\n file_url: {\n url: typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)\n },\n file_name: part.filename || `document-${index}.pdf`\n };\n } else if (part.mediaType.startsWith(\"image/\")) {\n return part.data instanceof URL ? {\n type: \"image_url\",\n image_url: {\n url: part.data.toString()\n }\n } : {\n type: \"image_url\",\n image_url: {\n url: `data:${(_a = part.mediaType) != null ? _a : \"image/jpeg\"};base64,${typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)}`\n }\n };\n }\n }\n }\n }).filter(Boolean);\n messages.push({\n role,\n content: hasMultipartContent ? messageContent : messageContent.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\")\n });\n break;\n }\n case \"tool\": {\n throw new UnsupportedFunctionalityError({\n functionality: \"Tool messages\"\n });\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/map-perplexity-finish-reason.ts\nfunction mapPerplexityFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n case \"length\":\n return finishReason;\n default:\n return \"other\";\n }\n}\n\n// src/perplexity-language-model.ts\nvar PerplexityLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.provider = \"perplexity\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions\n }) {\n var _a;\n const warnings = [];\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n if (seed != null) {\n warnings.push({ type: \"unsupported\", feature: \"seed\" });\n }\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n max_tokens: maxOutputTokens,\n presence_penalty: presencePenalty,\n temperature,\n top_k: topK,\n top_p: topP,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? {\n type: \"json_schema\",\n json_schema: { schema: responseFormat.schema }\n } : void 0,\n // provider extensions\n ...(_a = providerOptions == null ? void 0 : providerOptions.perplexity) != null ? _a : {},\n // messages:\n messages: convertToPerplexityMessages(prompt)\n },\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;\n const { args: body, warnings } = this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createJsonResponseHandler(\n perplexityResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text.length > 0) {\n content.push({ type: \"text\", text });\n }\n if (response.citations != null) {\n for (const url of response.citations) {\n content.push({\n type: \"source\",\n sourceType: \"url\",\n id: this.config.generateId(),\n url\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertPerplexityUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n providerMetadata: {\n perplexity: {\n images: (_c = (_b = response.images) == null ? void 0 : _b.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }))) != null ? _c : null,\n usage: {\n citationTokens: (_e = (_d = response.usage) == null ? void 0 : _d.citation_tokens) != null ? _e : null,\n numSearchQueries: (_g = (_f = response.usage) == null ? void 0 : _f.num_search_queries) != null ? _g : null\n },\n cost: ((_h = response.usage) == null ? void 0 : _h.cost) ? {\n inputTokensCost: (_i = response.usage.cost.input_tokens_cost) != null ? _i : null,\n outputTokensCost: (_j = response.usage.cost.output_tokens_cost) != null ? _j : null,\n requestCost: (_k = response.usage.cost.request_cost) != null ? _k : null,\n totalCost: (_l = response.usage.cost.total_cost) != null ? _l : null\n } : null\n }\n }\n };\n }\n async doStream(options) {\n const { args, warnings } = this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createEventSourceResponseHandler(\n perplexityChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n const providerMetadata = {\n perplexity: {\n usage: {\n citationTokens: null,\n numSearchQueries: null\n },\n cost: null,\n images: null\n }\n };\n let isFirstChunk = true;\n let isActive = false;\n const self = this;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n (_a = value.citations) == null ? void 0 : _a.forEach((url) => {\n controller.enqueue({\n type: \"source\",\n sourceType: \"url\",\n id: self.config.generateId(),\n url\n });\n });\n isFirstChunk = false;\n }\n if (value.usage != null) {\n usage = value.usage;\n providerMetadata.perplexity.usage = {\n citationTokens: (_b = value.usage.citation_tokens) != null ? _b : null,\n numSearchQueries: (_c = value.usage.num_search_queries) != null ? _c : null\n };\n providerMetadata.perplexity.cost = value.usage.cost ? {\n inputTokensCost: (_d = value.usage.cost.input_tokens_cost) != null ? _d : null,\n outputTokensCost: (_e = value.usage.cost.output_tokens_cost) != null ? _e : null,\n requestCost: (_f = value.usage.cost.request_cost) != null ? _f : null,\n totalCost: (_g = value.usage.cost.total_cost) != null ? _g : null\n } : null;\n }\n if (value.images != null) {\n providerMetadata.perplexity.images = value.images.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }));\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n const textContent = delta.content;\n if (textContent != null) {\n if (!isActive) {\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n isActive = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n },\n flush(controller) {\n if (isActive) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertPerplexityUsage(usage),\n providerMetadata\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id,\n modelId: model,\n timestamp: new Date(created * 1e3)\n };\n}\nvar perplexityCostSchema = z.object({\n input_tokens_cost: z.number().nullish(),\n output_tokens_cost: z.number().nullish(),\n request_cost: z.number().nullish(),\n total_cost: z.number().nullish()\n});\nvar perplexityUsageSchema = z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number().nullish(),\n citation_tokens: z.number().nullish(),\n num_search_queries: z.number().nullish(),\n reasoning_tokens: z.number().nullish(),\n cost: perplexityCostSchema.nullish()\n});\nvar perplexityImageSchema = z.object({\n image_url: z.string(),\n origin_url: z.string(),\n height: z.number(),\n width: z.number()\n});\nvar perplexityResponseSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n message: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityChunkSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n delta: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityErrorSchema = z.object({\n error: z.object({\n code: z.number(),\n message: z.string().nullish(),\n type: z.string().nullish()\n })\n});\nvar errorToMessage = (data) => {\n var _a, _b;\n return (_b = (_a = data.error.message) != null ? _a : data.error.type) != null ? _b : \"unknown error\";\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.26\" : \"0.0.0-test\";\n\n// src/perplexity-provider.ts\nfunction createPerplexity(options = {}) {\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"PERPLEXITY_API_KEY\",\n description: \"Perplexity\"\n })}`,\n ...options.headers\n },\n `ai-sdk/perplexity/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n var _a;\n return new PerplexityLanguageModel(modelId, {\n baseURL: withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.perplexity.ai\"\n ),\n headers: getHeaders,\n generateId,\n fetch: options.fetch\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar perplexity = createPerplexity();\nexport {\n VERSION,\n createPerplexity,\n perplexity\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";sSAsBA,cAAS,MAAsB,MAAC,OAAO,CACrC,IAAI,EAAI,EAAI,EACZ,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAAM,GAAgB,EAAK,EAAM,gBAAkB,KAAO,EAAK,EACzD,GAAoB,EAAK,EAAM,oBAAsB,KAAO,EAAK,EACjE,GAAmB,EAAK,EAAM,mBAAqB,KAAO,EAAK,EACrE,MAAO,CACL,YAAa,CACX,MAAO,EACP,QAAS,EACT,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAO,EACP,KAAM,EAAmB,EACzB,UAAW,CACb,EACA,IAAK,CACP,EAQF,SAAS,CAA2B,CAAC,EAAQ,CAC3C,IAAM,EAAW,CAAC,EAClB,QAAa,OAAM,aAAa,EAC9B,OAAQ,OACD,SAAU,CACb,EAAS,KAAK,CAAE,KAAM,SAAU,SAAQ,CAAC,EACzC,KACF,KACK,WACA,YAAa,CAChB,IAAM,EAAsB,E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2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+provider@3.0.8/node_modules/@ai-sdk/provider/dist/index.mjs"],
"sourcesContent": [
"// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n constructor({\n value,\n cause,\n context\n }) {\n let contextPrefix = \"Type validation failed\";\n if (context == null ? void 0 : context.field) {\n contextPrefix += ` for ${context.field}`;\n }\n if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n contextPrefix += \" (\";\n const parts = [];\n if (context.entityName) {\n parts.push(context.entityName);\n }\n if (context.entityId) {\n parts.push(`id: \"${context.entityId}\"`);\n }\n contextPrefix += parts.join(\", \");\n contextPrefix += \")\";\n }\n super({\n name: name12,\n message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n this.context = context;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause,\n context\n }) {\n var _a15, _b15, _c;\n if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n return cause;\n }\n return new _TypeValidationError({ value, cause, context });\n }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";AACA,IAAI,EAAS,kBACT,GAAS,OAAO,IAAI,CAAM,EAC1B,EAAI,EACJ,EAAa,MAAM,UAAqB,EAAK,MAAO,EAAK,GAAQ,EAAI,CASvE,WAAW,EACT,KAAM,EACN,UACA,SACC,CACD,MAAM,CAAO,EACb,KAAK,GAAM,GACX,KAAK,KAAO,EACZ,KAAK,MAAQ,QAOR,WAAU,CAAC,EAAO,CACvB,OAAO,EAAY,UAAU,EAAO,CAAM,QAErC,UAAS,CAAC,EAAO,EAAU,CAChC,IAAM,EAAe,OAAO,IAAI,CAAQ,EACxC,OAAO,GAAS,MAAQ,OAAO,IAAU,UAAY,KAAgB,GAAS,OAAO,EAAM,KAAkB,WAAa,EAAM,KAAkB,GAEtJ,EAGI,EAAO,kBACP,EAAU,mBAAmB,IAC7B,GAAU,OAAO,IAAI,CAAO,EAC5B,EAAK,EACL,GAAe,cAAe,EAAM,EAAY,EAAM,GAAS,EAAK,CACtE,WAAW,EACT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AAE,QAAO,QAAO,SAAQ,CAAC,EAE7D,EAGI,GAAS,mCACT,GAAW,mBAAmB,KAC9B,GAAW,OAAO,IAAI,EAAQ,EAC9B,EAAM,EACN,GAAgC,cAAe,EAAO,EAAY,EAAO,GAAU,EAAM,CAC3F,WAAW,EACT,gBACA,UAAU,IAAI,mCACb,CACD,MAAM,CAAE,KAAM,GAAQ,SAAQ,CAAC,EAC/B,KAAK,GAAQ,GACb,KAAK,cAAgB,QAEhB,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,EAAQ,EAE/C",
"debugId": "42BDC00B0E85618F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cohere@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/cohere/dist/index.mjs"],
"sourcesContent": [
"// src/cohere-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/cohere-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/cohere-chat-options.ts\nimport { z } from \"zod/v4\";\nvar cohereLanguageModelOptions = z.object({\n /**\n * Configuration for reasoning features (optional)\n *\n * Can be set to an object with the two properties `type` and `tokenBudget`. `type` can be set to `'enabled'` or `'disabled'` (defaults to `'enabled'`).\n * `tokenBudget` is the maximum number of tokens the model can use for thinking, which must be set to a positive integer. The model will stop thinking if it reaches the thinking token budget and will proceed with the response\n *\n * @see https://docs.cohere.com/reference/chat#request.body.thinking\n */\n thinking: z.object({\n type: z.enum([\"enabled\", \"disabled\"]).optional(),\n tokenBudget: z.number().optional()\n }).optional()\n});\n\n// src/cohere-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar cohereErrorDataSchema = z2.object({\n message: z2.string()\n});\nvar cohereFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: cohereErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/cohere-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const cohereTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n cohereTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n case \"none\":\n return { tools: cohereTools, toolChoice: \"NONE\", toolWarnings };\n case \"required\":\n return { tools: cohereTools, toolChoice: \"REQUIRED\", toolWarnings };\n case \"tool\":\n return {\n tools: cohereTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"REQUIRED\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/convert-cohere-usage.ts\nfunction convertCohereUsage(tokens) {\n if (tokens == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const inputTokens = tokens.input_tokens;\n const outputTokens = tokens.output_tokens;\n return {\n inputTokens: {\n total: inputTokens,\n noCache: inputTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: outputTokens,\n text: outputTokens,\n reasoning: void 0\n },\n raw: tokens\n };\n}\n\n// src/convert-to-cohere-chat-prompt.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction convertToCohereChatPrompt(prompt) {\n const messages = [];\n const documents = [];\n const warnings = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return part.text;\n }\n case \"file\": {\n let textContent;\n if (typeof part.data === \"string\") {\n textContent = part.data;\n } else if (part.data instanceof Uint8Array) {\n if (!(((_a = part.mediaType) == null ? void 0 : _a.startsWith(\"text/\")) || part.mediaType === \"application/json\")) {\n throw new UnsupportedFunctionalityError2({\n functionality: `document media type: ${part.mediaType}`,\n message: `Media type '${part.mediaType}' is not supported. Supported media types are: text/* and application/json.`\n });\n }\n textContent = new TextDecoder().decode(part.data);\n } else {\n throw new UnsupportedFunctionalityError2({\n functionality: \"File URL data\",\n message: \"URLs should be downloaded by the AI SDK and not reach this point. This indicates a configuration issue.\"\n });\n }\n documents.push({\n data: {\n text: textContent,\n title: part.filename\n }\n });\n return \"\";\n }\n }\n }).join(\"\")\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: toolCalls.length > 0 ? void 0 : text,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0,\n tool_plan: void 0\n });\n break;\n }\n case \"tool\": {\n messages.push(\n ...content.filter((toolResult) => toolResult.type !== \"tool-approval-response\").map((toolResult) => {\n var _a;\n const output = toolResult.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n return {\n role: \"tool\",\n content: contentValue,\n tool_call_id: toolResult.toolCallId\n };\n })\n );\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return { messages, documents, warnings };\n}\n\n// src/map-cohere-finish-reason.ts\nfunction mapCohereFinishReason(finishReason) {\n switch (finishReason) {\n case \"COMPLETE\":\n case \"STOP_SEQUENCE\":\n return \"stop\";\n case \"MAX_TOKENS\":\n return \"length\";\n case \"ERROR\":\n return \"error\";\n case \"TOOL_CALL\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/cohere-chat-language-model.ts\nvar CohereChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b;\n const cohereOptions = (_a = await parseProviderOptions({\n provider: \"cohere\",\n providerOptions,\n schema: cohereLanguageModelOptions\n })) != null ? _a : {};\n const {\n messages: chatPrompt,\n documents: cohereDocuments,\n warnings: promptWarnings\n } = convertToCohereChatPrompt(prompt);\n const {\n tools: cohereTools,\n toolChoice: cohereToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice });\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n max_tokens: maxOutputTokens,\n temperature,\n p: topP,\n k: topK,\n seed,\n stop_sequences: stopSequences,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? { type: \"json_object\", json_schema: responseFormat.schema } : void 0,\n // messages:\n messages: chatPrompt,\n // tools:\n tools: cohereTools,\n tool_choice: cohereToolChoice,\n // documents for RAG:\n ...cohereDocuments.length > 0 && { documents: cohereDocuments },\n // reasoning\n ...cohereOptions.thinking && {\n thinking: {\n type: (_b = cohereOptions.thinking.type) != null ? _b : \"enabled\",\n token_budget: cohereOptions.thinking.tokenBudget\n }\n }\n },\n warnings: [...toolWarnings, ...promptWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const { args, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n cohereChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const content = [];\n for (const item of (_a = response.message.content) != null ? _a : []) {\n if (item.type === \"text\" && item.text.length > 0) {\n content.push({ type: \"text\", text: item.text });\n continue;\n }\n if (item.type === \"thinking\" && item.thinking.length > 0) {\n content.push({ type: \"reasoning\", text: item.thinking });\n continue;\n }\n }\n for (const citation of (_b = response.message.citations) != null ? _b : []) {\n content.push({\n type: \"source\",\n sourceType: \"document\",\n id: this.config.generateId(),\n mediaType: \"text/plain\",\n title: ((_d = (_c = citation.sources[0]) == null ? void 0 : _c.document) == null ? void 0 : _d.title) || \"Document\",\n providerMetadata: {\n cohere: {\n start: citation.start,\n end: citation.end,\n text: citation.text,\n sources: citation.sources,\n ...citation.type && { citationType: citation.type }\n }\n }\n });\n }\n for (const toolCall of (_e = response.message.tool_calls) != null ? _e : []) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n // Cohere sometimes returns `null` for tool call arguments for tools\n // defined as having no arguments.\n input: toolCall.function.arguments.replace(/^null$/, \"{}\")\n });\n }\n return {\n content,\n finishReason: {\n unified: mapCohereFinishReason(response.finish_reason),\n raw: (_f = response.finish_reason) != null ? _f : void 0\n },\n usage: convertCohereUsage(response.usage.tokens),\n request: { body: args },\n response: {\n // TODO timestamp, model id\n id: (_g = response.generation_id) != null ? _g : void 0,\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: { ...args, stream: true },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n cohereChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let pendingToolCall = null;\n let isActiveReasoning = false;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = { unified: \"error\", raw: void 0 };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n const type = value.type;\n switch (type) {\n case \"content-start\": {\n if (value.delta.message.content.type === \"thinking\") {\n controller.enqueue({\n type: \"reasoning-start\",\n id: String(value.index)\n });\n isActiveReasoning = true;\n return;\n }\n controller.enqueue({\n type: \"text-start\",\n id: String(value.index)\n });\n return;\n }\n case \"content-delta\": {\n if (\"thinking\" in value.delta.message.content) {\n controller.enqueue({\n type: \"reasoning-delta\",\n id: String(value.index),\n delta: value.delta.message.content.thinking\n });\n return;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: String(value.index),\n delta: value.delta.message.content.text\n });\n return;\n }\n case \"content-end\": {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: String(value.index)\n });\n isActiveReasoning = false;\n return;\n }\n controller.enqueue({\n type: \"text-end\",\n id: String(value.index)\n });\n return;\n }\n case \"tool-call-start\": {\n const toolId = value.delta.message.tool_calls.id;\n const toolName = value.delta.message.tool_calls.function.name;\n const initialArgs = value.delta.message.tool_calls.function.arguments;\n pendingToolCall = {\n id: toolId,\n name: toolName,\n arguments: initialArgs,\n hasFinished: false\n };\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolId,\n toolName\n });\n if (initialArgs.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolId,\n delta: initialArgs\n });\n }\n return;\n }\n case \"tool-call-delta\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n const argsDelta = value.delta.message.tool_calls.function.arguments;\n pendingToolCall.arguments += argsDelta;\n controller.enqueue({\n type: \"tool-input-delta\",\n id: pendingToolCall.id,\n delta: argsDelta\n });\n }\n return;\n }\n case \"tool-call-end\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: pendingToolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: pendingToolCall.id,\n toolName: pendingToolCall.name,\n input: JSON.stringify(\n JSON.parse(((_a = pendingToolCall.arguments) == null ? void 0 : _a.trim()) || \"{}\")\n )\n });\n pendingToolCall.hasFinished = true;\n pendingToolCall = null;\n }\n return;\n }\n case \"message-start\": {\n controller.enqueue({\n type: \"response-metadata\",\n id: (_b = value.id) != null ? _b : void 0\n });\n return;\n }\n case \"message-end\": {\n finishReason = {\n unified: mapCohereFinishReason(value.delta.finish_reason),\n raw: value.delta.finish_reason\n };\n usage = value.delta.usage.tokens;\n return;\n }\n default: {\n return;\n }\n }\n },\n flush(controller) {\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertCohereUsage(usage)\n });\n }\n })\n ),\n request: { body: { ...args, stream: true } },\n response: { headers: responseHeaders }\n };\n }\n};\nvar cohereChatResponseSchema = z3.object({\n generation_id: z3.string().nullish(),\n message: z3.object({\n role: z3.string(),\n content: z3.array(\n z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n ).nullish(),\n tool_plan: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish(),\n citations: z3.array(\n z3.object({\n start: z3.number(),\n end: z3.number(),\n text: z3.string(),\n sources: z3.array(\n z3.object({\n type: z3.string().optional(),\n id: z3.string().optional(),\n document: z3.object({\n id: z3.string().optional(),\n text: z3.string(),\n title: z3.string()\n })\n })\n ),\n type: z3.string().optional()\n })\n ).nullish()\n }),\n finish_reason: z3.string(),\n usage: z3.object({\n billed_units: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n }),\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n});\nvar cohereChatChunkSchema = z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"citation-start\")\n }),\n z3.object({\n type: z3.literal(\"citation-end\")\n }),\n z3.object({\n type: z3.literal(\"content-start\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-delta\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n text: z3.string()\n }),\n z3.object({\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-end\"),\n index: z3.number()\n }),\n z3.object({\n type: z3.literal(\"message-start\"),\n id: z3.string().nullish()\n }),\n z3.object({\n type: z3.literal(\"message-end\"),\n delta: z3.object({\n finish_reason: z3.string(),\n usage: z3.object({\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n })\n }),\n // https://docs.cohere.com/v2/docs/streaming#tool-use-stream-events-for-tool-calling\n z3.object({\n type: z3.literal(\"tool-plan-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_plan: z3.string()\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-start\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n })\n })\n }),\n // A single tool call's `arguments` stream in chunks and must be accumulated\n // in a string and so the full tool object info can only be parsed once we see\n // `tool-call-end`.\n z3.object({\n type: z3.literal(\"tool-call-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n function: z3.object({\n arguments: z3.string()\n })\n })\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-end\")\n })\n]);\n\n// src/cohere-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/cohere-embedding-options.ts\nimport { z as z4 } from \"zod/v4\";\nvar cohereEmbeddingModelOptions = z4.object({\n /**\n * Specifies the type of input passed to the model. Default is `search_query`.\n *\n * - \"search_document\": Used for embeddings stored in a vector database for search use-cases.\n * - \"search_query\": Used for embeddings of search queries run against a vector DB to find relevant documents.\n * - \"classification\": Used for embeddings passed through a text classifier.\n * - \"clustering\": Used for embeddings run through a clustering algorithm.\n */\n inputType: z4.enum([\"search_document\", \"search_query\", \"classification\", \"clustering\"]).optional(),\n /**\n * Specifies how the API will handle inputs longer than the maximum token length.\n * Default is `END`.\n *\n * - \"NONE\": If selected, when the input exceeds the maximum input token length will return an error.\n * - \"START\": Will discard the start of the input until the remaining input is exactly the maximum input token length for the model.\n * - \"END\": Will discard the end of the input until the remaining input is exactly the maximum input token length for the model.\n */\n truncate: z4.enum([\"NONE\", \"START\", \"END\"]).optional(),\n /**\n * The number of dimensions of the output embedding.\n * Only available for `embed-v4.0` and newer models.\n *\n * Possible values are `256`, `512`, `1024`, and `1536`.\n * The default is `1536`.\n */\n outputDimension: z4.union([z4.literal(256), z4.literal(512), z4.literal(1024), z4.literal(1536)]).optional()\n});\n\n// src/cohere-embedding-model.ts\nvar CohereEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 96;\n this.supportsParallelCalls = true;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n headers,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const embeddingOptions = await parseProviderOptions2({\n provider: \"cohere\",\n providerOptions,\n schema: cohereEmbeddingModelOptions\n });\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embed`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n // The AI SDK only supports 'float' embeddings. Note that the Cohere API\n // supports other embedding types, but they are not currently supported by the AI SDK.\n // https://docs.cohere.com/v2/reference/embed#request.body.embedding_types\n embedding_types: [\"float\"],\n texts: values,\n input_type: (_a = embeddingOptions == null ? void 0 : embeddingOptions.inputType) != null ? _a : \"search_query\",\n truncate: embeddingOptions == null ? void 0 : embeddingOptions.truncate,\n output_dimension: embeddingOptions == null ? void 0 : embeddingOptions.outputDimension\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n cohereTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.embeddings.float,\n usage: { tokens: response.meta.billed_units.input_tokens },\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar cohereTextEmbeddingResponseSchema = z5.object({\n embeddings: z5.object({\n float: z5.array(z5.array(z5.number()))\n }),\n meta: z5.object({\n billed_units: z5.object({\n input_tokens: z5.number()\n })\n })\n});\n\n// src/reranking/cohere-reranking-model.ts\nimport {\n combineHeaders as combineHeaders3,\n createJsonResponseHandler as createJsonResponseHandler3,\n parseProviderOptions as parseProviderOptions3,\n postJsonToApi as postJsonToApi3\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/cohere-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar cohereRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z6.object({\n id: z6.string().nullish(),\n results: z6.array(\n z6.object({\n index: z6.number(),\n relevance_score: z6.number()\n })\n ),\n meta: z6.any()\n })\n )\n);\n\n// src/reranking/cohere-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod/v4\";\nvar cohereRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z7.object({\n maxTokensPerDoc: z7.number().optional(),\n priority: z7.number().optional()\n })\n )\n);\n\n// src/reranking/cohere-reranking-model.ts\nvar CohereRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // current implementation is based on v2 of the API: https://docs.cohere.com/v2/reference/rerank\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const rerankingOptions = await parseProviderOptions3({\n provider: \"cohere\",\n providerOptions,\n schema: cohereRerankingModelOptionsSchema\n });\n const warnings = [];\n if (documents.type === \"object\") {\n warnings.push({\n type: \"compatibility\",\n feature: \"object documents\",\n details: \"Object documents are converted to strings.\"\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi3({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders3(this.config.headers(), headers),\n body: {\n model: this.modelId,\n query,\n documents: documents.type === \"text\" ? documents.values : documents.values.map((value) => JSON.stringify(value)),\n top_n: topN,\n max_tokens_per_doc: rerankingOptions == null ? void 0 : rerankingOptions.maxTokensPerDoc,\n priority: rerankingOptions == null ? void 0 : rerankingOptions.priority\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler3(\n cohereRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n warnings,\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/cohere-provider.ts\nfunction createCohere(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.cohere.com/v2\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"COHERE_API_KEY\",\n description: \"Cohere\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cohere/${VERSION}`\n );\n const createChatModel = (modelId) => {\n var _a2;\n return new CohereChatLanguageModel(modelId, {\n provider: \"cohere.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: (_a2 = options.generateId) != null ? _a2 : generateId\n });\n };\n const createEmbeddingModel = (modelId) => new CohereEmbeddingModel(modelId, {\n provider: \"cohere.textEmbedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createRerankingModel = (modelId) => new CohereRerankingModel(modelId, {\n provider: \"cohere.reranking\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Cohere model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cohere = createCohere();\nexport {\n VERSION,\n cohere,\n createCohere\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";8TAuBA,SAAI,OAA6B,OAAE,YAAO,CASxC,SAAU,EAAE,OAAO,CACjB,KAAM,EAAE,KAAK,CAAC,UAAW,UAAU,CAAC,EAAE,SAAS,EAC/C,YAAa,EAAE,OAAO,EAAE,SAAS,CACnC,CAAC,EAAE,SAAS,CACd,CAAC,EAKG,EAAwB,EAAG,OAAO,CACpC,QAAS,EAAG,OAAO,CACrB,CAAC,EACG,EAA8B,EAA+B,CAC/D,YAAa,EACb,eAAgB,CAAC,IAAS,EAAK,OACjC,CAAC,EAMD,SAAS,CAAY,EACnB,QACA,cACC,CACD,GAAS,GAAS,KAAY,OAAI,EAAM,QAAU,EAAa,OAC/D,IAAM,EAAe,CAAC,EACtB,GAAI,GAAS,KACX,MAAO,CAAE,MAAY,OAAG,WAAiB,OAAG,cAAa,EAE3D,IAAM,EAAc,CAAC,EACrB,QAAW,KAAQ,EACjB,GAAI,EAAK,OAAS,WA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IACnB,EACM,EAAkB,CAAC,IAAY,CACnC,IAAI,EACJ,OAAO,IAAI,EAAwB,EAAS,CAC1C,SAAU,cACV,UACA,QAAS,EACT,MAAO,EAAQ,MACf,YAAa,EAAM,EAAQ,aAAe,KAAO,EAAM,CACzD,CAAC,GAEG,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,uBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,mBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAW,QAAQ,CAAC,EAAS,CACjC,GAAI,WACF,MAAU,MACR,kEACF,EAEF,OAAO,EAAgB,CAAO,GAahC,OAXA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAS,GAAa",
"debugId": "9E7DDE0037A6B17864756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3CBF9A105506D26164756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "34FC4D2F7F779CC464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "8BF9FACA64F3B8A764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n if (!idLine) {\n return undefined;\n }\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-darwin.js.map"
],
"mappings": ";gKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,wCAAwC,GAClE,OACjB,MAAM;AAAA,CAAI,EACV,KAAK,KAAQ,EAAK,SAAS,gBAAgB,CAAC,EACjD,GAAI,CAAC,EACD,OAEJ,IAAM,EAAQ,EAAO,MAAM,OAAO,EAClC,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,MAAM,EAAG,EAAE,EAGnC,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "793DE92CF86325A164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+core@3.24.5/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js"],
"sourcesContent": [
"'use strict';\n\nvar crc32 = require('@aws-crypto/crc32');\nvar serde = require('@smithy/core/serde');\nvar node_stream = require('node:stream');\n\nclass Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(serde.toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n\nclass HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(serde.fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case 6:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case 7:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case 8:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case 9:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${serde.toHex(uuidBytes.subarray(0, 4))}-${serde.toHex(uuidBytes.subarray(4, 6))}-${serde.toHex(uuidBytes.subarray(6, 8))}-${serde.toHex(uuidBytes.subarray(8, 10))}-${serde.toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nfunction splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n\nclass EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new crc32.Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n\nclass MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n\nclass MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n\nclass SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n\nclass SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n\nfunction getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n\nfunction getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nfunction getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n\nlet EventStreamMarshaller$1 = class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n};\nconst eventStreamSerdeProvider$1 = (options) => new EventStreamMarshaller$1(options);\n\nclass EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new EventStreamMarshaller$1({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = typeof body[Symbol.asyncIterator] === \"function\" ? body : readableToIterable(body);\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n return node_stream.Readable.from(this.universalMarshaller.serialize(input, serializer));\n }\n}\nconst eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\nasync function* readableToIterable(readStream) {\n let streamEnded = false;\n let generationEnded = false;\n const records = new Array();\n readStream.on(\"error\", (err) => {\n if (!streamEnded) {\n streamEnded = true;\n }\n if (err) {\n throw err;\n }\n });\n readStream.on(\"data\", (data) => {\n records.push(data);\n });\n readStream.on(\"end\", () => {\n streamEnded = true;\n });\n while (!generationEnded) {\n const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));\n if (value) {\n yield value;\n }\n generationEnded = streamEnded && records.length === 0;\n }\n}\n\nconst readableStreamToIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nconst iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n\nconst resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n\nclass EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? serde.toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const key in firstEvent.value) {\n initialResponseContainer[key] = firstEvent.value[key];\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? serde.fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n\nexports.EventStreamCodec = EventStreamCodec;\nexports.EventStreamMarshaller = EventStreamMarshaller;\nexports.EventStreamSerde = EventStreamSerde;\nexports.HeaderMarshaller = HeaderMarshaller;\nexports.Int64 = Int64;\nexports.MessageDecoderStream = MessageDecoderStream;\nexports.MessageEncoderStream = MessageEncoderStream;\nexports.SmithyMessageDecoderStream = SmithyMessageDecoderStream;\nexports.SmithyMessageEncoderStream = SmithyMessageEncoderStream;\nexports.UniversalEventStreamMarshaller = EventStreamMarshaller$1;\nexports.eventStreamSerdeProvider = eventStreamSerdeProvider;\nexports.getChunkedStream = getChunkedStream;\nexports.getMessageUnmarshaller = getMessageUnmarshaller;\nexports.getUnmarshalledStream = getUnmarshalledStream;\nexports.iterableToReadableStream = iterableToReadableStream;\nexports.readableStreamToIterable = readableStreamToIterable;\nexports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig;\nexports.universalEventStreamSerdeProvider = eventStreamSerdeProvider$1;\n"
],
"mappings": ";0JAMA,WAAM,MAAM,CACR,MACA,WAAW,CAAC,EAAO,CAEf,GADA,KAAK,MAAQ,EACT,EAAM,aAAe,EACrB,MAAU,MAAM,uCAAuC,QAGxD,WAAU,CAAC,EAAQ,CACtB,GAAI,EAAS,qBAA6B,EAAS,qBAC/C,MAAU,MAAM,GAAG,sEAA2E,EAElG,IAAM,EAAQ,IAAI,WAAW,CAAC,EAC9B,QAAS,EAAI,EAAG,EAAY,KAAK,IAAI,KAAK,MAAM,CAAM,CAAC,EAAG,EAAI,IAAM,EAAY,EAAG,IAAK,GAAa,IACjG,EAAM,GAAK,EAEf,GAAI,EAAS,EACT,EAAO,CAAK,EAEhB,OAAO,IAAI,EAAM,CAAK,EAE1B,OAAO,EAAG,CACN,IAAM,EAAQ,KAAK,MAAM,MAAM,CAAC,EAC1B,EAAW,EAAM,GAAK,IAC5B,GAAI,EACA,EAAO,CAAK,EAEhB,OAAO,SAAS,EAAM,MAAM,CAAK,EAAG,EAAE,GAAK,EAAW,GAAK,GAE/D,QAAQ,EAAG,CACP,OAAO,OAAO,KAAK,QAAQ,CAAC,EAEpC,CACA,SAAS,CAAM,CAAC,EAAO,CACnB,QAAS,EAAI,EAAG,EAAI,EAAG,IACnB,EAAM,IAAM,IAEhB,QAAS,EAAI,EAAG,EAAI,GAAI,IAEpB,GADA,EAAM,KACF,EAAM,KAAO,EACb,MAIZ,MAAM,CAAiB,CACnB,OACA,SACA,WAAW,CAAC,EAAQ,EAAU,CAC1B,KAAK,OAAS,EACd,KAAK,SAAW,EAEpB,MAAM,CAAC,EAAS,CACZ,IAAM,EAAS,CAAC,EAChB,QAAW,KAAc,OAAO,KAAK,CAAO,EAAG,CAC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GAAmB,EACnB,GAAmB,EACnB,GAAQ,EACR,GAAuB,EACvB,GAAuB,EACvB,GAA6B,EAC7B,GAA6B,EAC7B,GAAiC,EACjC,GAA2B,GAC3B,GAAmB,EACnB,GAAyB,EACzB,GAAwB,GACxB,GAA2B,GAC3B,GAA2B,GAC3B,GAAgC,GAChC,GAAoC",
"debugId": "11459B07699331D564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@4.0.0/node_modules/isexe/dist/commonjs/index.min.js", "../../node_modules/.bun/which@6.0.1/node_modules/which/lib/index.js"],
"sourcesContent": [
"\"use strict\";var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=a(i=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});i.sync=i.isexe=void 0;var M=require(\"node:fs\"),x=require(\"node:fs/promises\"),q=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d(await(0,x.stat)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.isexe=q;var m=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d((0,M.statSync)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.sync=m;var d=(t,e)=>t.isFile()&&A(t,e),A=(t,e)=>{let r=e.uid??process.getuid?.(),s=e.groups??process.getgroups?.()??[],n=e.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error(\"cannot get uid or gid\");let u=new Set([n,...s]),c=t.mode,S=t.uid,P=t.gid,f=parseInt(\"100\",8),l=parseInt(\"010\",8),j=parseInt(\"001\",8),C=f|l;return!!(c&j||c&l&&u.has(P)||c&f&&S===r||c&C&&r===0)}});var g=a(o=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});o.sync=o.isexe=void 0;var T=require(\"node:fs\"),I=require(\"node:fs/promises\"),D=require(\"node:path\"),F=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y(await(0,I.stat)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.isexe=F;var L=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y((0,T.statSync)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.sync=L;var B=(t,e)=>{let{pathExt:r=process.env.PATHEXT||\"\"}=e,s=r.split(D.delimiter);if(s.indexOf(\"\")!==-1)return!0;for(let n of s){let u=n.toLowerCase(),c=t.substring(t.length-u.length).toLowerCase();if(u&&c===u)return!0}return!1},y=(t,e,r)=>t.isFile()&&B(e,r)});var p=a(h=>{\"use strict\";Object.defineProperty(h,\"__esModule\",{value:!0})});var v=exports&&exports.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),G=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w=exports&&exports.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!==\"default\"&&v(r,e,s[n]);return G(r,e),r}})(),X=exports&&exports.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&v(e,t,r)};Object.defineProperty(exports,\"__esModule\",{value:!0});exports.sync=exports.isexe=exports.posix=exports.win32=void 0;var E=w(_());exports.posix=E;var O=w(g());exports.win32=O;X(p(),exports);var H=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=H===\"win32\"?O:E;exports.isexe=b.isexe;exports.sync=b.sync;\n//# sourceMappingURL=index.min.js.map\n",
"const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n"
],
"mappings": ";0EAAa,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,EAAE,EAAE,SAAa,EAAE,EAAE,KAAG,CAAc,OAAO,eAAe,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAW,OAAE,IAAI,UAAqB,mBAA8B,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,GAAG,EAAE,OAAO,SAAS,MAAM,GAAG,MAAM,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE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AAS,CACzB,IAAM,EAAU,EAAI,EAEpB,GADW,EAAU,EAAS,CAAE,QAAS,EAAY,aAAc,EAAK,CAAC,EACjE,CACN,GAAI,CAAC,EAAI,IACP,OAAO,EAET,EAAM,KAAK,CAAO,IAKxB,GAAI,EAAI,KAAO,EAAM,OACnB,OAAO,EAGT,GAAI,EAAI,QACN,OAAO,KAGT,MAAM,EAAiB,CAAG,GAG5B,EAAO,QAAU,EACjB,EAAM,KAAO",
"debugId": "E69575BC43081A0964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "EC28625B968F1EDF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/is-wsl@3.1.1/node_modules/is-wsl/index.js", "../../node_modules/.bun/is-inside-container@1.0.0/node_modules/is-inside-container/index.js", "../../node_modules/.bun/is-docker@3.0.0/node_modules/is-docker/index.js"],
"sourcesContent": [
"import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tif (fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {\n\t\t\treturn !isInsideContainer();\n\t\t}\n\t} catch {}\n\n\t// Fallback for custom kernels: check WSL-specific paths.\n\tif (\n\t\tfs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')\n\t\t|| fs.existsSync('/run/WSL')\n\t) {\n\t\treturn !isInsideContainer();\n\t}\n\n\treturn false;\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n",
"import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n",
"import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n"
],
"mappings": ";AAAA,uBACA,kBACA,kBCFA,kBCAA,kBAEA,IAAI,EAEJ,SAAS,CAAY,EAAG,CACvB,GAAI,CAEH,OADA,EAAG,SAAS,aAAa,EAClB,GACN,KAAM,CACP,MAAO,IAIT,SAAS,CAAe,EAAG,CAC1B,GAAI,CACH,OAAO,EAAG,aAAa,oBAAqB,MAAM,EAAE,SAAS,QAAQ,EACpE,KAAM,CACP,MAAO,IAIT,SAAwB,CAAQ,EAAG,CAElC,GAAI,IAAmB,OACtB,EAAiB,EAAa,GAAK,EAAgB,EAGpD,OAAO,EDxBR,IAAI,EAGE,EAAkB,IAAM,CAC7B,GAAI,CAEH,OADA,EAAG,SAAS,oBAAoB,EACzB,GACN,KAAM,CACP,MAAO,KAIT,SAAwB,CAAiB,EAAG,CAE3C,GAAI,IAAiB,OACpB,EAAe,EAAgB,GAAK,EAAS,EAG9C,OAAO,EDhBR,IAAM,EAAQ,IAAM,CACnB,GAAI,EAAQ,WAAa,QACxB,MAAO,GAGR,GAAI,EAAG,QAAQ,EAAE,YAAY,EAAE,SAAS,WAAW,EAAG,CACrD,GAAI,EAAkB,EACrB,MAAO,GAGR,MAAO,GAGR,GAAI,CACH,GAAI,EAAG,aAAa,gBAAiB,MAAM,EAAE,YAAY,EAAE,SAAS,WAAW,EAC9E,MAAO,CAAC,EAAkB,EAE1B,KAAM,EAGR,GACC,EAAG,WAAW,qCAAqC,GAChD,EAAG,WAAW,UAAU,EAE3B,MAAO,CAAC,EAAkB,EAG3B,MAAO,IAGO,IAAQ,IAAI,gBAAkB,EAAQ,EAAM",
"debugId": "BCDDEC8FAEA4B94B64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "E50775C9C888BA6B64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "E4B25C0495411E1C64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-env@3.972.41/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
"debugId": "6520623184D730AF64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0C24A7D3D1232E5064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+vercel@2.0.39+d6123d32214422cb/node_modules/@ai-sdk/vercel/dist/index.mjs"],
"sourcesContent": [
"// src/vercel-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.39\" : \"0.0.0-test\";\n\n// src/vercel-provider.ts\nfunction createVercel(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.v0.dev/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"VERCEL_API_KEY\",\n description: \"Vercel\"\n })}`,\n ...options.headers\n },\n `ai-sdk/vercel/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `vercel.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n ...getCommonModelConfig(\"chat\")\n });\n };\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar vercel = createVercel();\nexport {\n VERSION,\n createVercel,\n vercel\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wQAYA,SAAI,OAAiB,cAGrB,cAAS,MAAY,CAAC,EAAU,CAAC,EAAG,CAClC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,uBACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,iBACzB,YAAa,QACf,CAAC,OACE,EAAQ,OACb,EACA,iBAAiB,GACnB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,UAAU,IACpB,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EAAkC,EAAS,IACjD,EAAqB,MAAM,CAChC,CAAC,GAEG,EAAW,CAAC,IAAY,EAAgB,CAAO,EAUrD,OATA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAS,EAAa",
"debugId": "A86AE294F93CD5F564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "E65A84E831E5A6F764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "52B62C45F25C931C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/constants.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js"],
"sourcesContent": [
"import { CredentialsProviderError, getProfileName, loadSsoSessionData, parseKnownFiles } from \"@smithy/core/config\";\nimport { isSsoProfile } from \"./isSsoProfile\";\nimport { resolveSSOCredentials } from \"./resolveSSOCredentials\";\nimport { validateSsoProfile } from \"./validateSsoProfile\";\nexport const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n};\n",
"export const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromSso as getSsoTokenProvider } from \"@aws-sdk/token-providers\";\nimport { CredentialsProviderError, getSSOTokenFromFile } from \"@smithy/core/config\";\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nexport const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await getSsoTokenProvider({\n profile,\n filepath,\n configFilepath,\n ignoreCache,\n })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = await import(\"./loadSso.js\");\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n",
"import { getProfileName, getSSOTokenFromFile, loadSsoSessionData, parseKnownFiles, TokenProviderError, } from \"@smithy/core/config\";\nimport { EXPIRE_WINDOW_MS, REFRESH_MESSAGE } from \"./constants\";\nimport { getNewSsoOidcToken } from \"./getNewSsoOidcToken\";\nimport { validateTokenExpiry } from \"./validateTokenExpiry\";\nimport { validateTokenKey } from \"./validateTokenKey\";\nimport { writeSSOTokenToFile } from \"./writeSSOTokenToFile\";\nconst lastRefreshAttemptTime = new Date(0);\nexport const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await parseKnownFiles(init);\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n",
"export const EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nexport const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n",
"export const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {\n const { SSOOIDCClient } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: coalesce(\"logger\"),\n userAgentAppId: coalesce(\"userAgentAppId\"),\n }));\n return ssoOidcClient;\n};\n",
"import { getSsoOidcClient } from \"./getSsoOidcClient\";\nexport const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {\n const { CreateTokenCommand } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { getSSOTokenFilepath } from \"@smithy/core/config\";\nimport { promises as fsPromises } from \"node:fs\";\nconst { writeFile } = fsPromises;\nexport const writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n"
],
"mappings": ";4JAAA,oBCAO,SAAM,EAAe,CAAC,IAAQ,IAChC,OAAO,EAAI,gBAAkB,UAC1B,OAAO,EAAI,iBAAmB,UAC9B,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,aAAe,UAC1B,OAAO,EAAI,gBAAkB,UCLrC,gBCAA,eCAO,IAAM,EAAmB,OACnB,EAAkB,kFCDxB,IAAM,EAAmB,MAAO,EAAW,EAAO,CAAC,EAAG,IAAuB,CAChF,IAAQ,iBAAkB,KAAa,0CACjC,EAAW,CAAC,IAAS,EAAK,eAAe,IAAS,EAAK,qBAAqB,IAAS,IAAqB,GAMhH,OALsB,IAAI,EAAc,OAAO,OAAO,CAAC,EAAG,EAAK,cAAgB,CAAC,EAAG,CAC/E,OAAQ,GAAa,EAAK,cAAc,OACxC,OAAQ,EAAS,QAAQ,EACzB,eAAgB,EAAS,gBAAgB,CAC7C,CAAC,CAAC,GCNC,IAAM,EAAqB,MAAO,EAAU,EAAW,EAAO,CAAC,EAAG,IAAuB,CAC5F,IAAQ,sBAAuB,KAAa,0CAE5C,OADsB,MAAM,EAA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AAM,IAAI,2BAAyB,4BAA8B,EAAa,CAC1E,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,EAAQ,WAAa,EAAQ,WAC7B,EAAQ,cAAgB,EAAQ,cAEpC,IAAQ,gBAAe,iBAAgB,aAAY,gBAAe,eAAgB,EAAmB,EAAS,EAAK,MAAM,EACzH,OAAO,EAAsB,CACzB,YAAa,EACb,WAAY,EACZ,aAAc,EACd,UAAW,EACX,YAAa,EACb,UAAW,EACX,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC,EAEA,QAAI,CAAC,GAAe,CAAC,GAAgB,CAAC,GAAa,CAAC,EACrD,MAAM,IAAI,2BAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQ,EAAK,MAAO,CAAC,EAG5G,YAAO,EAAsB,CACzB,cACA,aACA,eACA,YACA,cACA,YACA,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC",
"debugId": "896C19812B58495E64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+mistral@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/mistral/dist/index.mjs"],
"sourcesContent": [
"// src/mistral-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/mistral-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n injectJsonInstructionIntoMessages,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-mistral-usage.ts\nfunction convertMistralUsage(usage) {\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = usage.prompt_tokens;\n const completionTokens = usage.completion_tokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens,\n reasoning: void 0\n },\n raw: usage\n };\n}\n\n// src/convert-to-mistral-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction formatFileUrl({\n data,\n mediaType\n}) {\n return data instanceof URL ? data.toString() : `data:${mediaType};base64,${convertToBase64(data)}`;\n}\nfunction convertToMistralChatMessages(prompt) {\n var _a;\n const messages = [];\n for (let i = 0; i < prompt.length; i++) {\n const { role, content } = prompt[i];\n const isLastMessage = i === prompt.length - 1;\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (part.mediaType.startsWith(\"image/\")) {\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: formatFileUrl({ data: part.data, mediaType })\n };\n } else if (part.mediaType === \"application/pdf\") {\n return {\n type: \"document_url\",\n document_url: formatFileUrl({\n data: part.data,\n mediaType: \"application/pdf\"\n })\n };\n } else {\n throw new UnsupportedFunctionalityError({\n functionality: \"Only images and PDF file parts are supported\"\n });\n }\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n case \"reasoning\": {\n text += part.text;\n break;\n }\n default: {\n throw new Error(\n `Unsupported content type in assistant message: ${part.type}`\n );\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n prefix: isLastMessage ? true : void 0,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n name: toolResponse.toolName,\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/map-mistral-finish-reason.ts\nfunction mapMistralFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n case \"model_length\":\n return \"length\";\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/mistral-chat-options.ts\nimport { z } from \"zod/v4\";\nvar mistralLanguageModelOptions = z.object({\n /**\n * Whether to inject a safety prompt before all conversations.\n *\n * Defaults to `false`.\n */\n safePrompt: z.boolean().optional(),\n documentImageLimit: z.number().optional(),\n documentPageLimit: z.number().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n *\n * @default false\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Whether to enable parallel function calling during tool use.\n * When set to false, the model will use at most one tool per response.\n *\n * @default true\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * Controls the reasoning effort for models that support adjustable reasoning.\n *\n * - `'high'`: Enable reasoning\n * - `'none'`: Disable reasoning\n */\n reasoningEffort: z.enum([\"high\", \"none\"]).optional()\n});\n\n// src/mistral-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar mistralErrorDataSchema = z2.object({\n object: z2.literal(\"error\"),\n message: z2.string(),\n type: z2.string(),\n param: z2.string().nullable(),\n code: z2.string().nullable()\n});\nvar mistralFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: mistralErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/mistral-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const mistralTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n mistralTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: mistralTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n return { tools: mistralTools, toolChoice: type, toolWarnings };\n case \"required\":\n return { tools: mistralTools, toolChoice: \"any\", toolWarnings };\n // mistral does not support tool mode directly,\n // so we filter the tools and force the tool choice through 'any'\n case \"tool\":\n return {\n tools: mistralTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"any\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/mistral-chat-language-model.ts\nvar MistralChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"application/pdf\": [/^https:\\/\\/.*$/]\n };\n var _a;\n this.modelId = modelId;\n this.config = config;\n this.generateId = (_a = config.generateId) != null ? _a : generateId;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions,\n tools,\n toolChoice\n }) {\n var _a, _b, _c, _d;\n const warnings = [];\n const options = (_a = await parseProviderOptions({\n provider: \"mistral\",\n providerOptions,\n schema: mistralLanguageModelOptions\n })) != null ? _a : {};\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (frequencyPenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"frequencyPenalty\" });\n }\n if (presencePenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"presencePenalty\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n const structuredOutputs = (_b = options.structuredOutputs) != null ? _b : true;\n const strictJsonSchema = (_c = options.strictJsonSchema) != null ? _c : false;\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && !(responseFormat == null ? void 0 : responseFormat.schema)) {\n prompt = injectJsonInstructionIntoMessages({\n messages: prompt,\n schema: responseFormat.schema\n });\n }\n const baseArgs = {\n // model id:\n model: this.modelId,\n // model specific settings:\n safe_prompt: options.safePrompt,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n random_seed: seed,\n reasoning_effort: options.reasoningEffort,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && (responseFormat == null ? void 0 : responseFormat.schema) != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_d = responseFormat.name) != null ? _d : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // mistral-specific provider options:\n document_image_limit: options.documentImageLimit,\n document_page_limit: options.documentPageLimit,\n // messages:\n messages: convertToMistralChatMessages(prompt)\n };\n const {\n tools: mistralTools,\n toolChoice: mistralToolChoice,\n toolWarnings\n } = prepareTools({\n tools,\n toolChoice\n });\n return {\n args: {\n ...baseArgs,\n tools: mistralTools,\n tool_choice: mistralToolChoice,\n ...mistralTools != null && options.parallelToolCalls !== void 0 ? { parallel_tool_calls: options.parallelToolCalls } : {}\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a;\n const { args: body, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n mistralChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n if (choice.message.content != null && Array.isArray(choice.message.content)) {\n for (const part of choice.message.content) {\n if (part.type === \"thinking\") {\n const reasoningText = extractReasoningContent(part.thinking);\n if (reasoningText.length > 0) {\n content.push({ type: \"reasoning\", text: reasoningText });\n }\n } else if (part.type === \"text\") {\n if (part.text.length > 0) {\n content.push({ type: \"text\", text: part.text });\n }\n }\n }\n } else {\n const text = extractTextContent(choice.message.content);\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertMistralUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n mistralChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let activeText = false;\n let activeReasoningId = null;\n const generateId2 = this.generateId;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (value.usage != null) {\n usage = value.usage;\n }\n const choice = value.choices[0];\n const delta = choice.delta;\n const textContent = extractTextContent(delta.content);\n if (delta.content != null && Array.isArray(delta.content)) {\n for (const part of delta.content) {\n if (part.type === \"thinking\") {\n const reasoningDelta = extractReasoningContent(part.thinking);\n if (reasoningDelta.length > 0) {\n if (activeReasoningId == null) {\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n activeText = false;\n }\n activeReasoningId = generateId2();\n controller.enqueue({\n type: \"reasoning-start\",\n id: activeReasoningId\n });\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: activeReasoningId,\n delta: reasoningDelta\n });\n }\n }\n }\n }\n if (textContent != null && textContent.length > 0) {\n if (!activeText) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n activeReasoningId = null;\n }\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n activeText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n if ((delta == null ? void 0 : delta.tool_calls) != null) {\n for (const toolCall of delta.tool_calls) {\n const toolCallId = toolCall.id;\n const toolName = toolCall.function.name;\n const input = toolCall.function.arguments;\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallId,\n toolName\n });\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCallId,\n delta: input\n });\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCallId\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId,\n toolName,\n input\n });\n }\n }\n if (choice.finish_reason != null) {\n finishReason = {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n },\n flush(controller) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n }\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertMistralUsage(usage)\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction extractReasoningContent(thinking) {\n return thinking.filter((chunk) => chunk.type === \"text\").map((chunk) => chunk.text).join(\"\");\n}\nfunction extractTextContent(content) {\n if (typeof content === \"string\") {\n return content;\n }\n if (content == null) {\n return void 0;\n }\n const textContent = [];\n for (const chunk of content) {\n const { type } = chunk;\n switch (type) {\n case \"text\":\n textContent.push(chunk.text);\n break;\n case \"thinking\":\n case \"image_url\":\n case \"reference\":\n break;\n default: {\n const _exhaustiveCheck = type;\n throw new Error(`Unsupported type: ${_exhaustiveCheck}`);\n }\n }\n }\n return textContent.length ? textContent.join(\"\") : void 0;\n}\nvar mistralContentSchema = z3.union([\n z3.string(),\n z3.array(\n z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"image_url\"),\n image_url: z3.union([\n z3.string(),\n z3.object({\n url: z3.string(),\n detail: z3.string().nullable()\n })\n ])\n }),\n z3.object({\n type: z3.literal(\"reference\"),\n reference_ids: z3.array(z3.union([z3.string(), z3.number()]))\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.array(\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n })\n )\n })\n ])\n )\n]).nullish();\nvar mistralUsageSchema = z3.object({\n prompt_tokens: z3.number(),\n completion_tokens: z3.number(),\n total_tokens: z3.number()\n});\nvar mistralChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n role: z3.literal(\"assistant\"),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n object: z3.literal(\"chat.completion\"),\n usage: mistralUsageSchema\n});\nvar mistralChatChunkSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n role: z3.enum([\"assistant\"]).optional(),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n finish_reason: z3.string().nullish(),\n index: z3.number()\n })\n ),\n usage: mistralUsageSchema.nullish()\n});\n\n// src/mistral-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar MistralEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 32;\n this.supportsParallelCalls = false;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n abortSignal,\n headers\n }) {\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embeddings`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n input: values,\n encoding_format: \"float\"\n },\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n MistralTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.data.map((item) => item.embedding),\n usage: response.usage ? { tokens: response.usage.prompt_tokens } : void 0,\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar MistralTextEmbeddingResponseSchema = z4.object({\n data: z4.array(z4.object({ embedding: z4.array(z4.number()) })),\n usage: z4.object({ prompt_tokens: z4.number() }).nullish()\n});\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/mistral-provider.ts\nfunction createMistral(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.mistral.ai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"MISTRAL_API_KEY\",\n description: \"Mistral\"\n })}`,\n ...options.headers\n },\n `ai-sdk/mistral/${VERSION}`\n );\n const createChatModel = (modelId) => new MistralChatLanguageModel(modelId, {\n provider: \"mistral.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: options.generateId\n });\n const createEmbeddingModel = (modelId) => new MistralEmbeddingModel(modelId, {\n provider: \"mistral.embedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Mistral model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.chat = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar mistral = createMistral();\nexport {\n VERSION,\n createMistral,\n mistral\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";8TAuBA,cAAS,MAAmB,MAAC,OAAO,CAClC,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAA2B,cAArB,EACyB,kBAAzB,GAAmB,EACzB,MAAO,CACL,YAAa,CACX,MAAO,EACP,QAAS,EACT,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAO,EACP,KAAM,EACN,UAAgB,MAClB,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AAS,CACvD,EAEJ,EACI,GAAqC,EAAG,OAAO,CACjD,KAAM,EAAG,MAAM,EAAG,OAAO,CAAE,UAAW,EAAG,MAAM,EAAG,OAAO,CAAC,CAAE,CAAC,CAAC,EAC9D,MAAO,EAAG,OAAO,CAAE,cAAe,EAAG,OAAO,CAAE,CAAC,EAAE,QAAQ,CAC3D,CAAC,EAGG,GAAiB,SAGrB,SAAS,EAAa,CAAC,EAAU,CAAC,EAAG,CACnC,IAAI,EACJ,IAAM,GAAW,EAAK,EAAqB,EAAQ,OAAO,IAAM,KAAO,EAAK,4BACtE,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,kBACzB,YAAa,SACf,CAAC,OACE,EAAQ,OACb,EACA,kBAAkB,IACpB,EACM,EAAkB,CAAC,IAAY,IAAI,GAAyB,EAAS,CACzE,SAAU,eACV,UACA,QAAS,EACT,MAAO,EAAQ,MACf,WAAY,EAAQ,UACtB,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,GAAsB,EAAS,CAC3E,SAAU,oBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAW,QAAQ,CAAC,EAAS,CACjC,GAAI,WACF,MAAU,MACR,mEACF,EAEF,OAAO,EAAgB,CAAO,GAYhC,OAVA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAU,GAAc",
"debugId": "4BA7630AD861EB2D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "88140C4C6297AB4864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.45/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.45/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init, callerClientConfig);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isLoginProfile, resolveLoginCredentials } from \"./resolveLoginCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options, callerClientConfig);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options, callerClientConfig);\n }\n if (isLoginProfile(data)) {\n return resolveLoginCredentials(profileName, options, callerClientConfig);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName } from \"@smithy/core/config\";\nimport { resolveCredentialSource } from \"./resolveCredentialSource\";\nexport const isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nexport const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import(\"@aws-sdk/nested-clients/sts\");\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...callerClientConfig,\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n const { fromContainerMetadata } = await import(\"@smithy/credential-provider-imds\");\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import(\"@aws-sdk/credential-provider-env\");\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromLoginCredentials } from \"@aws-sdk/credential-provider-login\";\nexport const isLoginProfile = (data) => {\n return Boolean(data && data.login_session);\n};\nexport const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {\n const credentials = await fromLoginCredentials({\n ...options,\n profile: profileName,\n })({ callerClientConfig });\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_LOGIN\", \"AC\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { LoginCredentialsFetcher } from \"./LoginCredentialsFetcher\";\nexport const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {\n init?.logger?.debug?.(\"@aws-sdk/credential-providers - fromLoginCredentials\");\n const profiles = await parseKnownFiles(init || {});\n const profileName = getProfileName({\n profile: init?.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile?.login_session) {\n throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {\n tryNextLink: true,\n logger: init?.logger,\n });\n }\n const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);\n const credentials = await fetcher.loadCredentials();\n return setCredentialFeature(credentials, \"CREDENTIALS_LOGIN\", \"AD\");\n};\n",
"import { CredentialsProviderError, readFile } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { createHash, createPrivateKey, createPublicKey, sign } from \"node:crypto\";\nimport { promises as fs } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nexport class LoginCredentialsFetcher {\n profileData;\n init;\n callerClientConfig;\n static REFRESH_THRESHOLD = 5 * 60 * 1000;\n constructor(profileData, init, callerClientConfig) {\n this.profileData = profileData;\n this.init = init;\n this.callerClientConfig = callerClientConfig;\n }\n async loadCredentials() {\n const token = await this.loadToken();\n if (!token) {\n throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });\n }\n const accessToken = token.accessToken;\n const now = Date.now();\n const expiryTime = new Date(accessToken.expiresAt).getTime();\n const timeUntilExpiry = expiryTime - now;\n if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {\n return this.refresh(token);\n }\n return {\n accessKeyId: accessToken.accessKeyId,\n secretAccessKey: accessToken.secretAccessKey,\n sessionToken: accessToken.sessionToken,\n accountId: accessToken.accountId,\n expiration: new Date(accessToken.expiresAt),\n };\n }\n get logger() {\n return this.init?.logger;\n }\n get loginSession() {\n return this.profileData.login_session;\n }\n async refresh(token) {\n const { SigninClient, CreateOAuth2TokenCommand } = await import(\"@aws-sdk/nested-clients/signin\");\n const { logger, userAgentAppId } = this.callerClientConfig ?? {};\n const isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n };\n const requestHandler = isH2(this.callerClientConfig?.requestHandler)\n ? undefined\n : this.callerClientConfig?.requestHandler;\n const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;\n const client = new SigninClient({\n credentials: {\n accessKeyId: \"\",\n secretAccessKey: \"\",\n },\n region,\n requestHandler,\n logger,\n userAgentAppId,\n ...this.init?.clientConfig,\n });\n this.createDPoPInterceptor(client.middlewareStack);\n const commandInput = {\n tokenInput: {\n clientId: token.clientId,\n refreshToken: token.refreshToken,\n grantType: \"refresh_token\",\n },\n };\n try {\n const response = await client.send(new CreateOAuth2TokenCommand(commandInput));\n const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};\n const { refreshToken, expiresIn } = response.tokenOutput ?? {};\n if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {\n throw new CredentialsProviderError(\"Token refresh response missing required fields\", {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n const expiresInMs = (expiresIn ?? 900) * 1000;\n const expiration = new Date(Date.now() + expiresInMs);\n const updatedToken = {\n ...token,\n accessToken: {\n ...token.accessToken,\n accessKeyId: accessKeyId,\n secretAccessKey: secretAccessKey,\n sessionToken: sessionToken,\n expiresAt: expiration.toISOString(),\n },\n refreshToken: refreshToken,\n };\n await this.saveToken(updatedToken);\n const newAccessToken = updatedToken.accessToken;\n return {\n accessKeyId: newAccessToken.accessKeyId,\n secretAccessKey: newAccessToken.secretAccessKey,\n sessionToken: newAccessToken.sessionToken,\n accountId: newAccessToken.accountId,\n expiration,\n };\n }\n catch (error) {\n if (error.name === \"AccessDeniedException\") {\n const errorType = error.error;\n let message;\n switch (errorType) {\n case \"TOKEN_EXPIRED\":\n message = \"Your session has expired. Please reauthenticate.\";\n break;\n case \"USER_CREDENTIALS_CHANGED\":\n message =\n \"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.\";\n break;\n case \"INSUFFICIENT_PERMISSIONS\":\n message =\n \"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.\";\n break;\n default:\n message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \\`aws login\\``;\n }\n throw new CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });\n }\n throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });\n }\n }\n async loadToken() {\n const tokenFilePath = this.getTokenFilePath();\n try {\n let tokenData;\n try {\n tokenData = await readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });\n }\n catch {\n tokenData = await fs.readFile(tokenFilePath, \"utf8\");\n }\n const token = JSON.parse(tokenData);\n const missingFields = [\"accessToken\", \"clientId\", \"refreshToken\", \"dpopKey\"].filter((k) => !token[k]);\n if (!token.accessToken?.accountId) {\n missingFields.push(\"accountId\");\n }\n if (missingFields.length > 0) {\n throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(\", \")}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n return token;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n }\n async saveToken(token) {\n const tokenFilePath = this.getTokenFilePath();\n const directory = dirname(tokenFilePath);\n try {\n await fs.mkdir(directory, { recursive: true });\n }\n catch (error) {\n }\n await fs.writeFile(tokenFilePath, JSON.stringify(token, null, 2), \"utf8\");\n }\n getTokenFilePath() {\n const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join(homedir(), \".aws\", \"login\", \"cache\");\n const loginSessionBytes = Buffer.from(this.loginSession, \"utf8\");\n const loginSessionSha256 = createHash(\"sha256\").update(loginSessionBytes).digest(\"hex\");\n return join(directory, `${loginSessionSha256}.json`);\n }\n derToRawSignature(derSignature) {\n let offset = 2;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const rLength = derSignature[offset++];\n let r = derSignature.subarray(offset, offset + rLength);\n offset += rLength;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const sLength = derSignature[offset++];\n let s = derSignature.subarray(offset, offset + sLength);\n r = r[0] === 0x00 ? r.subarray(1) : r;\n s = s[0] === 0x00 ? s.subarray(1) : s;\n const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);\n const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);\n return Buffer.concat([rPadded, sPadded]);\n }\n createDPoPInterceptor(middlewareStack) {\n middlewareStack.add((next) => async (args) => {\n if (HttpRequest.isInstance(args.request)) {\n const request = args.request;\n const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : \"\"}${request.path}`;\n const dpop = await this.generateDpop(request.method, actualEndpoint);\n request.headers = {\n ...request.headers,\n DPoP: dpop,\n };\n }\n return next(args);\n }, {\n step: \"finalizeRequest\",\n name: \"dpopInterceptor\",\n override: true,\n });\n }\n async generateDpop(method = \"POST\", endpoint) {\n const token = await this.loadToken();\n try {\n const privateKey = createPrivateKey({\n key: token.dpopKey,\n format: \"pem\",\n type: \"sec1\",\n });\n const publicKey = createPublicKey(privateKey);\n const publicDer = publicKey.export({ format: \"der\", type: \"spki\" });\n let pointStart = -1;\n for (let i = 0; i < publicDer.length; i++) {\n if (publicDer[i] === 0x04) {\n pointStart = i;\n break;\n }\n }\n const x = publicDer.slice(pointStart + 1, pointStart + 33);\n const y = publicDer.slice(pointStart + 33, pointStart + 65);\n const header = {\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: {\n kty: \"EC\",\n crv: \"P-256\",\n x: x.toString(\"base64url\"),\n y: y.toString(\"base64url\"),\n },\n };\n const payload = {\n jti: crypto.randomUUID(),\n htm: method,\n htu: endpoint,\n iat: Math.floor(Date.now() / 1000),\n };\n const headerB64 = Buffer.from(JSON.stringify(header)).toString(\"base64url\");\n const payloadB64 = Buffer.from(JSON.stringify(payload)).toString(\"base64url\");\n const message = `${headerB64}.${payloadB64}`;\n const asn1Signature = sign(\"sha256\", Buffer.from(message), privateKey);\n const rawSignature = this.derToRawSignature(asn1Signature);\n const signatureB64 = rawSignature.toString(\"base64url\");\n return `${message}.${signatureB64}`;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });\n }\n }\n}\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nexport const resolveProcessCredentials = async (options, profile) => import(\"@aws-sdk/credential-provider-process\").then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })({\n callerClientConfig,\n }).then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nexport const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nexport const resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import(\"@aws-sdk/credential-provider-web-identity\").then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})({\n callerClientConfig,\n}).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n"
],
"mappings": ";0MAAA,oBCAA,qBCAA,oBACA,WCDA,eACA,WACa,EAA0B,CAAC,EAAkB,EAAa,IAAW,CAC9E,IAAM,EAAqB,CACvB,aAAc,MAAO,IAAY,CAC7B,IAAQ,YAAa,KAAa,2CAC1B,yBAA0B,KAAa,0CAE/C,OADA,GAAQ,MAAM,sEAAsE,EAC7E,SAAY,QAAM,EAAS,GAAW,CAAC,CAAC,EAAG,EAAsB,CAAO,CAAC,EAAE,EAAE,KAAK,CAAgB,GAE7G,oBAAqB,MAAO,IAAY,CACpC,GAAQ,MAAM,6EAA6E,EAC3F,IAAQ,wBAAyB,KAAa,0CAC9C,MAAO,UAAY,EAAqB,CAAO,EAAE,EAAE,KAAK,CAAgB,GAE5E,YAAa,MAAO,IAAY,CAC5B,GAAQ,MAAM,qEAAqE,EACnF,IAAQ,WAAY,KAAa,0CACjC,MAAO,UAAY,EAAQ,CAAO,EAAE,EAAE,KAAK,CAAgB,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AS,CAAkB,EAErF,GAAI,EAAe,CAAI,EACnB,OAAO,EAAwB,EAAa,EAAS,CAAkB,EAE3E,MAAM,IAAI,4BAAyB,iDAAiD,2CAAsD,CAAE,OAAQ,EAAQ,MAAO,CAAC,GD5BjK,IAAM,GAAU,CAAC,EAAO,CAAC,IAAM,OAAS,sBAAuB,CAAC,IAAM,CACzE,EAAK,QAAQ,MAAM,4CAA4C,EAC/D,IAAM,EAAW,MAAM,kBAAgB,CAAI,EAC3C,OAAO,EAAmB,iBAAe,CACrC,QAAS,EAAK,SAAW,GAAoB,OACjD,CAAC,EAAG,EAAU,EAAM,CAAkB",
"debugId": "4F0E721ABB533EC264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "CD7F916C31A1902864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/migrate.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\n\nexport default Runtime.handler(Commands.commands.migrate, (_input) => Effect.log(\"No migrations to run.\"))\n"
],
"mappings": ";qRAIA,SAAe,SAAQ,aAAQ,OAAS,cAAS,aAAS,CAAC,IAAkB,EAAI,uBAAuB,CAAC",
"debugId": "A1FD3506EA3F6FC064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.execAsync = void 0;\nconst child_process = require(\"child_process\");\nconst util = require(\"util\");\nexports.execAsync = util.promisify(child_process.exec);\n//# sourceMappingURL=execAsync.js.map"
],
"mappings": ";0EAKA,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,YAAiB,OACzB,IAAM,qBACA,YACE,YAAY,EAAK,UAAU,EAAc,IAAI",
"debugId": "D58FE3CB6721E2FB64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display