{"version":3,"file":"convert-legacy-browser-http-options.js","sourceRoot":"","sources":["../../../src/configuration/convert-legacy-browser-http-options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,4BAA4B,EAC5B,sCAAsC,GAEvC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,UAAU,+BAA+B,CAC7C,MAAkC,EAClC,kBAA0B,EAC1B,eAAuC;IAEvC,OAAO,sCAAsC,CAC3C;QACE,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,OAAO,EAAE,2BAA2B,CAAC,MAAM,CAAC,OAAO,CAAC;QACpD,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,EACD,EAAE,EAAE,+BAA+B;IACnC,4BAA4B,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAClE,CAAC;AACJ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n  getHttpConfigurationDefaults,\n  mergeOtlpHttpConfigurationWithDefaults,\n  OtlpHttpConfiguration,\n} from './otlp-http-configuration';\nimport { OTLPExporterNodeConfigBase } from './legacy-node-configuration';\nimport { wrapStaticHeadersInFunction } from './shared-configuration';\n\n/**\n * @deprecated this will be removed in 2.0\n *\n * @param config\n * @param signalResourcePath\n * @param requiredHeaders\n */\nexport function convertLegacyBrowserHttpOptions(\n  config: OTLPExporterNodeConfigBase,\n  signalResourcePath: string,\n  requiredHeaders: Record<string, string>\n): OtlpHttpConfiguration {\n  return mergeOtlpHttpConfigurationWithDefaults(\n    {\n      url: config.url,\n      timeoutMillis: config.timeoutMillis,\n      headers: wrapStaticHeadersInFunction(config.headers),\n      concurrencyLimit: config.concurrencyLimit,\n    },\n    {}, // no fallback for browser case\n    getHttpConfigurationDefaults(requiredHeaders, signalResourcePath)\n  );\n}\n"]}