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tW,OAASxC,EAAMwC,QAC1CoW,EAAI/M,IAAIiN,GACRF,EAAI/M,IAAI7L,EAAO8Y,EAAMtW,SAEzBqW,EAAS1U,EACF,CAAC,EAAa,GACzB,KAAK,EAAG,MAAO,CAAC,EAAcyU,GAEtC,GACJ,GACJ,CACA,SAASD,EAAaV,GAClB,OAAO,IAAItY,SAAQ,SAAUC,EAASQ,GAClC,IAAIyU,EAAS,IAAIkE,WACjBlE,EAAOmE,UAAY,WACf,IAAIlc,EAGJ,GAA0B,IAAtB+X,EAAOoE,WACP,OAAO7Y,EAAO,IAAIW,MAAM,6BAE5B,IAAIhB,EAAmC,QAAxBjD,EAAK+X,EAAO9U,cAA2B,IAAPjD,EAAgBA,EAAK,GAGhEoc,EAAanZ,EAAO0I,QAAQ,KAC5B0Q,EAAaD,GAAc,EAAIA,EAAa,EAAInZ,EAAOyC,OAC3D5C,EAAQG,EAAOqZ,UAAUD,GAC7B,EACAtE,EAAOqD,QAAU,WAAc,OAAO9X,EAAO,IAAIW,MAAM,gBAAkB,EACzE8T,EAAOhV,QAAU,WAAc,OAAOO,EAAOyU,EAAOxU,MAAQ,EAE5DwU,EAAOwE,cAAcpB,EACzB,GACJ,C","sources":["webpack://smapac/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/fromCognitoIdentity.js","webpack://smapac/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/IndexedDbStorage.js","webpack://smapac/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/InMemoryStorage.js","webpack://smapac/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/localStorage.js","webpack://smapac/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/fromCognitoIdentityPool.js","webpack://smapac/./node_modules/@aws-sdk/credential-provider-cognito-identity/dist/es/resolveLogins.js","webpack://smapac/./node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/tslib/tslib.es6.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-marshaller/node_modules/@aws-crypto/crc32/build/aws_crc32.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-marshaller/node_modules/@aws-crypto/crc32/build/index.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-marshaller/node_modules/tslib/tslib.es6.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-marshaller/dist/es/Int64.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-marshaller/dist/es/HeaderMarshaller.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-marshaller/dist/es/splitMessage.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-marshaller/dist/es/EventStreamMarshaller.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-universal/node_modules/tslib/tslib.es6.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-universal/dist/es/getChunkedStream.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-universal/dist/es/getUnmarshalledStream.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-universal/dist/es/EventStreamMarshaller.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-browser/node_modules/tslib/tslib.es6.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-browser/dist/es/utils.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-browser/dist/es/EventStreamMarshaller.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-browser/dist/es/provider.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-config-resolver/node_modules/tslib/tslib.es6.js","webpack://smapac/./node_modules/@aws-sdk/eventstream-serde-config-resolver/dist/es/EventStreamSerdeConfig.js","webpack://smapac/./node_modules/@aws-sdk/fetch-http-handler/node_modules/tslib/tslib.es6.js","webpack://smapac/./node_modules/@aws-sdk/fetch-http-handler/dist/es/request-timeout.js","webpack://smapac/./node_modules/@aws-sdk/fetch-http-handler/dist/es/fetch-http-handler.js","webpack://smapac/./node_modules/@aws-sdk/fetch-http-handler/dist/es/stream-collector.js"],"sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nimport { GetCredentialsForIdentityCommand } from \"@aws-sdk/client-cognito-identity\";\nimport { ProviderError } from \"@aws-sdk/property-provider\";\nimport { resolveLogins } from \"./resolveLogins\";\n/**\n * Retrieves temporary AWS credentials using Amazon Cognito's\n * `GetCredentialsForIdentity` operation.\n *\n * Results from this function call are not cached internally.\n */\nexport function fromCognitoIdentity(parameters) {\n var _this = this;\n return function () { return __awaiter(_this, void 0, void 0, function () {\n var _a, _b, _c, AccessKeyId, Expiration, _d, SecretKey, SessionToken, _e, _f, _g, _h;\n var _j;\n return __generator(this, function (_k) {\n switch (_k.label) {\n case 0:\n _f = (_e = parameters.client).send;\n _g = GetCredentialsForIdentityCommand.bind;\n _j = {\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId\n };\n if (!parameters.logins) return [3 /*break*/, 2];\n return [4 /*yield*/, resolveLogins(parameters.logins)];\n case 1:\n _h = _k.sent();\n return [3 /*break*/, 3];\n case 2:\n _h = undefined;\n _k.label = 3;\n case 3: return [4 /*yield*/, _f.apply(_e, [new (_g.apply(GetCredentialsForIdentityCommand, [void 0, (_j.Logins = _h,\n _j)]))()])];\n case 4:\n _a = (_k.sent()).Credentials, _b = _a === void 0 ? throwOnMissingCredentials() : _a, _c = _b.AccessKeyId, AccessKeyId = _c === void 0 ? throwOnMissingAccessKeyId() : _c, Expiration = _b.Expiration, _d = _b.SecretKey, SecretKey = _d === void 0 ? throwOnMissingSecretKey() : _d, SessionToken = _b.SessionToken;\n return [2 /*return*/, {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration,\n }];\n }\n });\n }); };\n}\nfunction throwOnMissingAccessKeyId() {\n throw new ProviderError(\"Response from Amazon Cognito contained no access key ID\");\n}\nfunction throwOnMissingCredentials() {\n throw new ProviderError(\"Response from Amazon Cognito contained no credentials\");\n}\nfunction throwOnMissingSecretKey() {\n throw new ProviderError(\"Response from Amazon Cognito contained no secret key\");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b250YWluZWQgbm8gYWNjZXNzIGtleSBJRFwiKTtcbn1cblxuZnVuY3Rpb24gdGhyb3dPbk1pc3NpbmdDcmVkZW50aWFscygpOiBuZXZlciB7XG4gIHRocm93IG5ldyBQcm92aWRlckVycm9yKFwiUmVzcG9uc2UgZnJvbSBBbWF6b24gQ29nbml0byBjb250YWluZWQgbm8gY3JlZGVudGlhbHNcIik7XG59XG5cbmZ1bmN0aW9uIHRocm93T25NaXNzaW5nU2VjcmV0S2V5KCk6IG5ldmVyIHtcbiAgdGhyb3cgbmV3IFByb3ZpZGVyRXJyb3IoXCJSZXNwb25zZSBmcm9tIEFtYXpvbiBDb2duaXRvIGNvbnRhaW5lZCBubyBzZWNyZXQga2V5XCIpO1xufVxuIl19","var STORE_NAME = \"IdentityIds\";\nvar IndexedDbStorage = /** @class */ (function () {\n function IndexedDbStorage(dbName) {\n if (dbName === void 0) { dbName = \"aws:cognito-identity-ids\"; }\n this.dbName = dbName;\n }\n IndexedDbStorage.prototype.getItem = function (key) {\n return this.withObjectStore(\"readonly\", function (store) {\n var req = store.get(key);\n return new Promise(function (resolve) {\n req.onerror = function () { return resolve(null); };\n req.onsuccess = function () { return resolve(req.result ? req.result.value : null); };\n });\n }).catch(function () { return null; });\n };\n IndexedDbStorage.prototype.removeItem = function (key) {\n return this.withObjectStore(\"readwrite\", function (store) {\n var req = store.delete(key);\n return new Promise(function (resolve, reject) {\n req.onerror = function () { return reject(req.error); };\n req.onsuccess = function () { return resolve(); };\n });\n });\n };\n IndexedDbStorage.prototype.setItem = function (id, value) {\n return this.withObjectStore(\"readwrite\", function (store) {\n var req = store.put({ id: id, value: value });\n return new Promise(function (resolve, reject) {\n req.onerror = function () { return reject(req.error); };\n req.onsuccess = function () { return resolve(); };\n });\n });\n };\n IndexedDbStorage.prototype.getDb = function () {\n var openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise(function (resolve, reject) {\n openDbRequest.onsuccess = function () {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = function () {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = function () {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = function () {\n var db = openDbRequest.result;\n db.onerror = function () {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n };\n IndexedDbStorage.prototype.withObjectStore = function (mode, action) {\n return this.getDb().then(function (db) {\n var tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = function () { return db.close(); };\n return new Promise(function (resolve, reject) {\n tx.onerror = function () { return reject(tx.error); };\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch(function (err) {\n db.close();\n throw err;\n });\n });\n };\n return IndexedDbStorage;\n}());\nexport { IndexedDbStorage };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5kZXhlZERiU3RvcmFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9JbmRleGVkRGJTdG9yYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLElBQU0sVUFBVSxHQUFHLGFBQWEsQ0FBQztBQUVqQztJQUNFLDBCQUE2QixNQUEyQztRQUEzQyx1QkFBQSxFQUFBLG1DQUEyQztRQUEzQyxXQUFNLEdBQU4sTUFBTSxDQUFxQztJQUFHLENBQUM7SUFFNUUsa0NBQU8sR0FBUCxVQUFRLEdBQVc7UUFDakIsT0FBTyxJQUFJLENBQUMsZUFBZSxDQUFDLFVBQVUsRUFBRSxVQUFDLEtBQUs7WUFDNUMsSUFBTSxHQUFHLEdBQUcsS0FBSyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztZQUUzQixPQUFPLElBQUksT0FBTyxDQUFnQixVQUFDLE9BQU87Z0JBQ3hDLEdBQUcsQ0FBQyxPQUFPLEdBQUcsY0FBTSxPQUFBLE9BQU8sQ0FBQyxJQUFJLEN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i5jbG9zZSgpO1xuICAgICAgICB0aHJvdyBlcnI7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxufVxuIl19","var InMemoryStorage = /** @class */ (function () {\n function InMemoryStorage(store) {\n if (store === void 0) { store = {}; }\n this.store = store;\n }\n InMemoryStorage.prototype.getItem = function (key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n };\n InMemoryStorage.prototype.removeItem = function (key) {\n delete this.store[key];\n };\n InMemoryStorage.prototype.setItem = function (key, value) {\n this.store[key] = value;\n };\n return InMemoryStorage;\n}());\nexport { InMemoryStorage };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5NZW1vcnlTdG9yYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0luTWVtb3J5U3RvcmFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQTtJQUNFLHlCQUFvQixLQUFxQztRQUFyQyxzQkFBQSxFQUFBLFVBQXFDO1FBQXJDLFVBQUssR0FBTCxLQUFLLENBQWdDO0lBQUcsQ0FBQztJQUU3RCxpQ0FBTyxHQUFQLFVBQVEsR0FBVztRQUNqQixJQUFJLEdBQUcsSUFBSSxJQUFJLENBQUMsS0FBSyxFQUFFO1lBQ3JCLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztTQUN4QjtRQUVELE9BQU8sSUFBSSxDQUFDO0lBQ2QsQ0FBQztJQUVELG9DQUFVLEdBQVYsVUFBVyxHQUFXO1FBQ3BCLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUN6QixDQUFDO0lBRUQsaUNBQU8sR0FBUCxVQUFRLEdBQVcsRUFBRSxLQUFhO1FBQ2hDLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEdBQUcsS0FBSyxDQUFDO0lBQzFCLENBQUM7SUFDSCxzQkFBQztBQUFELENBQUMsQUFsQkQsSUFrQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBTdG9yYWdlIH0gZnJvbSBcIi4vU3RvcmFnZVwiO1xuXG5leHBvcnQgY2xhc3MgSW5NZW1vcnlTdG9yYWdlIGltcGxlbWVudHMgU3RvcmFnZSB7XG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgc3RvcmU6IHsgW2tleTogc3RyaW5nXTogc3RyaW5nIH0gPSB7fSkge31cblxuICBnZXRJdGVtKGtleTogc3RyaW5nKTogc3RyaW5nIHwgbnVsbCB7XG4gICAgaWYgKGtleSBpbiB0aGlzLnN0b3JlKSB7XG4gICAgICByZXR1cm4gdGhpcy5zdG9yZVtrZXldO1xuICAgIH1cblxuICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgcmVtb3ZlSXRlbShrZXk6IHN0cmluZyk6IHZvaWQge1xuICAgIGRlbGV0ZSB0aGlzLnN0b3JlW2tleV07XG4gIH1cblxuICBzZXRJdGVtKGtleTogc3RyaW5nLCB2YWx1ZTogc3RyaW5nKTogdm9pZCB7XG4gICAgdGhpcy5zdG9yZVtrZXldID0gdmFsdWU7XG4gIH1cbn1cbiJdfQ==","import { IndexedDbStorage } from \"./IndexedDbStorage\";\nimport { InMemoryStorage } from \"./InMemoryStorage\";\nvar 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//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxTdG9yYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2xvY2FsU3RvcmFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQ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U3RvcmFnZTtcbiAgfVxuXG4gIHJldHVybiBpbk1lbW9yeVN0b3JhZ2U7XG59XG4iXX0=","import { __awaiter, __generator } from \"tslib\";\nimport { GetIdCommand } from \"@aws-sdk/client-cognito-identity\";\nimport { ProviderError } from \"@aws-sdk/property-provider\";\nimport { fromCognitoIdentity } from \"./fromCognitoIdentity\";\nimport { localStorage } from \"./localStorage\";\nimport { resolveLogins } from \"./resolveLogins\";\n/**\n * Retrieves or generates a unique identifier using Amazon Cognito's `GetId`\n * operation, then generates temporary AWS credentials using Amazon Cognito's\n * `GetCredentialsForIdentity` operation.\n *\n * Results from `GetId` are cached internally, but results from\n * `GetCredentialsForIdentity` are not.\n */\nexport function fromCognitoIdentityPool(_a) {\n var _this = this;\n var accountId = _a.accountId, _b = _a.cache, cache = _b === void 0 ? localStorage() : _b, client = _a.client, customRoleArn = _a.customRoleArn, identityPoolId = _a.identityPoolId, logins = _a.logins, _c = _a.userIdentifier, userIdentifier = _c === void 0 ? !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : undefined : _c;\n var cacheKey = userIdentifier ? \"aws:cognito-identity-credentials:\" + identityPoolId + \":\" + userIdentifier : undefined;\n var provider = function () { return __awaiter(_this, void 0, void 0, function () {\n var identityId, _a, _b, IdentityId, _c, _d, _e, _f;\n var _g;\n return __generator(this, function (_h) {\n switch (_h.label) {\n case 0:\n _a = cacheKey;\n if (!_a) return [3 /*break*/, 2];\n return [4 /*yield*/, cache.getItem(cacheKey)];\n case 1:\n _a = (_h.sent());\n _h.label = 2;\n case 2:\n identityId = _a;\n if (!!identityId) return [3 /*break*/, 7];\n _d = (_c = client).send;\n _e = GetIdCommand.bind;\n _g = {\n AccountId: accountId,\n IdentityPoolId: identityPoolId\n };\n if (!logins) return [3 /*break*/, 4];\n return [4 /*yield*/, resolveLogins(logins)];\n case 3:\n _f = _h.sent();\n return [3 /*break*/, 5];\n case 4:\n _f = undefined;\n _h.label = 5;\n case 5: return [4 /*yield*/, _d.apply(_c, [new (_e.apply(GetIdCommand, [void 0, (_g.Logins = _f,\n _g)]))()])];\n case 6:\n _b = (_h.sent()).IdentityId, IdentityId = _b === void 0 ? throwOnMissingId() : _b;\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(function () { });\n }\n _h.label = 7;\n case 7:\n provider = fromCognitoIdentity({\n client: client,\n customRoleArn: customRoleArn,\n logins: logins,\n identityId: identityId,\n });\n return [2 /*return*/, provider()];\n }\n });\n }); };\n return function () {\n return provider().catch(function (err) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(function () { });\n }\n throw err;\n });\n }); });\n };\n}\nfunction throwOnMissingId() {\n throw new ProviderError(\"Response from Amazon Cognito contained no identity ID\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUNvZ25pdG9JZGVudGl0eVBvb2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZnJvbUNvZ25pdG9JZGVudGl0eVBvb2wudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUNoRSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFJM0QsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDNUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzlDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUdoRDs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxVQUFVLHVCQUF1QixDQUFDLEVBUUo7SUFScEMsaUJBNkNDO1FBNUNDLFNBQVMsZUFBQSxFQUNUL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IHRocm93T25NaXNzaW5nSWQoKTogbmV2ZXIge1xuICB0aHJvdyBuZXcgUHJvdmlkZXJFcnJvcihcIlJlc3BvbnNlIGZyb20gQW1hem9uIENvZ25pdG8gY29udGFpbmVkIG5vIGlkZW50aXR5IElEXCIpO1xufVxuIl19","import { __read } from \"tslib\";\n/**\n * @internal\n */\nexport function resolveLogins(logins) {\n return Promise.all(Object.keys(logins).reduce(function (arr, name) {\n var tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n }\n else {\n arr.push(tokenOrProvider().then(function (token) { return [name, token]; }));\n }\n return arr;\n }, [])).then(function (resolvedPairs) {\n return resolvedPairs.reduce(function (logins, _a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n logins[key] = value;\n return logins;\n }, {});\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZUxvZ2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZXNvbHZlTG9naW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQTs7R0FFRztBQUNILE1BQU0sVUFBVSxhQUFhLENBQUMsTUFBYztJQUMxQyxPQUFPLE9BQU8sQ0FBQyxHQUFHLENBQ2hCLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsTUFBTSxDQUFDLFVBQUMsR0FBd0QsRUFBRSxJQUFZO1FBQ2hHLElBQU0sZUFBZSxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNyQyxJQUFJLE9BQU8sZUFBZSxLQUFLLFFBQVEsRUFBRTtZQUN2QyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxFQUFFLGVBQWUsQ0FBcUIsQ0FBQyxDQUFDO1NBQ3ZEO2FBQU07WUFDTCxHQUFHLENBQUMsSUFBSSx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SB7XG4gICAgICAgIGFyci5wdXNoKFtuYW1lLCB0b2tlbk9yUHJvdmlkZXJdIGFzIFtzdHJpbmcsIHN0cmluZ10pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgYXJyLnB1c2godG9rZW5PclByb3ZpZGVyKCkudGhlbigodG9rZW4pID0+IFtuYW1lLCB0b2tlbl0gYXMgW3N0cmluZywgc3RyaW5nXSkpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGFycjtcbiAgICB9LCBbXSBhcyBBcnJheTxQcm9taXNlPFtzdHJpbmcsIHN0cmluZ10+PilcbiAgKS50aGVuKChyZXNvbHZlZFBhaXJzKSA9PlxuICAgIHJlc29sdmVkUGFpcnMucmVkdWNlKChsb2dpbnM6IFJlc29sdmVkTG9naW5zLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgIGxvZ2luc1trZXldID0gdmFsdWU7XG4gICAgICByZXR1cm4gbG9naW5zO1xuICAgIH0sIHt9IGFzIFJlc29sdmVkTG9naW5zKVxuICApO1xufVxuIl19","/*! *****************************************************************************\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 Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(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 return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(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\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(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\nexport function __generator(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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 (_) 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\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(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\nexport function __read(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\nexport function __spread() {\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\nexport function __spreadArrays() {\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\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __asyncDelegator(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: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(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\nexport function __makeTemplateObject(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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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.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 (0, tslib_1.__awaiter)(this, void 0, void 0, function () {\n return (0, tslib_1.__generator)(this, function (_a) {\n return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())];\n });\n });\n };\n return AwsCrc32;\n}());\nexports.AwsCrc32 = AwsCrc32;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXdzX2NyYzMyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2F3c19jcmMzMi50cyJdLCJuY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ID0gbmV3IENyYzMyKCk7XG5cbiAgdXBkYXRlKHRvSGFzaDogU291cmNlRGF0YSkge1xuICAgIGlmIChpc0VtcHR5RGF0YSh0b0hhc2gpKSByZXR1cm47XG5cbiAgICB0aGlzLmNyYzMyLnVwZGF0ZShjb252ZXJ0VG9CdWZmZXIodG9IYXNoKSk7XG4gIH1cblxuICBhc3luYyBkaWdlc3QoKTogUHJvbWlzZTxVaW50OEFycmF5PiB7XG4gICAgcmV0dXJuIG51bVRvVWludDgodGhpcy5jcmMzMi5kaWdlc3QoKSk7XG4gIH1cbn1cbiJdfQ==","\"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 = (0, 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=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLHlDQUFpRDtBQUVqRCxTQUFnQixLQUFLLENBQUMsSUFBZ0I7SUFDcEMsT0FBTyxJQUFJLEtBQUssRUFBRSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUMzQyxDQUFDO0FBRkQsc0JBRUM7QUFFRDtJQUFBO1FBQ1UsYUFBUSxHQUFHLFVBQVUsQ0FBQztJQWNoQyxDQUFDO0lBWkMsc0JBQU0sR0FBTixVQUFPLElBQWdCOzs7WUFDckIsS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QXJyYXlGcm9tKGFfbG9va1VwVGFibGUpXG5leHBvcnQgeyBBd3NDcmMzMiB9IGZyb20gXCIuL2F3c19jcmMzMlwiO1xuIl19","/*! *****************************************************************************\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 Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(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 return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(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\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(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\nexport function __generator(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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 (_) 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\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(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\nexport function __read(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\nexport function __spread() {\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\nexport function __spreadArrays() {\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\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __asyncDelegator(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: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(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\nexport function __makeTemplateObject(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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { toHex } from \"@aws-sdk/util-hex-encoding\";\n/**\n * A lossless representation of a signed, 64-bit integer. Instances of this\n * class may be used in arithmetic expressions as if they were numeric\n * primitives, but the binary representation will be preserved unchanged as the\n * `bytes` property of the object. The bytes should be encoded as big-endian,\n * two's complement integers.\n */\nvar Int64 = /** @class */ (function () {\n function Int64(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n Int64.fromNumber = function (number) {\n if (number > 9223372036854775807 || number < -9223372036854775808) {\n throw new Error(number + \" is too large (or, if negative, too small) to represent as an Int64\");\n }\n var bytes = new Uint8Array(8);\n for (var 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 /**\n * Called implicitly by infix arithmetic operators.\n */\n Int64.prototype.valueOf = function () {\n var bytes = this.bytes.slice(0);\n var negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n };\n Int64.prototype.toString = function () {\n return String(this.valueOf());\n };\n return Int64;\n}());\nexport { Int64 };\nfunction negate(bytes) {\n for (var i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (var i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW50NjQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvSW50NjQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBSW5EOzs7Ozs7R0FNRztBQUNIO0lBQ0UsZUFBcUIsS0FBaUI7UUFBakIsVUFBSyxHQUFMLEtBQUssQ0FBWTtRQUNwQyxJQUFJLEt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ldCBpID0gNywgcmVtYWluaW5nID0gTWF0aC5hYnMoTWF0aC5yb3VuZChudW1iZXIpKTsgaSA+IC0xICYmIHJlbWFpbmluZyA+IDA7IGktLSwgcmVtYWluaW5nIC89IDI1Nikge1xuICAgICAgYnl0ZXNbaV0gPSByZW1haW5pbmc7XG4gICAgfVxuXG4gICAgaWYgKG51bWJlciA8IDApIHtcbiAgICAgIG5lZ2F0ZShieXRlcyk7XG4gICAgfVxuXG4gICAgcmV0dXJuIG5ldyBJbnQ2NChieXRlcyk7XG4gIH1cblxuICAvKipcbiAgICogQ2FsbGVkIGltcGxpY2l0bHkgYnkgaW5maXggYXJpdGhtZXRpYyBvcGVyYXRvcnMuXG4gICAqL1xuICB2YWx1ZU9mKCk6IG51bWJlciB7XG4gICAgY29uc3QgYnl0ZXMgPSB0aGlzLmJ5dGVzLnNsaWNlKDApO1xuICAgIGNvbnN0IG5lZ2F0aXZlID0gYnl0ZXNbMF0gJiAwYjEwMDAwMDAwO1xuICAgIGlmIChuZWdhdGl2ZSkge1xuICAgICAgbmVnYXRlKGJ5dGVzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcGFyc2VJbnQodG9IZXgoYnl0ZXMpLCAxNikgKiAobmVnYXRpdmUgPyAtMSA6IDEpO1xuICB9XG5cbiAgdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIFN0cmluZyh0aGlzLnZhbHVlT2YoKSk7XG4gIH1cbn1cblxuZnVuY3Rpb24gbmVnYXRlKGJ5dGVzOiBVaW50OEFycmF5KTogdm9pZCB7XG4gIGZvciAobGV0IGkgPSAwOyBpIDwgODsgaSsrKSB7XG4gICAgYnl0ZXNbaV0gXj0gMHhmZjtcbiAgfVxuXG4gIGZvciAobGV0IGkgPSA3OyBpID4gLTE7IGktLSkge1xuICAgIGJ5dGVzW2ldKys7XG4gICAgaWYgKGJ5dGVzW2ldICE9PSAwKSBicmVhaztcbiAgfVxufVxuIl19","import { __values } from \"tslib\";\nimport { fromHex, toHex } from \"@aws-sdk/util-hex-encoding\";\nimport { Int64 } from \"./Int64\";\n/**\n * @internal\n */\nvar HeaderMarshaller = /** @class */ (function () {\n function HeaderMarshaller(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n HeaderMarshaller.prototype.format = function (headers) {\n var e_1, _a, e_2, _b;\n var chunks = [];\n try {\n for (var _c = __values(Object.keys(headers)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var headerName = _d.value;\n var bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var out = new Uint8Array(chunks.reduce(function (carry, bytes) { return carry + bytes.byteLength; }, 0));\n var position = 0;\n try {\n for (var chunks_1 = __values(chunks), chunks_1_1 = chunks_1.next(); !chunks_1_1.done; chunks_1_1 = chunks_1.next()) {\n var chunk = chunks_1_1.value;\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (chunks_1_1 && !chunks_1_1.done && (_b = chunks_1.return)) _b.call(chunks_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return out;\n };\n HeaderMarshaller.prototype.formatHeaderValue = function (header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]);\n case \"byte\":\n return Uint8Array.from([2 /* byte */, header.value]);\n case \"short\":\n var shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3 /* short */);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n var intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4 /* integer */);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n var longBytes = new Uint8Array(9);\n longBytes[0] = 5 /* long */;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n var binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6 /* byteArray */);\n binView.setUint16(1, header.value.byteLength, false);\n var binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n var utf8Bytes = this.fromUtf8(header.value);\n var strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7 /* string */);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n var strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n var tsBytes = new Uint8Array(9);\n tsBytes[0] = 8 /* timestamp */;\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 var uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9 /* uuid */;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n };\n HeaderMarshaller.prototype.parse = function (headers) {\n var out = {};\n var position = 0;\n while (position < headers.byteLength) {\n var nameLength = headers.getUint8(position++);\n var name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0 /* boolTrue */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1 /* boolFalse */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2 /* byte */:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3 /* short */:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4 /* integer */:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5 /* long */:\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 /* byteArray */:\n var 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 /* string */:\n var 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 /* timestamp */:\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 /* uuid */:\n var uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: toHex(uuidBytes.subarray(0, 4)) + \"-\" + toHex(uuidBytes.subarray(4, 6)) + \"-\" + toHex(uuidBytes.subarray(6, 8)) + \"-\" + toHex(uuidBytes.subarray(8, 10)) + \"-\" + toHex(uuidBytes.subarray(10)),\n };\n break;\n default:\n throw new Error(\"Unrecognized header type tag\");\n }\n }\n return out;\n };\n return HeaderMarshaller;\n}());\nexport { HeaderMarshaller };\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 = {}));\nvar BOOLEAN_TAG = \"boolean\";\nvar BYTE_TAG = \"byte\";\nvar SHORT_TAG = \"short\";\nvar INT_TAG = \"integer\";\nvar LONG_TAG = \"long\";\nvar BINARY_TAG = \"binary\";\nvar STRING_TAG = \"string\";\nvar TIMESTAMP_TAG = \"timestamp\";\nvar UUID_TAG = \"uuid\";\nvar UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSGVhZGVyTWFyc2hhbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9IZWFkZXJNYXJzaGFsbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxPQUFPLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBRTVELE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFFaEM7O0dBRUc7QUFDSDtJQUNFLDBCQUE2QixNQUFlLEVBQW1CLFFBQWlCO1FBQW5ELFdBQU0sR0FBTixNQUFNLENBQVM7UUFBbUIsYUFBUSxHQUFSLFFBQVEsQ0FBUztJQUFHLENBQUM7SUFFcEY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vbEZhbHNlOlxuICAgICAgICAgIG91dFtuYW1lXSA9IHtcbiAgICAgICAgICAgIHR5cGU6IEJPT0xFQU5fVEFHLFxuICAgICAgICAgICAgdmFsdWU6IGZhbHNlLFxuICAgICAgICAgIH07XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgSEVBREVSX1ZBTFVFX1RZUEUuYnl0ZTpcbiAgICAgICAgICBvdXRbbmFtZV0gPSB7XG4gICAgICAgICAgICB0eXBlOiBCWVRFX1RBRyxcbiAgICAgICAgICAgIHZhbHVlOiBoZWFkZXJzLmdldEludDgocG9zaXRpb24rKyksXG4gICAgICAgICAgfTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBIRUFERVJfVkFMVUVfVFlQRS5zaG9ydDpcbiAgICAgICAgICBvdXRbbmFtZV0gPSB7XG4gICAgICAgICAgICB0eXBlOiBTSE9SVF9UQUcsXG4gICAgICAgICAgICB2YWx1ZTogaGVhZGVycy5nZXRJbnQxNihwb3NpdGlvbiwgZmFsc2UpLFxuICAgICAgICAgIH07XG4gICAgICAgICAgcG9zaXRpb24gKz0gMjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBIRUFERVJfVkFMVUVfVFlQRS5pbnRlZ2VyOlxuICAgICAgICAgIG91dFtuYW1lXSA9IHtcbiAgICAgICAgICAgIHR5cGU6IElOVF9UQUcsXG4gICAgICAgICAgICB2YWx1ZTogaGVhZGVycy5nZXRJbnQzMihwb3NpdGlvbiwgZmFsc2UpLFxuICAgICAgICAgIH07XG4gICAgICAgICAgcG9zaXRpb24gKz0gNDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBIRUFERVJfVkFMVUVfVFlQRS5sb25nOlxuICAgICAgICAgIG91dFtuYW1lXSA9IHtcbiAgICAgICAgICAgIHR5cGU6IExPTkdfVEFHLFxuICAgICAgICAgICAgdmFsdWU6IG5ldyBJbnQ2NChuZXcgVWludDhBcnJheShoZWFkZXJzLmJ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9XG4gICAgfVxuXG4gICAgcmV0dXJuIG91dDtcbiAgfVxufVxuXG5jb25zdCBlbnVtIEhFQURFUl9WQUxVRV9UWVBFIHtcbiAgYm9vbFRydWUgPSAwLFxuICBib29sRmFsc2UsXG4gIGJ5dGUsXG4gIHNob3J0LFxuICBpbnRlZ2VyLFxuICBsb25nLFxuICBieXRlQXJyYXksXG4gIHN0cmluZyxcbiAgdGltZXN0YW1wLFxuICB1dWlkLFxufVxuXG5jb25zdCBCT09MRUFOX1RBRyA9IFwiYm9vbGVhblwiO1xuY29uc3QgQllURV9UQUcgPSBcImJ5dGVcIjtcbmNvbnN0IFNIT1JUX1RBRyA9IFwic2hvcnRcIjtcbmNvbnN0IElOVF9UQUcgPSBcImludGVnZXJcIjtcbmNvbnN0IExPTkdfVEFHID0gXCJsb25nXCI7XG5jb25zdCBCSU5BUllfVEFHID0gXCJiaW5hcnlcIjtcbmNvbnN0IFNUUklOR19UQUcgPSBcInN0cmluZ1wiO1xuY29uc3QgVElNRVNUQU1QX1RBRyA9IFwidGltZXN0YW1wXCI7XG5jb25zdCBVVUlEX1RBRyA9IFwidXVpZFwiO1xuXG5jb25zdCBVVUlEX1BBVFRFUk4gPSAvXlthLWYwLTldezh9LVthLWYwLTldezR9LVthLWYwLTldezR9LVthLWYwLTldezR9LVthLWYwLTldezEyfSQvO1xuIl19","import { Crc32 } from \"@aws-crypto/crc32\";\n// All prelude components are unsigned, 32-bit integers\nvar PRELUDE_MEMBER_LENGTH = 4;\n// The prelude consists of two components\nvar PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\n// Checksums are always CRC32 hashes.\nvar CHECKSUM_LENGTH = 4;\n// Messages must include a full prelude, a prelude checksum, and a message checksum\nvar MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\n/**\n * @internal\n */\nexport function splitMessage(_a) {\n var byteLength = _a.byteLength, byteOffset = _a.byteOffset, buffer = _a.buffer;\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n var view = new DataView(buffer, byteOffset, byteLength);\n var messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n var headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n var expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n var expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n var checksummer = new 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//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BsaXRNZXNzYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NwbGl0TWVzc2FnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFMUMsdURBQXVEO0FBQ3ZELElBQU0scUJBQXFCLEdBQUcsQ0FBQyxDQUFDO0FBQ2hDLHlDQUF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bSAoJHtjaGVja3N1bW1lci5kaWdlc3QoKX0pYFxuICAgICk7XG4gIH1cblxuICBjaGVja3N1bW1lci51cGRhdGUoXG4gICAgbmV3IFVpbnQ4QXJyYXkoYnVmZmVyLCBieXRlT2Zmc2V0ICsgUFJFTFVERV9MRU5HVEgsIGJ5dGVMZW5ndGggLSAoUFJFTFVERV9MRU5HVEggKyBDSEVDS1NVTV9MRU5HVEgpKVxuICApO1xuICBpZiAoZXhwZWN0ZWRNZXNzYWdlQ2hlY2tzdW0gIT09IGNoZWNrc3VtbWVyLmRpZ2VzdCgpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgYFRoZSBtZXNzYWdlIGNoZWNrc3VtICgke2NoZWNrc3VtbWVyLmRpZ2VzdCgpfSkgZGlkIG5vdCBtYXRjaCB0aGUgZXhwZWN0ZWQgdmFsdWUgb2YgJHtleHBlY3RlZE1lc3NhZ2VDaGVja3N1bX1gXG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiB7XG4gICAgaGVhZGVyczogbmV3IERhdGFWaWV3KGJ1ZmZlciwgYnl0ZU9mZnNldCArIFBSRUxVREVfTEVOR1RIICsgQ0hFQ0tTVU1fTEVOR1RILCBoZWFkZXJMZW5ndGgpLFxuICAgIGJvZHk6IG5ldyBVaW50OEFycmF5KFxuICAgICAgYnVmZmVyLFxuICAgICAgYnl0ZU9mZnNldCArIFBSRUxVREVfTEVOR1RIICsgQ0hFQ0tTVU1fTEVOR1RIICsgaGVhZGVyTGVuZ3RoLFxuICAgICAgbWVzc2FnZUxlbmd0aCAtIGhlYWRlckxlbmd0aCAtIChQUkVMVURFX0xFTkdUSCArIENIRUNLU1VNX0xFTkdUSCArIENIRUNLU1VNX0xFTkdUSClcbiAgICApLFxuICB9O1xufVxuIl19","import { Crc32 } from \"@aws-crypto/crc32\";\nimport { HeaderMarshaller } from \"./HeaderMarshaller\";\nimport { splitMessage } from \"./splitMessage\";\n/**\n * A marshaller that can convert binary-packed event stream messages into\n * JavaScript objects and back again into their binary format.\n */\nvar EventStreamMarshaller = /** @class */ (function () {\n function EventStreamMarshaller(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n }\n /**\n * Convert a structured JavaScript object with tagged headers into a binary\n * event stream message.\n */\n EventStreamMarshaller.prototype.marshall = function (_a) {\n var rawHeaders = _a.headers, body = _a.body;\n var headers = this.headerMarshaller.format(rawHeaders);\n var length = headers.byteLength + body.byteLength + 16;\n var out = new Uint8Array(length);\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n var checksum = new Crc32();\n // Format message\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 // Write trailing message checksum\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n };\n /**\n * Convert a binary event stream message into a JavaScript object with an\n * opaque, binary body and tagged, parsed headers.\n */\n EventStreamMarshaller.prototype.unmarshall = function (message) {\n var _a = splitMessage(message), headers = _a.headers, body = _a.body;\n return { headers: this.headerMarshaller.parse(headers), body: body };\n };\n /**\n * Convert a structured JavaScript object with tagged headers into a binary\n * event stream message header.\n */\n EventStreamMarshaller.prototype.formatHeaders = function (rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n };\n return EventStreamMarshaller;\n}());\nexport { EventStreamMarshaller };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnRTdHJlYW1NYXJzaGFsbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0V2ZW50U3RyZWFtTWFyc2hhbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFJMUMsT0FBTyxFQUFFLG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YVNjcmlwdCBvYmplY3Qgd2l0aCBhblxuICAgKiBvcGFxdWUsIGJpbmFyeSBib2R5IGFuZCB0YWdnZWQsIHBhcnNlZCBoZWFkZXJzLlxuICAgKi9cbiAgdW5tYXJzaGFsbChtZXNzYWdlOiBBcnJheUJ1ZmZlclZpZXcpOiBNZXNzYWdlIHtcbiAgICBjb25zdCB7IGhlYWRlcnMsIGJvZHkgfSA9IHNwbGl0TWVzc2FnZShtZXNzYWdlKTtcblxuICAgIHJldHVybiB7IGhlYWRlcnM6IHRoaXMuaGVhZGVyTWFyc2hhbGxlci5wYXJzZShoZWFkZXJzKSwgYm9keSB9O1xuICB9XG5cbiAgLyoqXG4gICAqIENvbnZlcnQgYSBzdHJ1Y3R1cmVkIEphdmFTY3JpcHQgb2JqZWN0IHdpdGggdGFnZ2VkIGhlYWRlcnMgaW50byBhIGJpbmFyeVxuICAgKiBldmVudCBzdHJlYW0gbWVzc2FnZSBoZWFkZXIuXG4gICAqL1xuICBmb3JtYXRIZWFkZXJzKHJhd0hlYWRlcnM6IE1lc3NhZ2VIZWFkZXJzKTogVWludDhBcnJheSB7XG4gICAgcmV0dXJuIHRoaXMuaGVhZGVyTWFyc2hhbGxlci5mb3JtYXQocmF3SGVhZGVycyk7XG4gIH1cbn1cbiJdfQ==","/*! *****************************************************************************\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 Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(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 return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(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\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(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\nexport function __generator(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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 (_) 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\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(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\nexport function __read(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\nexport function __spread() {\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\nexport function __spreadArrays() {\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\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __asyncDelegator(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: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(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\nexport function __makeTemplateObject(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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { __asyncGenerator, __await, __generator } from \"tslib\";\nexport function getChunkedStream(source) {\n var _a;\n var currentMessageTotalLength = 0;\n var currentMessagePendingLength = 0;\n var currentMessage = null;\n var messageLengthBuffer = null;\n var allocateMessage = function (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 var currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false); //set big-endian Uint32 to 0~3 bytes\n };\n var iterator = function () {\n return __asyncGenerator(this, arguments, function () {\n var sourceIterator, _a, value, done, chunkLength, currentOffset, bytesRemaining, numBytesForTotal, numBytesToWrite;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n sourceIterator = source[Symbol.asyncIterator]();\n _b.label = 1;\n case 1:\n if (!true) return [3 /*break*/, 16];\n return [4 /*yield*/, __await(sourceIterator.next())];\n case 2:\n _a = _b.sent(), value = _a.value, done = _a.done;\n if (!done) return [3 /*break*/, 10];\n if (!!currentMessageTotalLength) return [3 /*break*/, 4];\n return [4 /*yield*/, __await(void 0)];\n case 3: return [2 /*return*/, _b.sent()];\n case 4:\n if (!(currentMessageTotalLength === currentMessagePendingLength)) return [3 /*break*/, 7];\n return [4 /*yield*/, __await(currentMessage)];\n case 5: return [4 /*yield*/, _b.sent()];\n case 6:\n _b.sent();\n return [3 /*break*/, 8];\n case 7: throw new Error(\"Truncated event message received.\");\n case 8: return [4 /*yield*/, __await(void 0)];\n case 9: return [2 /*return*/, _b.sent()];\n case 10:\n chunkLength = value.length;\n currentOffset = 0;\n _b.label = 11;\n case 11:\n if (!(currentOffset < chunkLength)) return [3 /*break*/, 15];\n // create new message if necessary\n if (!currentMessage) {\n bytesRemaining = chunkLength - currentOffset;\n // prevent edge case where total length spans 2 chunks\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n numBytesForTotal = Math.min(4 - currentMessagePendingLength, // remaining bytes to fill the messageLengthBuffer\n bytesRemaining // bytes left in chunk\n );\n messageLengthBuffer.set(\n // @ts-ignore error TS2532: Object is possibly 'undefined' for value\n value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n // not enough information to create the current message\n return [3 /*break*/, 15];\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, // number of bytes left to complete message\n chunkLength - currentOffset // number of bytes left in the original chunk\n );\n currentMessage.set(\n // @ts-ignore error TS2532: Object is possibly 'undefined' for value\n value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (!(currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength)) return [3 /*break*/, 14];\n return [4 /*yield*/, __await(currentMessage)];\n case 12: \n // push out the message\n return [4 /*yield*/, _b.sent()];\n case 13:\n // push out the message\n _b.sent();\n // cleanup\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n _b.label = 14;\n case 14: return [3 /*break*/, 11];\n case 15: return [3 /*break*/, 1];\n case 16: return [2 /*return*/];\n }\n });\n });\n };\n return _a = {},\n _a[Symbol.asyncIterator] = iterator,\n _a;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0Q2h1bmtlZFN0cmVhbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZXRDaHVua2VkU3RyZWFtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxNQUFNLFVBQVUsZ0JBQWdCLENBQUMsTUFBaUM7O0lBQ2hFLElBQUkseUJBQXlCLEdBQUcsQ0FBQyxDQUFDO0lBQ2xDLElBQUksMkJBQTJCLEdBQUcsQ0FBQyxDQUFDO0lBQ3BDLElBQUksY0FBYyxHQUFzQixJQUFJLENBQUM7SUFDN0MsSUFBSSxtQkFBbUIsR0FBc0IsSUFBSSxDQUFDO0lBQ2xELElBQU0sZUFBZSxHQUFHLFVBQUMsSUFBWTtRQUNuQyxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtZQUM1QixNQUFNLElBQUksS0FBSyxDQUFDLHNFQUFzRSxHQUFHLElBQUksQ0FBQyxDQUFDO1NBQ2hHO1FBQ0QseUJBQXlCLEdBQUcsSUFBSSxDQUFDO1FBQ2pDLDJCQUEyQixHQUFHLENBQUMsQ0FBQztRQUNoQyxjQUFjLEdBQUcsSUFBSSxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDdEMsSUFBTSxrQkFBa0IsR0FBRy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XG4iXX0=","import { __asyncGenerator, __asyncValues, __await, __generator } from \"tslib\";\nexport function getUnmarshalledStream(source, options) {\n var _a;\n return _a = {},\n _a[Symbol.asyncIterator] = function () {\n return __asyncGenerator(this, arguments, function () {\n var source_1, source_1_1, chunk, message, messageType, unmodeledError, code, exception, deserializedException, error, event, deserialized, e_1_1;\n var _a, _b;\n var e_1, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n _d.trys.push([0, 12, 13, 18]);\n source_1 = __asyncValues(source);\n _d.label = 1;\n case 1: return [4 /*yield*/, __await(source_1.next())];\n case 2:\n if (!(source_1_1 = _d.sent(), !source_1_1.done)) return [3 /*break*/, 11];\n chunk = source_1_1.value;\n message = options.eventMarshaller.unmarshall(chunk);\n messageType = message.headers[\":message-type\"].value;\n if (!(messageType === \"error\")) return [3 /*break*/, 3];\n unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n case 3:\n if (!(messageType === \"exception\")) return [3 /*break*/, 5];\n code = message.headers[\":exception-type\"].value;\n exception = (_a = {}, _a[code] = message, _a);\n return [4 /*yield*/, __await(options.deserializer(exception))];\n case 4:\n deserializedException = _d.sent();\n if (deserializedException.$unknown) {\n error = new Error(options.toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n case 5:\n if (!(messageType === \"event\")) return [3 /*break*/, 9];\n event = (_b = {},\n _b[message.headers[\":event-type\"].value] = message,\n _b);\n return [4 /*yield*/, __await(options.deserializer(event))];\n case 6:\n deserialized = _d.sent();\n if (deserialized.$unknown)\n return [3 /*break*/, 10];\n return [4 /*yield*/, __await(deserialized)];\n case 7: return [4 /*yield*/, _d.sent()];\n case 8:\n _d.sent();\n return [3 /*break*/, 10];\n case 9: throw Error(\"Unrecognizable event type: \" + message.headers[\":event-type\"].value);\n case 10: return [3 /*break*/, 1];\n case 11: return [3 /*break*/, 18];\n case 12:\n e_1_1 = _d.sent();\n e_1 = { error: e_1_1 };\n return [3 /*break*/, 18];\n case 13:\n _d.trys.push([13, , 16, 17]);\n if (!(source_1_1 && !source_1_1.done && (_c = source_1.return))) return [3 /*break*/, 15];\n return [4 /*yield*/, __await(_c.call(source_1))];\n case 14:\n _d.sent();\n _d.label = 15;\n case 15: return [3 /*break*/, 17];\n case 16:\n if (e_1) throw e_1.error;\n return [7 /*endfinally*/];\n case 17: return [7 /*endfinally*/];\n case 18: return [2 /*return*/];\n }\n });\n });\n },\n _a;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VW5tYXJzaGFsbGVkU3RyZWFtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2dldFVubWFyc2hhbGxlZFN0cmVhbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBU0EsTUFBTSxVQUFVLHFCQUFxQixDQUNuQyxNQUFpQyxFQUNqQyxPQUFxQzs7SUFFckM7UUFDRSxHQUFDLE1BQU0sQ0FBQyxhQUFhLElBQUc7Ozs7Ozs7Ozs0QkFDSSxXQUFBLGNBQUEsTUFBTSxDQUFBOzs7Ozs0QkFBZixLQUFLLG1CQUFBLENBQUE7NEJBQ2QsT0FBTyxHQUFHLE9BQU8sQ0FBQyxlQUFlLENBQUMsVUFBVSxDQUFDLEtBQUssQ0FBQyxDQUFDOzRCQUMzQyxXQUFXLEdBQUssT0FBTyxDQUFDLE9BQU8sQ0FBQyxlQUFlLENBQUMsTUFBckMsQ0FBc0M7aUNBQzVELENBQUEsV0FBVyxLQUFLLE9BQU8sQ0FBQSxFQUF2Qix3QkFBdUI7NEJBRW5CLGNBQWMsR0FBRyxJQUFJLEtBQUssQ0FBRSxPQUFPLENBQUMsT0FBTyxDQUFDLGdCQUFnQixDQUFDLENBQUMsS0FBZ0IsSUFBSSxjQUFjLENBQUMsQ0FBQzs0QkFDeEcsY0FBYyxDQUFDLElBQU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IH0sXG4gIH07XG59XG4iXX0=","import { __asyncGenerator, __asyncValues, __await, __generator } from \"tslib\";\nimport { EventStreamMarshaller as EventMarshaller } from \"@aws-sdk/eventstream-marshaller\";\nimport { getChunkedStream } from \"./getChunkedStream\";\nimport { getUnmarshalledStream } from \"./getUnmarshalledStream\";\nvar EventStreamMarshaller = /** @class */ (function () {\n function EventStreamMarshaller(_a) {\n var utf8Encoder = _a.utf8Encoder, utf8Decoder = _a.utf8Decoder;\n this.eventMarshaller = new EventMarshaller(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n EventStreamMarshaller.prototype.deserialize = function (body, deserializer) {\n var chunkedStream = getChunkedStream(body);\n var unmarshalledStream = getUnmarshalledStream(chunkedStream, {\n eventMarshaller: this.eventMarshaller,\n deserializer: deserializer,\n toUtf8: this.utfEncoder,\n });\n return unmarshalledStream;\n };\n EventStreamMarshaller.prototype.serialize = function (input, serializer) {\n var _a;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var self = this;\n var serializedIterator = function () {\n return __asyncGenerator(this, arguments, function () {\n var input_1, input_1_1, chunk, payloadBuf, e_1_1;\n var e_1, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 7, 8, 13]);\n input_1 = __asyncValues(input);\n _b.label = 1;\n case 1: return [4 /*yield*/, __await(input_1.next())];\n case 2:\n if (!(input_1_1 = _b.sent(), !input_1_1.done)) return [3 /*break*/, 6];\n chunk = input_1_1.value;\n payloadBuf = self.eventMarshaller.marshall(serializer(chunk));\n return [4 /*yield*/, __await(payloadBuf)];\n case 3: return [4 /*yield*/, _b.sent()];\n case 4:\n _b.sent();\n _b.label = 5;\n case 5: return [3 /*break*/, 1];\n case 6: return [3 /*break*/, 13];\n case 7:\n e_1_1 = _b.sent();\n e_1 = { error: e_1_1 };\n return [3 /*break*/, 13];\n case 8:\n _b.trys.push([8, , 11, 12]);\n if (!(input_1_1 && !input_1_1.done && (_a = input_1.return))) return [3 /*break*/, 10];\n return [4 /*yield*/, __await(_a.call(input_1))];\n case 9:\n _b.sent();\n _b.label = 10;\n case 10: return [3 /*break*/, 12];\n case 11:\n if (e_1) throw e_1.error;\n return [7 /*endfinally*/];\n case 12: return [7 /*endfinally*/];\n case 13: return [4 /*yield*/, __await(new Uint8Array(0))];\n case 14: \n // Ending frame\n return [4 /*yield*/, _b.sent()];\n case 15:\n // Ending frame\n _b.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n return _a = {},\n _a[Symbol.asyncIterator] = serializedIterator,\n _a;\n };\n return EventStreamMarshaller;\n}());\nexport { EventStreamMarshaller };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnRTdHJlYW1NYXJzaGFsbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0V2ZW50U3RyZWFtTWFyc2hhbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLHFCQUFxQixJQUFJLGVBQWUsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRzNGLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ3RELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBU2hFO0lBR0UsK0JBQVksRUFBMEQ7WUFBeEQsV0FBVyxpQkFBQSxFQUFFLFdBQVcsaUJBQUE7UUFDcEMsSUFBSSxDQUFDLGVBQWUsR0FBRyxJQUFJLGVBQWUsQ0FBQyxXQUFXLEVBQUUsV0FBVyxDQUFDLENBQUM7UUFDckUsSUFBSSxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7SUFDaEMsQ0FBQztJQUVELDJDQUFXLEdBQVgsVUFDRSxJQUErQixFQUMvQixZQUFpRTtRQUVqRSxJQUFNLGFBQWEsR0FBRyxnQkFBZ0IsQ0FBQ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ZyBmcmFtZVxuICAgICAgeWllbGQgbmV3IFVpbnQ4QXJyYXkoMCk7XG4gICAgfTtcbiAgICByZXR1cm4ge1xuICAgICAgW1N5bWJvbC5hc3luY0l0ZXJhdG9yXTogc2VyaWFsaXplZEl0ZXJhdG9yLFxuICAgIH07XG4gIH1cbn1cbiJdfQ==","/*! *****************************************************************************\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 Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(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 return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(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\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(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\nexport function __generator(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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 (_) 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\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(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\nexport function __read(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\nexport function __spread() {\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\nexport function __spreadArrays() {\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\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __asyncDelegator(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: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(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\nexport function __makeTemplateObject(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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { __asyncGenerator, __await, __awaiter, __generator } from \"tslib\";\n/**\n * A util function converting ReadableStream into an async iterable.\n * Reference: https://jakearchibald.com/2017/async-iterators-and-generators/#making-streams-iterate\n */\nexport var readableStreamtoIterable = function (readableStream) {\n var _a;\n return (_a = {},\n _a[Symbol.asyncIterator] = function () {\n return __asyncGenerator(this, arguments, function () {\n var reader, _a, done, value;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n reader = readableStream.getReader();\n _b.label = 1;\n case 1:\n _b.trys.push([1, , 9, 10]);\n _b.label = 2;\n case 2:\n if (!true) return [3 /*break*/, 8];\n return [4 /*yield*/, __await(reader.read())];\n case 3:\n _a = _b.sent(), done = _a.done, value = _a.value;\n if (!done) return [3 /*break*/, 5];\n return [4 /*yield*/, __await(void 0)];\n case 4: return [2 /*return*/, _b.sent()];\n case 5: return [4 /*yield*/, __await(value)];\n case 6: return [4 /*yield*/, _b.sent()];\n case 7:\n _b.sent();\n return [3 /*break*/, 2];\n case 8: return [3 /*break*/, 10];\n case 9:\n reader.releaseLock();\n return [7 /*endfinally*/];\n case 10: return [2 /*return*/];\n }\n });\n });\n },\n _a);\n};\n/**\n * A util function converting async iterable to a ReadableStream.\n */\nexport var iterableToReadableStream = function (asyncIterable) {\n var iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n pull: function (controller) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, done, value;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, iterator.next()];\n case 1:\n _a = _b.sent(), done = _a.done, value = _a.value;\n if (done) {\n return [2 /*return*/, controller.close()];\n }\n controller.enqueue(value);\n return [2 /*return*/];\n }\n });\n });\n },\n });\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cm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ihhc3luY0l0ZXJhYmxlOiBBc3luY0l0ZXJhYmxlPFQ+KTogUmVhZGFibGVTdHJlYW08VD4gPT4ge1xuICBjb25zdCBpdGVyYXRvciA9IGFzeW5jSXRlcmFibGVbU3ltYm9sLmFzeW5jSXRlcmF0b3JdKCk7XG4gIHJldHVybiBuZXcgUmVhZGFibGVTdHJlYW0oe1xuICAgIGFzeW5jIHB1bGwoY29udHJvbGxlcikge1xuICAgICAgY29uc3QgeyBkb25lLCB2YWx1ZSB9ID0gYXdhaXQgaXRlcmF0b3IubmV4dCgpO1xuICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgcmV0dXJuIGNvbnRyb2xsZXIuY2xvc2UoKTtcbiAgICAgIH1cbiAgICAgIGNvbnRyb2xsZXIuZW5xdWV1ZSh2YWx1ZSk7XG4gICAgfSxcbiAgfSk7XG59O1xuIl19","import { EventStreamMarshaller as EventMarshaller } from \"@aws-sdk/eventstream-marshaller\";\nimport { EventStreamMarshaller as UniversalEventStreamMarshaller } from \"@aws-sdk/eventstream-serde-universal\";\nimport { iterableToReadableStream, readableStreamtoIterable } from \"./utils\";\n/**\n * Utility class used to serialize and deserialize event streams in\n * browsers and ReactNative.\n *\n * In browsers where ReadableStream API is available:\n * * deserialize from ReadableStream to an async iterable of output structure\n * * serialize from async iterable of input structure to ReadableStream\n * In ReactNative where only async iterable API is available:\n * * deserialize from async iterable of binaries to async iterable of output structure\n * * serialize from async iterable of input structure to async iterable of binaries\n *\n * We use ReadableStream API in browsers because of the consistency with other\n * streaming operations, where ReadableStream API is used to denote streaming data.\n * Whereas in ReactNative, ReadableStream API is not available, we use async iterable\n * for streaming data although it has lower throughput.\n */\nvar EventStreamMarshaller = /** @class */ (function () {\n function EventStreamMarshaller(_a) {\n var utf8Encoder = _a.utf8Encoder, utf8Decoder = _a.utf8Decoder;\n this.eventMarshaller = new EventMarshaller(utf8Encoder, utf8Decoder);\n this.universalMarshaller = new UniversalEventStreamMarshaller({\n utf8Decoder: utf8Decoder,\n utf8Encoder: utf8Encoder,\n });\n }\n EventStreamMarshaller.prototype.deserialize = function (body, deserializer) {\n var bodyIterable = isReadableStream(body) ? readableStreamtoIterable(body) : body;\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n };\n /**\n * Generate a stream that serialize events into stream of binary chunks;\n *\n * Caveat is that streaming request payload doesn't work on browser with native\n * xhr or fetch handler currently because they don't support upload streaming.\n * reference:\n * * https://bugs.chromium.org/p/chromium/issues/detail?id=688906\n * * https://bugzilla.mozilla.org/show_bug.cgi?id=1387483\n *\n */\n EventStreamMarshaller.prototype.serialize = function (input, serializer) {\n var serialziedIterable = this.universalMarshaller.serialize(input, serializer);\n return typeof ReadableStream === \"function\" ? iterableToReadableStream(serialziedIterable) : serialziedIterable;\n };\n return EventStreamMarshaller;\n}());\nexport { EventStreamMarshaller };\nvar isReadableStream = function (body) {\n return typeof ReadableStream === \"function\" && body instanceof ReadableStream;\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnRTdHJlYW1NYXJzaGFsbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0V2ZW50U3RyZWFtTWFyc2hhbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUscUJBQXFCLElBQUksZUFBZSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDM0YsT0FBTyxFQUFFLHFCQUFxQixJQUFJLDhCQUE4QixFQUFFLE1BQU0sc0NBQXNDLENBQUM7QUFHL0csT0FBTyxFQUFFLHdCQUF3QixFQUFFLHdCQUF3QixFQUFFLE1BQU0sU0FBUyxDQUFDO0FBUzdFOzs7Ozs7Ozs7Ozs7Ozs7R0FlRztBQUNIO0lBR0UsK0JBQVksRUFBMEQ7WUFBeEQsV0FBVyxpQkFBQSxFQUFFLFdBQVcsaUJBQUE7UUFDcEMsSUFBSSxDQUFDLGVBQWU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Qgd29yayBvbiBicm93c2VyIHdpdGggbmF0aXZlXG4gICAqIHhociBvciBmZXRjaCBoYW5kbGVyIGN1cnJlbnRseSBiZWNhdXNlIHRoZXkgZG9uJ3Qgc3VwcG9ydCB1cGxvYWQgc3RyZWFtaW5nLlxuICAgKiByZWZlcmVuY2U6XG4gICAqICogaHR0cHM6Ly9idWdzLmNocm9taXVtLm9yZy9wL2Nocm9taXVtL2lzc3Vlcy9kZXRhaWw/aWQ9Njg4OTA2XG4gICAqICogaHR0cHM6Ly9idWd6aWxsYS5tb3ppbGxhLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTM4NzQ4M1xuICAgKlxuICAgKi9cbiAgc2VyaWFsaXplPFQ+KGlucHV0OiBBc3luY0l0ZXJhYmxlPFQ+LCBzZXJpYWxpemVyOiAoZXZlbnQ6IFQpID0+IE1lc3NhZ2UpOiBSZWFkYWJsZVN0cmVhbSB8IEFzeW5jSXRlcmFibGU8VWludDhBcnJheT4ge1xuICAgIGNvbnN0IHNlcmlhbHppZWRJdGVyYWJsZSA9IHRoaXMudW5pdmVyc2FsTWFyc2hhbGxlci5zZXJpYWxpemUoaW5wdXQsIHNlcmlhbGl6ZXIpO1xuICAgIHJldHVybiB0eXBlb2YgUmVhZGFibGVTdHJlYW0gPT09IFwiZnVuY3Rpb25cIiA/IGl0ZXJhYmxlVG9SZWFkYWJsZVN0cmVhbShzZXJpYWx6aWVkSXRlcmFibGUpIDogc2VyaWFsemllZEl0ZXJhYmxlO1xuICB9XG59XG5cbmNvbnN0IGlzUmVhZGFibGVTdHJlYW0gPSAoYm9keTogYW55KTogYm9keSBpcyBSZWFkYWJsZVN0cmVhbSA9PlxuICB0eXBlb2YgUmVhZGFibGVTdHJlYW0gPT09IFwiZnVuY3Rpb25cIiAmJiBib2R5IGluc3RhbmNlb2YgUmVhZGFibGVTdHJlYW07XG4iXX0=","import { EventStreamMarshaller } from \"./EventStreamMarshaller\";\n/** browser event stream serde utils provider */\nexport var eventStreamSerdeProvider = function (options) { return new EventStreamMarshaller(options); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmlkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJvdmlkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFaEUsZ0RBQWdEO0FBQ2hELE1BQU0sQ0FBQyxJQUFNLHdCQUF3QixHQUE2QixVQUFDLE9BSWxFLElBQUssT0FBQSxJQUFJLHFCQUFxQixDQUFDLE9BQU8sQ0FBQyxFQUFsQyxDQUFrQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGVjb2RlciwgRW5jb2RlciwgRXZlbnRTaWduZXIsIEV2ZW50U3RyZWFtU2VyZGVQcm92aWRlciwgUHJvdmlkZXIgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuaW1wb3J0IHsgRXZlbnRTdHJlYW1NYXJzaGFsbGVyIH0gZnJvbSBcIi4vRXZlbnRTdHJlYW1NYXJzaGFsbGVyXCI7XG5cbi8qKiBicm93c2VyIGV2ZW50IHN0cmVhbSBzZXJkZSB1dGlscyBwcm92aWRlciAqL1xuZXhwb3J0IGNvbnN0IGV2ZW50U3RyZWFtU2VyZGVQcm92aWRlcjogRXZlbnRTdHJlYW1TZXJkZVByb3ZpZGVyID0gKG9wdGlvbnM6IHtcbiAgdXRmOEVuY29kZXI6IEVuY29kZXI7XG4gIHV0ZjhEZWNvZGVyOiBEZWNvZGVyO1xuICBldmVudFNpZ25lcjogRXZlbnRTaWduZXIgfCBQcm92aWRlcjxFdmVudFNpZ25lcj47XG59KSA9PiBuZXcgRXZlbnRTdHJlYW1NYXJzaGFsbGVyKG9wdGlvbnMpO1xuIl19","/*! *****************************************************************************\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 Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(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 return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(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\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(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\nexport function __generator(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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 (_) 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\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(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\nexport function __read(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\nexport function __spread() {\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\nexport function __spreadArrays() {\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\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __asyncDelegator(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: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(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\nexport function __makeTemplateObject(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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { __assign } from \"tslib\";\nexport var resolveEventStreamSerdeConfig = function (input) { return (__assign(__assign({}, input), { eventStreamMarshaller: input.eventStreamSerdeProvider(input) })); };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnRTdH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LmV2ZW50U3RyZWFtU2VyZGVQcm92aWRlcihpbnB1dCksXG59KTtcbiJdfQ==","/*! *****************************************************************************\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 Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(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 return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(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\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(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\nexport function __generator(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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 (_) 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\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(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\nexport function __read(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\nexport function __spread() {\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\nexport function __spreadArrays() {\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\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __asyncDelegator(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: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(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\nexport function __makeTemplateObject(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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","export function requestTimeout(timeoutInMs) {\n if (timeoutInMs === void 0) { timeoutInMs = 0; }\n return new Promise(function (resolve, reject) {\n if (timeoutInMs) {\n setTimeout(function () {\n var timeoutError = new Error(\"Request did not complete within \" + timeoutInMs + \" ms\");\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC10aW1lb3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JlcXVlc3QtdGltZW91dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFVBQVUsY0FBYyxDQUFDLFdBQWU7SUFBZiw0QkFBQSxFQUFBLGVBQWU7SUFDNUMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxVQUFDLE9BQU8sRUFBRSxNQUFNO1FBQ2pDLElBQUksV0FBVyxFQUFFO1lBQ2YsVUFBVSxDQUFDO2dCQUNULElBQU0sWUFBWSxHQUFHLElBQUksS0FBSyxDQUFDLHFDQUFtQyxXQUFXLFFBQUssQ0FBQyxDQUFDO2dCQUNwRixZQUFZLENBQUMsSUFBSSxHQUFHLGNBQWMsQ0FBQztnQkFDbkMsTUFBTSxDQUFDLFlBQVksQ0FBQyxDQUFDO1lBQ3ZCLENBQUMsRUFBRSxXQUFXLENBQUMsQ0FBQztTQUNqQjtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiByZXF1ZXN0VGltZW91dCh0aW1lb3V0SW5NcyA9IDApOiBQcm9taXNlPG5ldmVyPiB7XG4gIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgaWYgKHRpbWVvdXRJbk1zKSB7XG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgY29uc3QgdGltZW91dEVycm9yID0gbmV3IEVycm9yKGBSZXF1ZXN0IGRpZCBub3QgY29tcGxldGUgd2l0aGluICR7dGltZW91dEluTXN9IG1zYCk7XG4gICAgICAgIHRpbWVvdXRFcnJvci5uYW1lID0gXCJUaW1lb3V0RXJyb3JcIjtcbiAgICAgICAgcmVqZWN0KHRpbWVvdXRFcnJvcik7XG4gICAgICB9LCB0aW1lb3V0SW5Ncyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==","import { __values } from \"tslib\";\nimport { HttpResponse } from \"@aws-sdk/protocol-http\";\nimport { buildQueryString } from \"@aws-sdk/querystring-builder\";\nimport { requestTimeout } from \"./request-timeout\";\nvar FetchHttpHandler = /** @class */ (function () {\n function FetchHttpHandler(_a) {\n var _b = _a === void 0 ? {} : _a, requestTimeout = _b.requestTimeout;\n this.requestTimeout = requestTimeout;\n }\n FetchHttpHandler.prototype.destroy = function () {\n // Do nothing. TLS and HTTP/2 connection pooling is handled by the browser.\n };\n FetchHttpHandler.prototype.handle = function (request, _a) {\n var _b = _a === void 0 ? {} : _a, abortSignal = _b.abortSignal;\n var requestTimeoutInMs = this.requestTimeout;\n // if the request was already aborted, prevent doing extra work\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n var abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return Promise.reject(abortError);\n }\n var path = request.path;\n if (request.query) {\n var queryString = buildQueryString(request.query);\n if (queryString) {\n path += \"?\" + queryString;\n }\n }\n var port = request.port, method = request.method;\n var url = request.protocol + \"//\" + request.hostname + (port ? \":\" + port : \"\") + path;\n // Request constructor doesn't allow GET/HEAD request with body\n // ref: https://github.com/whatwg/fetch/issues/551\n var body = method === \"GET\" || method === \"HEAD\" ? undefined : request.body;\n var requestOptions = {\n body: body,\n headers: new Headers(request.headers),\n method: method,\n };\n // some browsers support abort signal\n if (typeof AbortController !== \"undefined\") {\n requestOptions[\"signal\"] = abortSignal;\n }\n var fetchRequest = new Request(url, requestOptions);\n var raceOfPromises = [\n fetch(fetchRequest).then(function (response) {\n var e_1, _a;\n var fetchHeaders = response.headers;\n var transformedHeaders = {};\n try {\n for (var _b = __values(fetchHeaders.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var pair = _c.value;\n transformedHeaders[pair[0]] = pair[1];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var hasReadableStream = response.body !== undefined;\n // Return the response with buffered body\n if (!hasReadableStream) {\n return response.blob().then(function (body) { return ({\n response: new HttpResponse({\n headers: transformedHeaders,\n statusCode: response.status,\n body: body,\n }),\n }); });\n }\n // Return the response with streaming body\n return {\n response: new HttpResponse({\n headers: transformedHeaders,\n statusCode: response.status,\n body: response.body,\n }),\n };\n }),\n requestTimeout(requestTimeoutInMs),\n ];\n if (abortSignal) {\n raceOfPromises.push(new Promise(function (resolve, reject) {\n abortSignal.onabort = function () {\n var abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n }));\n }\n return Promise.race(raceOfPromises);\n };\n return FetchHttpHandler;\n}());\nexport { FetchHttpHandler };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2gtaHR0cC1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ZldGNoLWh0dHAtaGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUE0QixZQUFZLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUNoRixPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUdoRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFlbkQ7SUFHRSwwQkFBWSxFQUFnRDtZQUFoRCxxQkFBOEMsRUFBRSxLQUFBLEVB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U6IHJlc3BvbnNlLnN0YXR1cyxcbiAgICAgICAgICAgIGJvZHk6IHJlc3BvbnNlLmJvZHksXG4gICAgICAgICAgfSksXG4gICAgICAgIH07XG4gICAgICB9KSxcbiAgICAgIHJlcXVlc3RUaW1lb3V0KHJlcXVlc3RUaW1lb3V0SW5NcyksXG4gICAgXTtcbiAgICBpZiAoYWJvcnRTaWduYWwpIHtcbiAgICAgIHJhY2VPZlByb21pc2VzLnB1c2goXG4gICAgICAgIG5ldyBQcm9taXNlPG5ldmVyPigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgICAgYWJvcnRTaWduYWwub25hYm9ydCA9ICgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGFib3J0RXJyb3IgPSBuZXcgRXJyb3IoXCJSZXF1ZXN0IGFib3J0ZWRcIik7XG4gICAgICAgICAgICBhYm9ydEVycm9yLm5hbWUgPSBcIkFib3J0RXJyb3JcIjtcbiAgICAgICAgICAgIHJlamVjdChhYm9ydEVycm9yKTtcbiAgICAgICAgICB9O1xuICAgICAgICB9KVxuICAgICAgKTtcbiAgICB9XG4gICAgcmV0dXJuIFByb21pc2UucmFjZShyYWNlT2ZQcm9taXNlcyk7XG4gIH1cbn1cbiJdfQ==","import { __awaiter, __generator } from \"tslib\";\nimport { fromBase64 } from \"@aws-sdk/util-base64-browser\";\n//reference: https://snack.expo.io/r1JCSWRGU\nexport var streamCollector = function (stream) {\n if (typeof Blob === \"function\" && stream instanceof Blob) {\n return collectBlob(stream);\n }\n return collectStream(stream);\n};\nfunction collectBlob(blob) {\n return __awaiter(this, void 0, void 0, function () {\n var base64, arrayBuffer;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, readToBase64(blob)];\n case 1:\n base64 = _a.sent();\n arrayBuffer = fromBase64(base64);\n return [2 /*return*/, new Uint8Array(arrayBuffer)];\n }\n });\n });\n}\nfunction collectStream(stream) {\n return __awaiter(this, void 0, void 0, function () {\n var res, reader, isDone, _a, done, value, prior;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n res = new Uint8Array(0);\n reader = stream.getReader();\n isDone = false;\n _b.label = 1;\n case 1:\n if (!!isDone) return [3 /*break*/, 3];\n return [4 /*yield*/, reader.read()];\n case 2:\n _a = _b.sent(), done = _a.done, value = _a.value;\n if (value) {\n prior = res;\n res = new Uint8Array(prior.length + value.length);\n res.set(prior);\n res.set(value, prior.length);\n }\n isDone = done;\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/, res];\n }\n });\n });\n}\nfunction readToBase64(blob) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.onloadend = function () {\n var _a;\n // reference: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL\n // response from readAsDataURL is always prepended with \"data:*/*;base64,\"\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n var result = ((_a = reader.result) !== null && _a !== void 0 ? _a : \"\");\n // Response can include only 'data:' for empty blob, return empty string in this case.\n // Otherwise, return the string after ','\n var commaIndex = result.indexOf(\",\");\n var dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = function () { return reject(new Error(\"Read aborted\")); };\n reader.onerror = function () { return reject(reader.error); };\n // reader.readAsArrayBuffer is not always available\n reader.readAsDataURL(blob);\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyZWFtLWNvbGxlY3Rvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHJlYW0tY29sbGVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFMUQsNENBQTRDO0FBQzVDLE1BQU0sQ0FBQyxJQUFNLGVBQWUsR0FBb0IsVUFBQyxNQUE2QjtJQ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cbiAgICAgIGlmIChyZWFkZXIucmVhZHlTdGF0ZSAhPT0gMikge1xuICAgICAgICByZXR1cm4gcmVqZWN0KG5ldyBFcnJvcihcIlJlYWRlciBhYm9ydGVkIHRvbyBlYXJseVwiKSk7XG4gICAgICB9XG4gICAgICBjb25zdCByZXN1bHQgPSAocmVhZGVyLnJlc3VsdCA/PyBcIlwiKSBhcyBzdHJpbmc7XG4gICAgICAvLyBSZXNwb25zZSBjYW4gaW5jbHVkZSBvbmx5ICdkYXRhOicgZm9yIGVtcHR5IGJsb2IsIHJldHVybiBlbXB0eSBzdHJpbmcgaW4gdGhpcyBjYXNlLlxuICAgICAgLy8gT3RoZXJ3aXNlLCByZXR1cm4gdGhlIHN0cmluZyBhZnRlciAnLCdcbiAgICAgIGNvbnN0IGNvbW1hSW5kZXggPSByZXN1bHQuaW5kZXhPZihcIixcIik7XG4gICAgICBjb25zdCBkYXRhT2Zmc2V0ID0gY29tbWFJbmRleCA+IC0xID8gY29tbWFJbmRleCArIDEgOiByZXN1bHQubGVuZ3RoO1xuICAgICAgcmVzb2x2ZShyZXN1bHQuc3Vic3RyaW5nKGRhdGFPZmZzZXQpKTtcbiAgICB9O1xuICAgIHJlYWRlci5vbmFib3J0ID0gKCkgPT4gcmVqZWN0KG5ldyBFcnJvcihcIlJlYWQgYWJvcnRlZFwiKSk7XG4gICAgcmVhZGVyLm9uZXJyb3IgPSAoKSA9PiByZWplY3QocmVhZGVyLmVycm9yKTtcbiAgICAvLyByZWFkZXIucmVhZEFzQXJyYXlCdWZmZXIgaXMgbm90IGFsd2F5cyBhdmFpbGFibGVcbiAgICByZWFkZXIucmVhZEFzRGF0YVVSTChibG9iKTtcbiAgfSk7XG59XG4iXX0="],"names":["fromCognitoIdentity","parameters","_this","this","_a","_b","_c","AccessKeyId","Expiration","_d","SecretKey","SessionToken","_e","_f","_g","_h","_j","_k","label","client","send","bind","CustomRoleArn","customRoleArn","IdentityId","identityId","logins","sent","undefined","apply","Logins","Credentials","throwOnMissingCredentials","throwOnMissingAccessKeyId","throwOnMissingSecretKey","accessKeyId","secretAccessKey","sessionToken","expiration","STORE_NAME","IndexedDbStorage","dbName","prototype","getItem","key","withObjectStore","store","req","get","Promise","resolve","onerror","onsuccess","result","value","catch","removeItem","delete","reject","error","setItem","id","put","getDb","openDbRequest","self","indexedDB","open","onblocked","Error","onupgradeneeded","db","createObjectStore","keyPath","mode","action","then","tx","transaction","oncomplete","close","objectStore","err","InMemoryStorage","inMemoryStorage","localStorage","window","fromCognitoIdentityPool","accountId","cache","identityPoolId","userIdentifier","Object","keys","length","cacheKey","provider","GetIdCommand","AccountId","IdentityPoolId","resolveLogins","throwOnMissingId","all","reduce","arr","name","tokenOrProvider","push","token","resolvedPairs","__awaiter","thisArg","_arguments","P","generator","adopt","fulfilled","step","next","e","rejected","done","__generator","body","f","y","t","g","_","trys","ops","verb","Symbol","iterator","n","v","op","TypeError","call","pop","__read","o","m","r","i","ar","defineProperty","exports","AwsCrc32","tslib_1","util_1","index_1","crc32","Crc32","update","toHash","isEmptyData","convertToBuffer","digest","numToUint8","data","checksum","e_1","data_1","__values","data_1_1","byte","lookupTable","e_1_1","return","a_lookUpTable","uint32ArrayFrom","aws_crc32_1","enumerable","extendStatics","d","b","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","create","__assign","assign","s","arguments","__rest","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__decorate","decorators","target","desc","c","getOwnPropertyDescriptor","Reflect","decorate","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__createBinding","k","k2","__exportStar","__spread","concat","__spreadArrays","il","a","j","jl","__await","__asyncGenerator","asyncIterator","q","resume","settle","fulfill","shift","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__importStar","mod","__esModule","default","__importDefault","__classPrivateFieldGet","receiver","privateMap","has","__classPrivateFieldSet","set","Int64","bytes","byteLength","fromNumber","number","Uint8Array","remaining","Math","abs","round","negate","valueOf","slice","negative","parseInt","toString","String","HEADER_VALUE_TYPE","HeaderMarshaller","toUtf8","fromUtf8","format","headers","e_2","chunks","headerName","from","formatHeaderValue","out","carry","position","chunks_1","chunks_1_1","chunk","e_2_1","header","type","shortView","DataView","ArrayBuffer","setUint8","setInt16","buffer","intView","setInt32","longBytes","binView","setUint16","binBytes","utf8Bytes","strView","strBytes","tsBytes","UUID_PATTERN","test","uuidBytes","replace","parse","nameLength","getUint8","byteOffset","BOOLEAN_TAG","BYTE_TAG","getInt8","SHORT_TAG","getInt16","INT_TAG","getInt32","LONG_TAG","binaryLength","getUint16","BINARY_TAG","stringLength","STRING_TAG","TIMESTAMP_TAG","Date","UUID_TAG","subarray","PRELUDE_MEMBER_LENGTH","PRELUDE_LENGTH","CHECKSUM_LENGTH","MINIMUM_MESSAGE_LENGTH","splitMessage","view","messageLength","getUint32","headerLength","expectedPreludeChecksum","expectedMessageChecksum","checksummer","EventStreamMarshaller","headerMarshaller","marshall","rawHeaders","setUint32","unmarshall","message","formatHeaders","getChunkedStream","source","currentMessageTotalLength","currentMessagePendingLength","currentMessage","messageLengthBuffer","allocateMessage","size","currentMessageView","sourceIterator","chunkLength","currentOffset","bytesRemaining","numBytesForTotal","numBytesToWrite","min","getUnmarshalledStream","options","source_1","source_1_1","messageType","unmodeledError","code","exception","deserializedException","event","deserialized","eventMarshaller","deserializer","$unknown","utf8Encoder","utf8Decoder","utfEncoder","deserialize","chunkedStream","unmarshalledStream","serialize","input","serializer","serializedIterator","input_1","input_1_1","payloadBuf","readableStreamtoIterable","readableStream","reader","getReader","read","releaseLock","iterableToReadableStream","asyncIterable","ReadableStream","pull","controller","enqueue","universalMarshaller","bodyIterable","isReadableStream","serialziedIterable","resolveEventStreamSerdeConfig","eventStreamMarshaller","eventStreamSerdeProvider","requestTimeout","timeoutInMs","setTimeout","timeoutError","FetchHttpHandler","destroy","handle","request","abortSignal","requestTimeoutInMs","aborted","abortError","path","query","queryString","port","method","url","protocol","hostname","requestOptions","Headers","AbortController","fetchRequest","Request","raceOfPromises","fetch","response","fetchHeaders","transformedHeaders","entries","pair","hasReadableStream","statusCode","status","blob","onabort","race","streamCollector","stream","Blob","collectBlob","collectStream","base64","arrayBuffer","readToBase64","res","isDone","prior","FileReader","onloadend","readyState","commaIndex","dataOffset","substring","readAsDataURL"],"sourceRoot":""}