asgard-js-core-ink 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +415 -0
- package/dist/constants/enum.d.ts +31 -0
- package/dist/constants/enum.d.ts.map +1 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1828 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/channel.d.ts +23 -0
- package/dist/lib/channel.d.ts.map +1 -0
- package/dist/lib/client.d.ts +27 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/conversation.d.ts +20 -0
- package/dist/lib/conversation.d.ts.map +1 -0
- package/dist/lib/create-sse-observable.d.ts +13 -0
- package/dist/lib/create-sse-observable.d.ts.map +1 -0
- package/dist/lib/event-emitter.d.ts +8 -0
- package/dist/lib/event-emitter.d.ts.map +1 -0
- package/dist/types/auth.d.ts +2 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/blob.d.ts +22 -0
- package/dist/types/blob.d.ts.map +1 -0
- package/dist/types/channel.d.ts +62 -0
- package/dist/types/channel.d.ts.map +1 -0
- package/dist/types/client.d.ts +74 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/event-emitter.d.ts +5 -0
- package/dist/types/event-emitter.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/sse-response.d.ts +142 -0
- package/dist/types/sse-response.d.ts.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/constants/enum.ts","../../../node_modules/tslib/tslib.es6.mjs","../../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js","../../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","../../../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","../../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","../../../node_modules/rxjs/dist/esm5/internal/Subscription.js","../../../node_modules/rxjs/dist/esm5/internal/config.js","../../../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","../../../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","../../../node_modules/rxjs/dist/esm5/internal/util/noop.js","../../../node_modules/rxjs/dist/esm5/internal/util/errorContext.js","../../../node_modules/rxjs/dist/esm5/internal/Subscriber.js","../../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js","../../../node_modules/rxjs/dist/esm5/internal/util/identity.js","../../../node_modules/rxjs/dist/esm5/internal/util/pipe.js","../../../node_modules/rxjs/dist/esm5/internal/Observable.js","../../../node_modules/rxjs/dist/esm5/internal/util/lift.js","../../../node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js","../../../node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","../../../node_modules/rxjs/dist/esm5/internal/Subject.js","../../../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js","../../../node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js","../../../node_modules/rxjs/dist/esm5/internal/scheduler/Action.js","../../../node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js","../../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js","../../../node_modules/rxjs/dist/esm5/internal/Scheduler.js","../../../node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js","../../../node_modules/rxjs/dist/esm5/internal/scheduler/async.js","../../../node_modules/rxjs/dist/esm5/internal/observable/empty.js","../../../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js","../../../node_modules/rxjs/dist/esm5/internal/util/args.js","../../../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js","../../../node_modules/rxjs/dist/esm5/internal/util/isPromise.js","../../../node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js","../../../node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js","../../../node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js","../../../node_modules/rxjs/dist/esm5/internal/symbol/iterator.js","../../../node_modules/rxjs/dist/esm5/internal/util/isIterable.js","../../../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js","../../../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js","../../../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js","../../../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js","../../../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js","../../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js","../../../node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js","../../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js","../../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js","../../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js","../../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js","../../../node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js","../../../node_modules/rxjs/dist/esm5/internal/observable/from.js","../../../node_modules/rxjs/dist/esm5/internal/observable/of.js","../../../node_modules/rxjs/dist/esm5/internal/util/isDate.js","../../../node_modules/rxjs/dist/esm5/internal/operators/map.js","../../../node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js","../../../node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js","../../../node_modules/rxjs/dist/esm5/internal/util/createObject.js","../../../node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js","../../../node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js","../../../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js","../../../node_modules/rxjs/dist/esm5/internal/observable/timer.js","../../../node_modules/rxjs/dist/esm5/internal/operators/concatMap.js","../../../node_modules/rxjs/dist/esm5/internal/operators/take.js","../../../node_modules/rxjs/dist/esm5/internal/operators/mapTo.js","../../../node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js","../../../node_modules/rxjs/dist/esm5/internal/operators/delay.js","../../../node_modules/rxjs/dist/esm5/internal/operators/retry.js","../../../node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js","../../../node_modules/@microsoft/fetch-event-source/lib/esm/parse.js","../../../node_modules/@microsoft/fetch-event-source/lib/esm/fetch.js","../src/lib/create-sse-observable.ts","../src/lib/event-emitter.ts","../src/lib/client.ts","../node_modules/uuid/dist/stringify.js","../node_modules/uuid/dist/rng.js","../node_modules/uuid/dist/native.js","../node_modules/uuid/dist/v4.js","../src/lib/conversation.ts","../src/lib/channel.ts"],"sourcesContent":["export enum FetchSseAction {\n RESET_CHANNEL = 'RESET_CHANNEL',\n NONE = 'NONE',\n}\n\nexport enum EventType {\n INIT = 'asgard.run.init',\n PROCESS = 'asgard.process',\n PROCESS_START = 'asgard.process.start',\n PROCESS_COMPLETE = 'asgard.process.complete',\n MESSAGE = 'asgard.message',\n MESSAGE_START = 'asgard.message.start',\n MESSAGE_DELTA = 'asgard.message.delta',\n MESSAGE_COMPLETE = 'asgard.message.complete',\n TOOL_CALL = 'asgard.tool_call',\n TOOL_CALL_START = 'asgard.tool_call.start',\n TOOL_CALL_COMPLETE = 'asgard.tool_call.complete',\n DONE = 'asgard.run.done',\n ERROR = 'asgard.run.error',\n}\n\nexport enum MessageTemplateType {\n TEXT = 'TEXT',\n HINT = 'HINT',\n BUTTON = 'BUTTON',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n LOCATION = 'LOCATION',\n CAROUSEL = 'CAROUSEL',\n CHART = 'CHART',\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\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);\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); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return function (source) {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n __extends(OperatorSubscriber, _super);\n function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n var _this = _super.call(this, destination) || this;\n _this.onFinalize = onFinalize;\n _this.shouldUnsubscribe = shouldUnsubscribe;\n _this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : _super.prototype._next;\n _this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._error;\n _this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._complete;\n return _this;\n }\n OperatorSubscriber.prototype.unsubscribe = function () {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n var closed_1 = this.closed;\n _super.prototype.unsubscribe.call(this);\n !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n };\n return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\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 }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, (this._value = value));\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map","export var dateTimestampProvider = {\n now: function () {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { __extends } from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = (function (_super) {\n __extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n return this;\n };\n return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var intervalProvider = {\n setInterval: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = intervalProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearInterval: function (handle) {\n var delegate = intervalProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { __extends } from \"tslib\";\nimport { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nvar AsyncAction = (function (_super) {\n __extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) {\n if (delay === void 0) { delay = 0; }\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, _delay) {\n var errored = false;\n var errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype.unsubscribe = function () {\n if (!this.closed) {\n var _a = this, id = _a.id, scheduler = _a.scheduler;\n var actions = scheduler.actions;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n _super.prototype.unsubscribe.call(this);\n }\n };\n return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar Scheduler = (function () {\n function Scheduler(schedulerActionCtor, now) {\n if (now === void 0) { now = Scheduler.now; }\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) { delay = 0; }\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n };\n Scheduler.now = dateTimestampProvider.now;\n return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map","import { __extends } from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = (function (_super) {\n __extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) { now = Scheduler.now; }\n var _this = _super.call(this, SchedulerAction, now) || this;\n _this.actions = [];\n _this._active = false;\n return _this;\n }\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this._active) {\n actions.push(action);\n return;\n }\n var error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var asyncScheduler = new AsyncScheduler(AsyncAction);\nexport var async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { Observable } from '../Observable';\nexport var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n//# sourceMappingURL=isScheduler.js.map","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function createInvalidObservableTypeError(input) {\n return new TypeError(\"You provided \" + (input !== null && typeof input === 'object' ? 'an invalid object' : \"'\" + input + \"'\") + \" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\");\n}\n//# sourceMappingURL=throwUnobservableError.js.map","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","import { __asyncGenerator, __await, __generator } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {\n var reader, _a, value, done;\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, 8];\n return [4, __await(reader.read())];\n case 3:\n _a = _b.sent(), value = _a.value, done = _a.done;\n if (!done) return [3, 5];\n return [4, __await(void 0)];\n case 4: return [2, _b.sent()];\n case 5: return [4, __await(value)];\n case 6: return [4, _b.sent()];\n case 7:\n _b.sent();\n return [3, 2];\n case 8: return [3, 10];\n case 9:\n reader.releaseLock();\n return [7];\n case 10: return [2];\n }\n });\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { __asyncValues, __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(function (subscriber) {\n for (var i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(function (subscriber) {\n promise\n .then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(function (subscriber) {\n var e_1, _a;\n try {\n for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {\n var value = iterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(function (subscriber) {\n process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_2, _a;\n return __awaiter(this, void 0, void 0, function () {\n var value, e_2_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 5, 6, 11]);\n asyncIterable_1 = __asyncValues(asyncIterable);\n _b.label = 1;\n case 1: return [4, asyncIterable_1.next()];\n case 2:\n if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];\n value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return [2];\n }\n _b.label = 3;\n case 3: return [3, 1];\n case 4: return [3, 11];\n case 5:\n e_2_1 = _b.sent();\n e_2 = { error: e_2_1 };\n return [3, 11];\n case 6:\n _b.trys.push([6, , 9, 10]);\n if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];\n return [4, _a.call(asyncIterable_1)];\n case 7:\n _b.sent();\n _b.label = 8;\n case 8: return [3, 10];\n case 9:\n if (e_2) throw e_2.error;\n return [7];\n case 10: return [7];\n case 11:\n subscriber.complete();\n return [2];\n }\n });\n });\n}\n//# sourceMappingURL=innerFrom.js.map","export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {\n if (delay === void 0) { delay = 0; }\n if (repeat === void 0) { repeat = false; }\n var scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n//# sourceMappingURL=executeSchedule.js.map","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));\n });\n}\n//# sourceMappingURL=observeOn.js.map","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));\n });\n}\n//# sourceMappingURL=subscribeOn.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(function (subscriber) {\n var iterator;\n executeSchedule(subscriber, scheduler, function () {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, function () {\n var _a;\n var value;\n var done;\n try {\n (_a = iterator.next(), value = _a.value, done = _a.done);\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n executeSchedule(subscriber, scheduler, function () {\n var iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, function () {\n iterator.next().then(function (result) {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.js.map","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n//# sourceMappingURL=of.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { map } from \"../operators/map\";\nvar isArray = Array.isArray;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(function (args) { return callOrApply(fn, args); });\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","var isArray = Array.isArray;\nvar getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n var first_1 = args[0];\n if (isArray(first_1)) {\n return { args: first_1, keys: null };\n }\n if (isPOJO(first_1)) {\n var keys = getKeys(first_1);\n return {\n args: keys.map(function (key) { return first_1[key]; }),\n keys: keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n//# sourceMappingURL=argsArgArrayOrObject.js.map","export function createObject(keys, values) {\n return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {});\n}\n//# sourceMappingURL=createObject.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;\n if (observables.length === 0) {\n return from([], scheduler);\n }\n var result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n function (values) { return createObject(keys, values); }\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform) {\n if (valueTransform === void 0) { valueTransform = identity; }\n return function (subscriber) {\n maybeSchedule(scheduler, function () {\n var length = observables.length;\n var values = new Array(length);\n var active = length;\n var remainingFirstValues = length;\n var _loop_1 = function (i) {\n maybeSchedule(scheduler, function () {\n var source = from(observables[i], scheduler);\n var hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, function () {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n };\n for (var i = 0; i < length; i++) {\n _loop_1(i);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n//# sourceMappingURL=combineLatest.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n var buffer = [];\n var active = 0;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };\n var doInnerSub = function (value) {\n expand && subscriber.next(value);\n active++;\n var innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, function () {\n innerComplete = true;\n }, undefined, function () {\n if (innerComplete) {\n try {\n active--;\n var _loop_1 = function () {\n var bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });\n }\n else {\n doInnerSub(bufferedValue);\n }\n };\n while (buffer.length && active < concurrent) {\n _loop_1();\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () {\n isComplete = true;\n checkComplete();\n }));\n return function () {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); });\n}\n//# sourceMappingURL=mergeMap.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime, intervalOrScheduler, scheduler) {\n if (dueTime === void 0) { dueTime = 0; }\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable(function (subscriber) {\n var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n var n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n//# sourceMappingURL=concatMap.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(function () { return value; });\n}\n//# sourceMappingURL=mapTo.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return function (source) {\n return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n };\n }\n return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });\n}\n//# sourceMappingURL=delayWhen.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var duration = timer(due, scheduler);\n return delayWhen(function () { return duration; });\n}\n//# sourceMappingURL=delay.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nimport { timer } from '../observable/timer';\nimport { innerFrom } from '../observable/innerFrom';\nexport function retry(configOrCount) {\n if (configOrCount === void 0) { configOrCount = Infinity; }\n var config;\n if (configOrCount && typeof configOrCount === 'object') {\n config = configOrCount;\n }\n else {\n config = {\n count: configOrCount,\n };\n }\n var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b;\n return count <= 0\n ? identity\n : operate(function (source, subscriber) {\n var soFar = 0;\n var innerSub;\n var subscribeForRetry = function () {\n var syncUnsub = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (resetOnSuccess) {\n soFar = 0;\n }\n subscriber.next(value);\n }, undefined, function (err) {\n if (soFar++ < count) {\n var resub_1 = function () {\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n else {\n syncUnsub = true;\n }\n };\n if (delay != null) {\n var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));\n var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {\n notifierSubscriber_1.unsubscribe();\n resub_1();\n }, function () {\n subscriber.complete();\n });\n notifier.subscribe(notifierSubscriber_1);\n }\n else {\n resub_1();\n }\n }\n else {\n subscriber.error(err);\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n };\n subscribeForRetry();\n });\n}\n//# sourceMappingURL=retry.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate(function (source, subscriber) {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","export async function getBytes(stream, onChunk) {\r\n const reader = stream.getReader();\r\n let result;\r\n while (!(result = await reader.read()).done) {\r\n onChunk(result.value);\r\n }\r\n}\r\nexport function getLines(onLine) {\r\n let buffer;\r\n let position;\r\n let fieldLength;\r\n let discardTrailingNewline = false;\r\n return function onChunk(arr) {\r\n if (buffer === undefined) {\r\n buffer = arr;\r\n position = 0;\r\n fieldLength = -1;\r\n }\r\n else {\r\n buffer = concat(buffer, arr);\r\n }\r\n const bufLength = buffer.length;\r\n let lineStart = 0;\r\n while (position < bufLength) {\r\n if (discardTrailingNewline) {\r\n if (buffer[position] === 10) {\r\n lineStart = ++position;\r\n }\r\n discardTrailingNewline = false;\r\n }\r\n let lineEnd = -1;\r\n for (; position < bufLength && lineEnd === -1; ++position) {\r\n switch (buffer[position]) {\r\n case 58:\r\n if (fieldLength === -1) {\r\n fieldLength = position - lineStart;\r\n }\r\n break;\r\n case 13:\r\n discardTrailingNewline = true;\r\n case 10:\r\n lineEnd = position;\r\n break;\r\n }\r\n }\r\n if (lineEnd === -1) {\r\n break;\r\n }\r\n onLine(buffer.subarray(lineStart, lineEnd), fieldLength);\r\n lineStart = position;\r\n fieldLength = -1;\r\n }\r\n if (lineStart === bufLength) {\r\n buffer = undefined;\r\n }\r\n else if (lineStart !== 0) {\r\n buffer = buffer.subarray(lineStart);\r\n position -= lineStart;\r\n }\r\n };\r\n}\r\nexport function getMessages(onId, onRetry, onMessage) {\r\n let message = newMessage();\r\n const decoder = new TextDecoder();\r\n return function onLine(line, fieldLength) {\r\n if (line.length === 0) {\r\n onMessage === null || onMessage === void 0 ? void 0 : onMessage(message);\r\n message = newMessage();\r\n }\r\n else if (fieldLength > 0) {\r\n const field = decoder.decode(line.subarray(0, fieldLength));\r\n const valueOffset = fieldLength + (line[fieldLength + 1] === 32 ? 2 : 1);\r\n const value = decoder.decode(line.subarray(valueOffset));\r\n switch (field) {\r\n case 'data':\r\n message.data = message.data\r\n ? message.data + '\\n' + value\r\n : value;\r\n break;\r\n case 'event':\r\n message.event = value;\r\n break;\r\n case 'id':\r\n onId(message.id = value);\r\n break;\r\n case 'retry':\r\n const retry = parseInt(value, 10);\r\n if (!isNaN(retry)) {\r\n onRetry(message.retry = retry);\r\n }\r\n break;\r\n }\r\n }\r\n };\r\n}\r\nfunction concat(a, b) {\r\n const res = new Uint8Array(a.length + b.length);\r\n res.set(a);\r\n res.set(b, a.length);\r\n return res;\r\n}\r\nfunction newMessage() {\r\n return {\r\n data: '',\r\n event: '',\r\n id: '',\r\n retry: undefined,\r\n };\r\n}\r\n//# sourceMappingURL=parse.js.map","var __rest = (this && this.__rest) || function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n};\r\nimport { getBytes, getLines, getMessages } from './parse';\r\nexport const EventStreamContentType = 'text/event-stream';\r\nconst DefaultRetryInterval = 1000;\r\nconst LastEventId = 'last-event-id';\r\nexport function fetchEventSource(input, _a) {\r\n var { signal: inputSignal, headers: inputHeaders, onopen: inputOnOpen, onmessage, onclose, onerror, openWhenHidden, fetch: inputFetch } = _a, rest = __rest(_a, [\"signal\", \"headers\", \"onopen\", \"onmessage\", \"onclose\", \"onerror\", \"openWhenHidden\", \"fetch\"]);\r\n return new Promise((resolve, reject) => {\r\n const headers = Object.assign({}, inputHeaders);\r\n if (!headers.accept) {\r\n headers.accept = EventStreamContentType;\r\n }\r\n let curRequestController;\r\n function onVisibilityChange() {\r\n curRequestController.abort();\r\n if (!document.hidden) {\r\n create();\r\n }\r\n }\r\n if (!openWhenHidden) {\r\n document.addEventListener('visibilitychange', onVisibilityChange);\r\n }\r\n let retryInterval = DefaultRetryInterval;\r\n let retryTimer = 0;\r\n function dispose() {\r\n document.removeEventListener('visibilitychange', onVisibilityChange);\r\n window.clearTimeout(retryTimer);\r\n curRequestController.abort();\r\n }\r\n inputSignal === null || inputSignal === void 0 ? void 0 : inputSignal.addEventListener('abort', () => {\r\n dispose();\r\n resolve();\r\n });\r\n const fetch = inputFetch !== null && inputFetch !== void 0 ? inputFetch : window.fetch;\r\n const onopen = inputOnOpen !== null && inputOnOpen !== void 0 ? inputOnOpen : defaultOnOpen;\r\n async function create() {\r\n var _a;\r\n curRequestController = new AbortController();\r\n try {\r\n const response = await fetch(input, Object.assign(Object.assign({}, rest), { headers, signal: curRequestController.signal }));\r\n await onopen(response);\r\n await getBytes(response.body, getLines(getMessages(id => {\r\n if (id) {\r\n headers[LastEventId] = id;\r\n }\r\n else {\r\n delete headers[LastEventId];\r\n }\r\n }, retry => {\r\n retryInterval = retry;\r\n }, onmessage)));\r\n onclose === null || onclose === void 0 ? void 0 : onclose();\r\n dispose();\r\n resolve();\r\n }\r\n catch (err) {\r\n if (!curRequestController.signal.aborted) {\r\n try {\r\n const interval = (_a = onerror === null || onerror === void 0 ? void 0 : onerror(err)) !== null && _a !== void 0 ? _a : retryInterval;\r\n window.clearTimeout(retryTimer);\r\n retryTimer = window.setTimeout(create, interval);\r\n }\r\n catch (innerErr) {\r\n dispose();\r\n reject(innerErr);\r\n }\r\n }\r\n }\r\n }\r\n create();\r\n });\r\n}\r\nfunction defaultOnOpen(response) {\r\n const contentType = response.headers.get('content-type');\r\n if (!(contentType === null || contentType === void 0 ? void 0 : contentType.startsWith(EventStreamContentType))) {\r\n throw new Error(`Expected content-type to be ${EventStreamContentType}, Actual: ${contentType}`);\r\n }\r\n}\r\n//# sourceMappingURL=fetch.js.map","import { Observable } from 'rxjs';\nimport { EventSourceMessage, fetchEventSource } from '@microsoft/fetch-event-source';\nimport { FetchSsePayload, SseResponse } from '../types';\nimport { EventType } from '../constants/enum';\n\ninterface CreateSseObservableOptions {\n endpoint: string;\n apiKey?: string;\n debugMode?: boolean;\n payload: FetchSsePayload;\n}\n\nexport function createSseObservable(options: CreateSseObservableOptions): Observable<SseResponse<EventType>> {\n const { endpoint, apiKey, payload, debugMode } = options;\n\n return new Observable<SseResponse<EventType>>(subscriber => {\n const controller = new AbortController();\n let currentTraceId: string | undefined;\n\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n };\n\n if (apiKey) {\n headers['X-API-KEY'] = apiKey;\n }\n\n const searchParams = new URLSearchParams();\n\n if (debugMode) {\n searchParams.set('is_debug', 'true');\n }\n\n const url = new URL(endpoint);\n\n if (searchParams.toString()) {\n url.search = searchParams.toString();\n }\n\n fetchEventSource(url.toString(), {\n method: 'POST',\n headers,\n body: payload ? JSON.stringify(payload) : undefined,\n signal: controller.signal,\n /**\n * Allow SSE to work when the page is hidden.\n * https://github.com/Azure/fetch-event-source/issues/17#issuecomment-1525904929\n */\n openWhenHidden: true,\n onopen: async response => {\n if (!response.ok) {\n subscriber.error(response);\n controller.abort();\n } else {\n currentTraceId = response.headers.get('X-Trace-Id') ?? undefined;\n }\n },\n onmessage: (esm: EventSourceMessage) => {\n const data = JSON.parse(esm.data) as SseResponse<EventType>;\n\n if (currentTraceId) {\n data.traceId = currentTraceId;\n } else if (data.requestId) {\n data.traceId = data.requestId;\n if (!currentTraceId) {\n currentTraceId = data.requestId;\n }\n }\n\n subscriber.next(data);\n },\n onclose: () => {\n subscriber.complete();\n },\n onerror: err => {\n subscriber.error(err);\n controller.abort();\n throw err;\n },\n });\n\n return (): void => {\n controller.abort();\n };\n });\n}\n","import { Listeners } from '../types';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class EventEmitter<Events extends Record<string, any>> {\n private listeners: Listeners<Events> = {};\n\n on<K extends keyof Events>(event: K, listener: Events[K]): void {\n this.listeners = Object.assign({}, this.listeners, {\n [event]: (this.listeners[event] ?? []).concat(listener),\n });\n }\n\n off<K extends keyof Events>(event: K, listener: Events[K]): void {\n if (!this.listeners[event]) return;\n\n this.listeners = Object.assign({}, this.listeners, {\n [event]: (this.listeners[event] ?? []).filter((l: Events[K]) => l !== listener),\n });\n }\n\n remove<K extends keyof Events>(event: K): void {\n delete this.listeners[event];\n }\n\n emit<K extends keyof Events>(event: K, ...args: Parameters<Events[K]>): void {\n if (!this.listeners[event]) return;\n\n this.listeners[event].forEach((listener: Events[K]) => listener(...args));\n }\n}\n","import {\n ClientConfig,\n IAsgardServiceClient,\n FetchSsePayload,\n FetchSseOptions,\n SseResponse,\n SseEvents,\n BlobUploadResponse,\n} from '../types';\nimport { createSseObservable } from './create-sse-observable';\nimport { concatMap, delay, of, retry, Subject, takeUntil } from 'rxjs';\nimport { EventType } from '../constants/enum';\nimport { EventEmitter } from './event-emitter';\n\nexport default class AsgardServiceClient implements IAsgardServiceClient {\n private apiKey?: string;\n private endpoint!: string;\n private botProviderEndpoint?: string;\n private debugMode?: boolean;\n private destroy$ = new Subject<void>();\n private sseEmitter = new EventEmitter<SseEvents>();\n private transformSsePayload?: (payload: FetchSsePayload) => FetchSsePayload;\n\n constructor(config: ClientConfig) {\n // Validate that either endpoint or botProviderEndpoint is provided\n if (!config.endpoint && !config.botProviderEndpoint) {\n throw new Error('Either endpoint or botProviderEndpoint must be provided');\n }\n\n this.apiKey = config.apiKey;\n this.debugMode = config.debugMode;\n this.transformSsePayload = config.transformSsePayload;\n this.botProviderEndpoint = config.botProviderEndpoint;\n\n // Handle endpoint derivation and deprecation\n if (!config.endpoint && config.botProviderEndpoint) {\n // Derive endpoint from botProviderEndpoint (new recommended way)\n // Handle trailing slashes to prevent double slashes\n const baseEndpoint = config.botProviderEndpoint.replace(/\\/+$/, '');\n this.endpoint = `${baseEndpoint}/message/sse`;\n } else if (config.endpoint) {\n // Use provided endpoint but warn about deprecation\n this.endpoint = config.endpoint;\n if (this.debugMode) {\n // eslint-disable-next-line no-console\n console.warn(\n '[AsgardServiceClient] The \"endpoint\" option is deprecated and will be removed in the next major version. ' +\n `Please use \"botProviderEndpoint\" instead. The SSE endpoint will be automatically derived as \"\\${botProviderEndpoint}/message/sse\".`,\n );\n }\n }\n }\n\n on<K extends keyof SseEvents>(event: K, listener: SseEvents[K]): void {\n this.sseEmitter.remove(event);\n this.sseEmitter.on(event, listener);\n }\n\n handleEvent(response: SseResponse<EventType>): void {\n switch (response.eventType) {\n case EventType.INIT:\n this.sseEmitter.emit(EventType.INIT, response as SseResponse<EventType.INIT>);\n\n break;\n case EventType.PROCESS_START:\n case EventType.PROCESS_COMPLETE:\n this.sseEmitter.emit(EventType.PROCESS, response as Parameters<SseEvents[EventType.PROCESS]>[0]);\n\n break;\n case EventType.MESSAGE_START:\n case EventType.MESSAGE_DELTA:\n case EventType.MESSAGE_COMPLETE:\n this.sseEmitter.emit(EventType.MESSAGE, response as Parameters<SseEvents[EventType.MESSAGE]>[0]);\n\n break;\n case EventType.TOOL_CALL_START:\n case EventType.TOOL_CALL_COMPLETE:\n this.sseEmitter.emit(EventType.TOOL_CALL, response as Parameters<SseEvents[EventType.TOOL_CALL]>[0]);\n\n break;\n case EventType.DONE:\n this.sseEmitter.emit(EventType.DONE, response as SseResponse<EventType.DONE>);\n\n break;\n case EventType.ERROR:\n this.sseEmitter.emit(EventType.ERROR, response as SseResponse<EventType.ERROR>);\n\n break;\n default:\n break;\n }\n }\n\n fetchSse(payload: FetchSsePayload, options?: FetchSseOptions): void {\n options?.onSseStart?.();\n\n createSseObservable({\n apiKey: this.apiKey,\n endpoint: this.endpoint,\n debugMode: this.debugMode,\n payload: this.transformSsePayload?.(payload) ?? payload,\n })\n .pipe(\n concatMap(event => of(event).pipe(delay(options?.delayTime ?? 50))),\n takeUntil(this.destroy$),\n retry(3),\n )\n .subscribe({\n next: response => {\n options?.onSseMessage?.(response);\n this.handleEvent(response);\n },\n error: error => {\n options?.onSseError?.(error);\n },\n complete: () => {\n options?.onSseCompleted?.();\n },\n });\n }\n\n close(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * 上傳檔案到 Blob API\n * 根據 API 文件:/generic/ns/{namespace}/bot-provider/{bot_provider_name}/blob\n */\n async uploadFile(file: File, customChannelId: string): Promise<BlobUploadResponse> {\n const blobEndpoint = this.deriveBlobEndpoint();\n\n if (!blobEndpoint) {\n throw new Error('Unable to derive blob endpoint. Please provide botProviderEndpoint in config.');\n }\n\n const formData = new FormData();\n formData.append('file', file);\n formData.append('customChannelId', customChannelId);\n\n const headers: HeadersInit = {};\n if (this.apiKey) {\n headers['X-API-KEY'] = this.apiKey;\n }\n\n try {\n const response = await fetch(blobEndpoint, {\n method: 'POST',\n headers,\n body: formData,\n });\n\n if (!response.ok) {\n throw new Error(`Upload failed: ${response.status} ${response.statusText}`);\n }\n\n const result = await response.json();\n\n if (this.debugMode) {\n // eslint-disable-next-line no-console\n console.log('[AsgardServiceClient] File upload response:', result);\n }\n\n return result as BlobUploadResponse;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[AsgardServiceClient] File upload error:', error);\n throw error;\n }\n }\n\n /**\n * 從 botProviderEndpoint 衍生 Blob API endpoint\n */\n private deriveBlobEndpoint(): string | null {\n if (!this.botProviderEndpoint && !this.endpoint) {\n return null;\n }\n\n let baseEndpoint = this.botProviderEndpoint;\n\n // 如果沒有 botProviderEndpoint,嘗試從 endpoint 反推\n if (!baseEndpoint && this.endpoint) {\n baseEndpoint = this.endpoint.replace('/message/sse', '');\n }\n\n if (!baseEndpoint) {\n return null;\n }\n\n // 移除尾部斜線\n baseEndpoint = baseEndpoint.replace(/\\/+$/, '');\n\n // 根據 API 文件,需要加上 /generic 前綴(如果還沒有的話)\n // API 格式:/generic/ns/{namespace}/bot-provider/{bot_provider_name}/blob\n if (!baseEndpoint.includes('/generic/')) {\n // 假設 baseEndpoint 格式為:https://api.example.com/ns/{namespace}/bot-provider/{name}\n // 需要插入 /generic\n const match = baseEndpoint.match(/^(https?:\\/\\/[^/]+)(\\/.*)/);\n if (match) {\n const [, domain, path] = match;\n baseEndpoint = `${domain}/generic${path}`;\n }\n }\n\n return `${baseEndpoint}/blob`;\n }\n}\n","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction _v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n return _v4(options, buf, offset);\n}\nexport default v4;\n","import { v4 as uuidv4 } from 'uuid';\nimport { EventType } from '../constants/enum';\nimport { ConversationMessage, ConversationToolCallMessage, SseResponse } from '../types';\n\ninterface IConversation {\n messages: Map<string, ConversationMessage> | null;\n}\n\nexport default class Conversation implements IConversation {\n public messages: Map<string, ConversationMessage> | null = null;\n\n constructor({ messages }: IConversation) {\n this.messages = messages;\n }\n\n pushMessage(message: ConversationMessage): Conversation {\n const messages = new Map(this.messages);\n messages.set(message.messageId, message);\n\n return new Conversation({ messages });\n }\n\n onMessage(response: SseResponse<EventType>): Conversation {\n switch (response.eventType) {\n case EventType.MESSAGE_START:\n return this.onMessageStart(response as SseResponse<EventType.MESSAGE_START>);\n case EventType.MESSAGE_DELTA:\n return this.onMessageDelta(response as SseResponse<EventType.MESSAGE_DELTA>);\n case EventType.MESSAGE_COMPLETE:\n return this.onMessageComplete(response as SseResponse<EventType.MESSAGE_COMPLETE>);\n case EventType.TOOL_CALL_START:\n return this.onToolCallStart(response as SseResponse<EventType.TOOL_CALL_START>);\n case EventType.TOOL_CALL_COMPLETE:\n return this.onToolCallComplete(response as SseResponse<EventType.TOOL_CALL_COMPLETE>);\n case EventType.ERROR:\n return this.onMessageError(response as SseResponse<EventType.ERROR>);\n default:\n return this;\n }\n }\n\n onMessageStart(response: SseResponse<EventType.MESSAGE_START>): Conversation {\n const message = response.fact.messageStart.message;\n const messages = new Map(this.messages);\n\n messages.set(message.messageId, {\n type: 'bot',\n eventType: EventType.MESSAGE_START,\n isTyping: true,\n typingText: '',\n messageId: message.messageId,\n message,\n time: new Date(),\n traceId: response.traceId,\n });\n\n return new Conversation({ messages });\n }\n\n onMessageDelta(response: SseResponse<EventType.MESSAGE_DELTA>): Conversation {\n const message = response.fact.messageDelta.message;\n\n const messages = new Map(this.messages);\n\n const currentMessage = messages.get(message.messageId);\n\n if (currentMessage?.type !== 'bot') return this;\n\n const typingText = `${currentMessage?.typingText ?? ''}${message.text}`;\n\n messages.set(message.messageId, {\n type: 'bot',\n eventType: EventType.MESSAGE_DELTA,\n isTyping: true,\n typingText,\n messageId: message.messageId,\n message,\n time: new Date(),\n traceId: response.traceId ?? currentMessage.traceId,\n });\n\n return new Conversation({ messages });\n }\n\n onMessageComplete(response: SseResponse<EventType.MESSAGE_COMPLETE>): Conversation {\n const message = response.fact.messageComplete.message;\n\n const messages = new Map(this.messages);\n\n const currentMessage = messages.get(message.messageId);\n\n messages.set(message.messageId, {\n type: 'bot',\n eventType: EventType.MESSAGE_COMPLETE,\n isTyping: false,\n typingText: null,\n messageId: message.messageId,\n message,\n time: new Date(),\n traceId: response.traceId ?? (currentMessage?.type === 'bot' ? currentMessage.traceId : undefined),\n });\n\n return new Conversation({ messages });\n }\n\n onMessageError(response: SseResponse<EventType.ERROR>): Conversation {\n const messageId = uuidv4();\n const error = response.fact.runError.error;\n\n const messages = new Map(this.messages);\n\n messages.set(messageId, {\n type: 'error',\n eventType: EventType.ERROR,\n messageId,\n error,\n time: new Date(),\n traceId: response.traceId,\n });\n\n return new Conversation({ messages });\n }\n\n onToolCallStart(response: SseResponse<EventType.TOOL_CALL_START>): Conversation {\n const toolCallStart = response.fact.toolCallStart;\n const messages = new Map(this.messages);\n const toolCallKey = `${toolCallStart.processId}-${toolCallStart.callSeq}`;\n\n const toolCallMessage: ConversationToolCallMessage = {\n type: 'tool-call',\n eventType: EventType.TOOL_CALL_START,\n messageId: toolCallKey,\n processId: toolCallStart.processId,\n callSeq: toolCallStart.callSeq,\n toolName: toolCallStart.toolCall.toolName,\n toolsetName: toolCallStart.toolCall.toolsetName,\n parameter: toolCallStart.toolCall.parameter,\n isComplete: false,\n time: new Date(),\n traceId: response.traceId,\n };\n\n messages.set(toolCallKey, toolCallMessage);\n\n return new Conversation({ messages });\n }\n\n onToolCallComplete(response: SseResponse<EventType.TOOL_CALL_COMPLETE>): Conversation {\n const toolCallComplete = response.fact.toolCallComplete;\n const messages = new Map(this.messages);\n const toolCallKey = `${toolCallComplete.processId}-${toolCallComplete.callSeq}`;\n\n const existingMessage = messages.get(toolCallKey);\n\n if (existingMessage?.type === 'tool-call') {\n const updatedMessage: ConversationToolCallMessage = {\n ...existingMessage,\n eventType: EventType.TOOL_CALL_COMPLETE,\n result: toolCallComplete.toolCallResult,\n isComplete: true,\n traceId: response.traceId ?? existingMessage.traceId,\n };\n messages.set(toolCallKey, updatedMessage);\n }\n\n return new Conversation({ messages });\n }\n}\n","import { BehaviorSubject, combineLatest, map, Subscription } from 'rxjs';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n ChannelConfig,\n ChannelStates,\n FetchSseOptions,\n FetchSsePayload,\n IAsgardServiceClient,\n ObserverOrNext,\n SseResponse,\n} from '../types';\nimport { FetchSseAction, EventType } from '../constants/enum';\nimport Conversation from './conversation';\n\nexport default class Channel {\n private client: IAsgardServiceClient;\n\n public customChannelId: string;\n public customMessageId?: string;\n\n private isConnecting$: BehaviorSubject<boolean>;\n private conversation$: BehaviorSubject<Conversation>;\n private statesObserver?: ObserverOrNext<ChannelStates>;\n private statesSubscription?: Subscription;\n private currentUserMessageId?: string;\n\n private constructor(config: ChannelConfig) {\n if (!config.client) {\n throw new Error('client must be required');\n }\n\n if (!config.customChannelId) {\n throw new Error('customChannelId must be required');\n }\n\n this.client = config.client;\n this.customChannelId = config.customChannelId;\n this.customMessageId = config.customMessageId;\n\n this.isConnecting$ = new BehaviorSubject(false);\n this.conversation$ = new BehaviorSubject(config.conversation);\n this.statesObserver = config.statesObserver;\n }\n\n public static async reset(\n config: ChannelConfig,\n payload?: Pick<FetchSsePayload, 'text' | 'payload'>,\n options?: FetchSseOptions,\n ): Promise<Channel> {\n const channel = new Channel(config);\n\n try {\n channel.subscribe();\n\n await channel.resetChannel(payload, options);\n\n return channel;\n } catch (error) {\n channel.close();\n\n throw error;\n }\n }\n\n private subscribe(): void {\n this.statesSubscription = combineLatest([this.isConnecting$, this.conversation$])\n .pipe(\n map(([isConnecting, conversation]) => ({\n isConnecting,\n conversation,\n })),\n )\n .subscribe(this.statesObserver);\n }\n\n private fetchSse(payload: FetchSsePayload, options?: FetchSseOptions): Promise<void> {\n return new Promise((resolve, reject) => {\n this.isConnecting$.next(true);\n\n this.client.fetchSse(payload, {\n onSseStart: options?.onSseStart,\n onSseMessage: (response: SseResponse<EventType>) => {\n options?.onSseMessage?.(response);\n\n if (this.currentUserMessageId && response.traceId) {\n const messages = new Map(this.conversation$.value.messages);\n const userMessage = messages.get(this.currentUserMessageId);\n\n if (userMessage && userMessage.type === 'user') {\n messages.set(this.currentUserMessageId, {\n ...userMessage,\n traceId: response.traceId,\n });\n this.conversation$.next(new Conversation({ messages }));\n }\n\n this.currentUserMessageId = undefined;\n }\n\n this.conversation$.next(this.conversation$.value.onMessage(response));\n },\n onSseError: (err: unknown) => {\n options?.onSseError?.(err);\n this.isConnecting$.next(false);\n this.currentUserMessageId = undefined;\n reject(err);\n },\n onSseCompleted: () => {\n options?.onSseCompleted?.();\n this.isConnecting$.next(false);\n this.currentUserMessageId = undefined;\n resolve();\n },\n });\n });\n }\n\n private resetChannel(payload?: Pick<FetchSsePayload, 'text' | 'payload'>, options?: FetchSseOptions): Promise<void> {\n return this.fetchSse(\n {\n action: FetchSseAction.RESET_CHANNEL,\n customChannelId: this.customChannelId,\n customMessageId: this.customMessageId,\n text: payload?.text || '',\n payload: payload?.payload,\n },\n options,\n );\n }\n\n public sendMessage(\n payload: Pick<FetchSsePayload, 'customMessageId' | 'text' | 'payload' | 'blobIds'> & {\n filePreviewUrls?: string[];\n documentNames?: string[];\n },\n options?: FetchSseOptions,\n ): Promise<void> {\n const text = payload.text.trim();\n const messageId = payload.customMessageId ?? uuidv4();\n\n this.currentUserMessageId = messageId;\n\n this.conversation$.next(\n this.conversation$.value.pushMessage({\n type: 'user',\n messageId,\n text,\n blobIds: payload.blobIds,\n filePreviewUrls: payload.filePreviewUrls,\n documentNames: payload.documentNames,\n time: new Date(),\n }),\n );\n\n return this.fetchSse(\n {\n action: FetchSseAction.NONE,\n customChannelId: this.customChannelId,\n customMessageId: messageId,\n payload: payload?.payload,\n text,\n blobIds: payload?.blobIds,\n },\n options,\n );\n }\n\n public close(): void {\n this.isConnecting$.complete();\n this.conversation$.complete();\n this.statesSubscription?.unsubscribe();\n }\n}\n"],"names":["FetchSseAction","EventType","MessageTemplateType","extendStatics","d","b","p","__extends","__","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","n","v","op","__values","o","s","m","i","__read","r","ar","error","__spreadArray","to","from","pack","l","__await","__asyncGenerator","q","awaitReturn","a","resume","settle","fulfill","__asyncValues","isFunction","createErrorClass","createImpl","_super","instance","ctorFunc","UnsubscriptionError","errors","err","arrRemove","arr","item","index","Subscription","initialTeardown","e_1","_a","e_2","_b","_parentage","_parentage_1","_parentage_1_1","parent_1","e_1_1","initialFinalizer","_finalizers","_finalizers_1","_finalizers_1_1","finalizer","execFinalizer","e_2_1","teardown","parent","empty","EMPTY_SUBSCRIPTION","isSubscription","config","timeoutProvider","handler","timeout","args","_i","handle","reportUnhandledError","noop","errorContext","cb","Subscriber","destination","_this","EMPTY_OBSERVER","next","complete","SafeSubscriber","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","defaultErrorHandler","observable","identity","x","pipeFromArray","fns","input","prev","fn","Observable","subscribe","operator","subscriber","isSubscriber","source","sink","promiseCtor","getPromiseCtor","Symbol_observable","operations","isObserver","hasLift","operate","init","liftedSource","createOperatorSubscriber","onNext","onComplete","onError","onFinalize","OperatorSubscriber","shouldUnsubscribe","closed_1","ObjectUnsubscribedError","Subject","subject","AnonymousSubject","_c","observer","observers","hasError","isStopped","thrownError","BehaviorSubject","_value","subscription","dateTimestampProvider","Action","scheduler","work","state","delay","intervalProvider","AsyncAction","id","_id","_scheduler","_delay","errored","errorValue","actions","Scheduler","schedulerActionCtor","now","AsyncScheduler","SchedulerAction","action","asyncScheduler","async","EMPTY","isScheduler","last","popResultSelector","popScheduler","isArrayLike","isPromise","isInteropObservable","isAsyncIterable","obj","createInvalidObservableTypeError","getSymbolIterator","iterator","isIterable","Symbol_iterator","readableStreamLikeToAsyncGenerator","readableStream","reader","done","isReadableStreamLike","innerFrom","fromInteropObservable","fromArrayLike","fromPromise","fromAsyncIterable","fromIterable","fromReadableStreamLike","obs","array","promise","iterable","iterable_1","iterable_1_1","asyncIterable","process","asyncIterable_1","asyncIterable_1_1","executeSchedule","parentSubscription","repeat","scheduleSubscription","observeOn","subscribeOn","scheduleObservable","schedulePromise","scheduleArray","scheduleIterable","scheduleAsyncIterable","scheduleReadableStreamLike","scheduled","of","isValidDate","map","project","isArray","callOrApply","mapOneOrManyArgs","getPrototypeOf","objectProto","getKeys","argsArgArrayOrObject","first_1","isPOJO","keys","key","createObject","values","combineLatest","resultSelector","observables","combineLatestInit","valueTransform","maybeSchedule","length","active","remainingFirstValues","_loop_1","hasFirstValue","execute","mergeInternals","concurrent","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerValue","bufferedValue","mergeMap","ii","timer","dueTime","intervalOrScheduler","intervalDuration","due","concatMap","take","count","seen","mapTo","delayWhen","delayDurationSelector","subscriptionDelay","duration","retry","configOrCount","resetOnSuccess","soFar","innerSub","subscribeForRetry","syncUnsub","resub_1","notifier","notifierSubscriber_1","takeUntil","getBytes","stream","onChunk","getLines","onLine","position","fieldLength","discardTrailingNewline","concat","bufLength","lineStart","lineEnd","getMessages","onId","onRetry","onMessage","message","newMessage","decoder","line","field","valueOffset","res","__rest","EventStreamContentType","DefaultRetryInterval","LastEventId","fetchEventSource","inputSignal","inputHeaders","inputOnOpen","onmessage","onclose","onerror","openWhenHidden","inputFetch","rest","headers","curRequestController","onVisibilityChange","create","retryInterval","retryTimer","dispose","fetch","onopen","defaultOnOpen","response","interval","innerErr","contentType","createSseObservable","options","endpoint","apiKey","payload","debugMode","controller","currentTraceId","searchParams","url","esm","data","EventEmitter","__publicField","event","listener","AsgardServiceClient","baseEndpoint","file","customChannelId","blobEndpoint","formData","match","domain","path","byteToHex","unsafeStringify","offset","getRandomValues","rnds8","rng","randomUUID","native","_v4","buf","rnds","v4","Conversation","messages","currentMessage","typingText","messageId","uuidv4","toolCallStart","toolCallKey","toolCallMessage","toolCallComplete","existingMessage","updatedMessage","Channel","channel","isConnecting","conversation","userMessage","text"],"mappings":";;;AAAO,IAAKA,sBAAAA,OACVA,EAAA,gBAAgB,iBAChBA,EAAA,OAAO,QAFGA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAA,OAAO,mBACPA,EAAA,UAAU,kBACVA,EAAA,gBAAgB,wBAChBA,EAAA,mBAAmB,2BACnBA,EAAA,UAAU,kB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AAA;AAAA,QACA,MAAAa;AAAA,QACA,SAASlD,EAAQ;AAAA,QACjB,iBAAiBA,EAAQ;AAAA,QACzB,eAAeA,EAAQ;AAAA,QACvB,0BAAU,KAAA;AAAA,MAAK,CAChB;AAAA,IAAA,GAGI,KAAK;AAAA,MACV;AAAA,QACE,QAAQvW,EAAe;AAAA,QACvB,iBAAiB,KAAK;AAAA,QACtB,iBAAiB4Y;AAAA,QACjB,SAASrC,KAAA,gBAAAA,EAAS;AAAA,QAClB,MAAAkD;AAAA,QACA,SAASlD,KAAA,gBAAAA,EAAS;AAAA,MAAA;AAAA,MAEpBH;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEO,QAAc;A/EvKhB,QAAA3R;A+EwKH,SAAK,cAAc,SAAA,GACnB,KAAK,cAAc,SAAA,IACnBA,IAAA,KAAK,uBAAL,QAAAA,EAAyB;AAAA,EAC3B;AACF;","x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,74,75,76,77]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChannelConfig, FetchSseOptions, FetchSsePayload } from '../types';
|
|
2
|
+
|
|
3
|
+
export default class Channel {
|
|
4
|
+
private client;
|
|
5
|
+
customChannelId: string;
|
|
6
|
+
customMessageId?: string;
|
|
7
|
+
private isConnecting$;
|
|
8
|
+
private conversation$;
|
|
9
|
+
private statesObserver?;
|
|
10
|
+
private statesSubscription?;
|
|
11
|
+
private currentUserMessageId?;
|
|
12
|
+
private constructor();
|
|
13
|
+
static reset(config: ChannelConfig, payload?: Pick<FetchSsePayload, 'text' | 'payload'>, options?: FetchSseOptions): Promise<Channel>;
|
|
14
|
+
private subscribe;
|
|
15
|
+
private fetchSse;
|
|
16
|
+
private resetChannel;
|
|
17
|
+
sendMessage(payload: Pick<FetchSsePayload, 'customMessageId' | 'text' | 'payload' | 'blobIds'> & {
|
|
18
|
+
filePreviewUrls?: string[];
|
|
19
|
+
documentNames?: string[];
|
|
20
|
+
}, options?: FetchSseOptions): Promise<void>;
|
|
21
|
+
close(): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../src/lib/channel.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EAEb,eAAe,EACf,eAAe,EAIhB,MAAM,UAAU,CAAC;AAIlB,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,OAAO,CAAC,MAAM,CAAuB;IAE9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEhC,OAAO,CAAC,aAAa,CAA2B;IAChD,OAAO,CAAC,aAAa,CAAgC;IACrD,OAAO,CAAC,cAAc,CAAC,CAAgC;IACvD,OAAO,CAAC,kBAAkB,CAAC,CAAe;IAC1C,OAAO,CAAC,oBAAoB,CAAC,CAAS;IAEtC,OAAO;WAkBa,KAAK,CACvB,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC,EACnD,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,OAAO,CAAC;IAgBnB,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,QAAQ;IA0ChB,OAAO,CAAC,YAAY;IAab,WAAW,CAChB,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,GAAG;QACnF,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;KAC1B,EACD,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC;IA+BT,KAAK,IAAI,IAAI;CAKrB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventType } from '../constants/enum';
|
|
2
|
+
import { ClientConfig, IAsgardServiceClient, FetchSsePayload, FetchSseOptions, SseResponse, SseEvents, BlobUploadResponse } from '../types';
|
|
3
|
+
|
|
4
|
+
export default class AsgardServiceClient implements IAsgardServiceClient {
|
|
5
|
+
private apiKey?;
|
|
6
|
+
private endpoint;
|
|
7
|
+
private botProviderEndpoint?;
|
|
8
|
+
private debugMode?;
|
|
9
|
+
private destroy$;
|
|
10
|
+
private sseEmitter;
|
|
11
|
+
private transformSsePayload?;
|
|
12
|
+
constructor(config: ClientConfig);
|
|
13
|
+
on<K extends keyof SseEvents>(event: K, listener: SseEvents[K]): void;
|
|
14
|
+
handleEvent(response: SseResponse<EventType>): void;
|
|
15
|
+
fetchSse(payload: FetchSsePayload, options?: FetchSseOptions): void;
|
|
16
|
+
close(): void;
|
|
17
|
+
/**
|
|
18
|
+
* 上傳檔案到 Blob API
|
|
19
|
+
* 根據 API 文件:/generic/ns/{namespace}/bot-provider/{bot_provider_name}/blob
|
|
20
|
+
*/
|
|
21
|
+
uploadFile(file: File, customChannelId: string): Promise<BlobUploadResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* 從 botProviderEndpoint 衍生 Blob API endpoint
|
|
24
|
+
*/
|
|
25
|
+
private deriveBlobEndpoint;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,WAAW,EACX,SAAS,EACT,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,oBAAoB;IACtE,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,mBAAmB,CAAC,CAAS;IACrC,OAAO,CAAC,SAAS,CAAC,CAAU;IAC5B,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,UAAU,CAAiC;IACnD,OAAO,CAAC,mBAAmB,CAAC,CAAgD;gBAEhE,MAAM,EAAE,YAAY;IA8BhC,EAAE,CAAC,CAAC,SAAS,MAAM,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;IAKrE,WAAW,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI;IAmCnD,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI;IA4BnE,KAAK,IAAI,IAAI;IAKb;;;OAGG;IACG,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA0ClF;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAiC3B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ConversationMessage, SseResponse } from '../types';
|
|
2
|
+
import { EventType } from '../constants/enum';
|
|
3
|
+
|
|
4
|
+
interface IConversation {
|
|
5
|
+
messages: Map<string, ConversationMessage> | null;
|
|
6
|
+
}
|
|
7
|
+
export default class Conversation implements IConversation {
|
|
8
|
+
messages: Map<string, ConversationMessage> | null;
|
|
9
|
+
constructor({ messages }: IConversation);
|
|
10
|
+
pushMessage(message: ConversationMessage): Conversation;
|
|
11
|
+
onMessage(response: SseResponse<EventType>): Conversation;
|
|
12
|
+
onMessageStart(response: SseResponse<EventType.MESSAGE_START>): Conversation;
|
|
13
|
+
onMessageDelta(response: SseResponse<EventType.MESSAGE_DELTA>): Conversation;
|
|
14
|
+
onMessageComplete(response: SseResponse<EventType.MESSAGE_COMPLETE>): Conversation;
|
|
15
|
+
onMessageError(response: SseResponse<EventType.ERROR>): Conversation;
|
|
16
|
+
onToolCallStart(response: SseResponse<EventType.TOOL_CALL_START>): Conversation;
|
|
17
|
+
onToolCallComplete(response: SseResponse<EventType.TOOL_CALL_COMPLETE>): Conversation;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/lib/conversation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAA+B,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzF,UAAU,aAAa;IACrB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,aAAa;IACjD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAQ;gBAEpD,EAAE,QAAQ,EAAE,EAAE,aAAa;IAIvC,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY;IAOvD,SAAS,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,YAAY;IAmBzD,cAAc,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,YAAY;IAkB5E,cAAc,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,YAAY;IAyB5E,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,gBAAgB,CAAC,GAAG,YAAY;IAqBlF,cAAc,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,YAAY;IAkBpE,eAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,YAAY;IAwB/E,kBAAkB,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG,YAAY;CAoBtF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventType } from '../constants/enum';
|
|
2
|
+
import { FetchSsePayload, SseResponse } from '../types';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
interface CreateSseObservableOptions {
|
|
6
|
+
endpoint: string;
|
|
7
|
+
apiKey?: string;
|
|
8
|
+
debugMode?: boolean;
|
|
9
|
+
payload: FetchSsePayload;
|
|
10
|
+
}
|
|
11
|
+
export declare function createSseObservable(options: CreateSseObservableOptions): Observable<SseResponse<EventType>>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=create-sse-observable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-sse-observable.d.ts","sourceRoot":"","sources":["../../src/lib/create-sse-observable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,UAAU,0BAA0B;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAyE3G"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class EventEmitter<Events extends Record<string, any>> {
|
|
2
|
+
private listeners;
|
|
3
|
+
on<K extends keyof Events>(event: K, listener: Events[K]): void;
|
|
4
|
+
off<K extends keyof Events>(event: K, listener: Events[K]): void;
|
|
5
|
+
remove<K extends keyof Events>(event: K): void;
|
|
6
|
+
emit<K extends keyof Events>(event: K, ...args: Parameters<Events[K]>): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=event-emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../../src/lib/event-emitter.ts"],"names":[],"mappings":"AAGA,qBAAa,YAAY,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC1D,OAAO,CAAC,SAAS,CAAyB;IAE1C,EAAE,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAM/D,GAAG,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAQhE,MAAM,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAI9C,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;CAK7E"}
|