{"version":3,"file":"otlp-browser-http-export-delegate.js","sourceRoot":"","sources":["../../src/otlp-browser-http-export-delegate.ts"],"names":[],"mappings":";;;AAkBA,6DAA+D;AAC/D,6DAA+D;AAC/D,6EAA8E;AAC9E,iFAAiF;AACjF,iEAAmE;AAEnE;;GAEG;AACH,SAAgB,2BAA2B,CACzC,OAA8B,EAC9B,UAA2C;IAE3C,OAAO,IAAA,8DAA+B,EACpC,OAAO,EACP,UAAU,EACV,IAAA,4CAAuB,EAAC;QACtB,SAAS,EAAE,IAAA,kCAAkB,EAAC,OAAO,CAAC;KACvC,CAAC,CACH,CAAC;AACJ,CAAC;AAXD,kEAWC;AAED,SAAgB,6BAA6B,CAC3C,OAA8B,EAC9B,UAA2C;IAE3C,OAAO,IAAA,8DAA+B,EACpC,OAAO,EACP,UAAU,EACV,IAAA,4CAAuB,EAAC;QACtB,SAAS,EAAE,IAAA,sCAAoB,EAAC,OAAO,CAAC;KACzC,CAAC,CACH,CAAC;AACJ,CAAC;AAXD,sEAWC;AAED,SAAgB,kCAAkC,CAChD,OAA8B,EAC9B,UAA2C;IAE3C,OAAO,IAAA,8DAA+B,EACpC,OAAO,EACP,UAAU,EACV,IAAA,4CAAuB,EAAC;QACtB,SAAS,EAAE,IAAA,iDAAyB,EAAC;YACnC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,cAAc,CAAC;SAC5C,CAAC;KACH,CAAC,CACH,CAAC;AACJ,CAAC;AAdD,gFAcC","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 { OtlpHttpConfiguration } from './configuration/otlp-http-configuration';\nimport { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { IOtlpExportDelegate } from './otlp-export-delegate';\nimport { createRetryingTransport } from './retrying-transport';\nimport { createXhrTransport } from './transport/xhr-transport';\nimport { createSendBeaconTransport } from './transport/send-beacon-transport';\nimport { createOtlpNetworkExportDelegate } from './otlp-network-export-delegate';\nimport { createFetchTransport } from './transport/fetch-transport';\n\n/**\n * @deprecated use {@link createOtlpFetchExportDelegate}\n */\nexport function createOtlpXhrExportDelegate<Internal, Response>(\n  options: OtlpHttpConfiguration,\n  serializer: ISerializer<Internal, Response>\n): IOtlpExportDelegate<Internal> {\n  return createOtlpNetworkExportDelegate(\n    options,\n    serializer,\n    createRetryingTransport({\n      transport: createXhrTransport(options),\n    })\n  );\n}\n\nexport function createOtlpFetchExportDelegate<Internal, Response>(\n  options: OtlpHttpConfiguration,\n  serializer: ISerializer<Internal, Response>\n): IOtlpExportDelegate<Internal> {\n  return createOtlpNetworkExportDelegate(\n    options,\n    serializer,\n    createRetryingTransport({\n      transport: createFetchTransport(options),\n    })\n  );\n}\n\nexport function createOtlpSendBeaconExportDelegate<Internal, Response>(\n  options: OtlpHttpConfiguration,\n  serializer: ISerializer<Internal, Response>\n): IOtlpExportDelegate<Internal> {\n  return createOtlpNetworkExportDelegate(\n    options,\n    serializer,\n    createRetryingTransport({\n      transport: createSendBeaconTransport({\n        url: options.url,\n        blobType: options.headers()['Content-Type'],\n      }),\n    })\n  );\n}\n"]}