diff --git a/dist/typesense-instantsearch-adapter.js b/dist/typesense-instantsearch-adapter.js index 6f35989..182a173 100644 --- a/dist/typesense-instantsearch-adapter.js +++ b/dist/typesense-instantsearch-adapter.js @@ -761,12 +761,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = var SearchResponseAdapter = /*#__PURE__*/function () { function SearchResponseAdapter(typesenseResponse, instantsearchRequest, configuration) { - var allTypesenseResponses = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + var allTypesenseResults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + var fullTypesenseResponse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__["default"])(this, SearchResponseAdapter); this.typesenseResponse = typesenseResponse; this.instantsearchRequest = instantsearchRequest; this.configuration = configuration; - this.allTypesenseResponses = allTypesenseResponses; + this.allTypesenseResults = allTypesenseResults; + this.fullTypesenseResponse = fullTypesenseResponse; } return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__["default"])(SearchResponseAdapter, [{ key: "_adaptGroupedHits", @@ -813,6 +815,11 @@ var SearchResponseAdapter = /*#__PURE__*/function () { adaptedHit._highlightResult = _this2._adaptHighlightResult(typesenseHit, "value"); adaptedHit._rawTypesenseHit = typesenseHit; + // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits + if (_this2.fullTypesenseResponse.conversation) { + adaptedHit._rawTypesenseConversation = _this2.fullTypesenseResponse.conversation; + } + // Add metadata fields to result, if a field with that name doesn't already exist ["text_match", "geo_distance_meters", "curated", "text_match_info", "hybrid_search_info", "vector_distance"].forEach(function (metadataField) { if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) { @@ -1036,7 +1043,7 @@ var SearchResponseAdapter = /*#__PURE__*/function () { adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {}; adaptedResult.facetOrdering.facets.order = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(new Set(typesenseFacetCounts.map(function (fc) { return fc["field_name"]; - }).concat(this.allTypesenseResponses.map(function (r) { + }).concat(this.allTypesenseResults.map(function (r) { return r.facet_counts || []; }).flat().map(function (fc) { return fc["field_name"]; @@ -9509,30 +9516,23 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ TypesenseInstantsearchAdapter) /* harmony export */ }); -/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); -/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); -/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); -/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); -/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); -/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); -/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _Configuration__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Configuration */ "./src/Configuration.js"); -/* harmony import */ var typesense__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! typesense */ "./node_modules/typesense/lib/Typesense.js"); -/* harmony import */ var typesense__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(typesense__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _SearchRequestAdapter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SearchRequestAdapter */ "./src/SearchRequestAdapter.js"); -/* harmony import */ var _SearchResponseAdapter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./SearchResponseAdapter */ "./src/SearchResponseAdapter.js"); -/* harmony import */ var _FacetSearchResponseAdapter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./FacetSearchResponseAdapter */ "./src/FacetSearchResponseAdapter.js"); - +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Configuration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Configuration */ "./src/Configuration.js"); +/* harmony import */ var typesense__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! typesense */ "./node_modules/typesense/lib/Typesense.js"); +/* harmony import */ var typesense__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(typesense__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _SearchRequestAdapter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SearchRequestAdapter */ "./src/SearchRequestAdapter.js"); +/* harmony import */ var _SearchResponseAdapter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SearchResponseAdapter */ "./src/SearchResponseAdapter.js"); +/* harmony import */ var _FacetSearchResponseAdapter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FacetSearchResponseAdapter */ "./src/FacetSearchResponseAdapter.js"); -var _excluded = ["results"]; - -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } @@ -9541,7 +9541,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = var TypesenseInstantsearchAdapter = /*#__PURE__*/function () { function TypesenseInstantsearchAdapter(options) { var _this = this; - (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__["default"])(this, TypesenseInstantsearchAdapter); + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, TypesenseInstantsearchAdapter); this.updateConfiguration(options); this.searchClient = { clearCache: function clearCache() { @@ -9555,13 +9555,13 @@ var TypesenseInstantsearchAdapter = /*#__PURE__*/function () { } }; } - return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__["default"])(TypesenseInstantsearchAdapter, [{ + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(TypesenseInstantsearchAdapter, [{ key: "searchTypesenseAndAdapt", value: function () { - var _searchTypesenseAndAdapt = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().mark(function _callee(instantsearchRequests) { + var _searchTypesenseAndAdapt = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(instantsearchRequests) { var _this2 = this; var typesenseResponse, adaptedResponses; - return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().wrap(function _callee$(_context) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.prev = 0; @@ -9571,12 +9571,8 @@ var TypesenseInstantsearchAdapter = /*#__PURE__*/function () { typesenseResponse = _context.sent; adaptedResponses = typesenseResponse.results.map(function (typesenseResult, index) { _this2._validateTypesenseResult(typesenseResult); - var responseAdapter = new _SearchResponseAdapter__WEBPACK_IMPORTED_MODULE_9__.SearchResponseAdapter(typesenseResult, instantsearchRequests[index], _this2.configuration, typesenseResponse.results); - var adaptedResponse = _objectSpread(_objectSpread({}, responseAdapter.adapt()), function (_ref) { - var results = _ref.results, - o = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, _excluded); - return o; - }(typesenseResponse)); + var responseAdapter = new _SearchResponseAdapter__WEBPACK_IMPORTED_MODULE_7__.SearchResponseAdapter(typesenseResult, instantsearchRequests[index], _this2.configuration, typesenseResponse.results, typesenseResponse); + var adaptedResponse = responseAdapter.adapt(); return adaptedResponse; }); return _context.abrupt("return", { @@ -9601,10 +9597,10 @@ var TypesenseInstantsearchAdapter = /*#__PURE__*/function () { }, { key: "searchTypesenseForFacetValuesAndAdapt", value: function () { - var _searchTypesenseForFacetValuesAndAdapt = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().mark(function _callee2(instantsearchRequests) { + var _searchTypesenseForFacetValuesAndAdapt = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2(instantsearchRequests) { var _this3 = this; var typesenseResponse, adaptedResponses; - return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().wrap(function _callee2$(_context2) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: _context2.prev = 0; @@ -9614,7 +9610,7 @@ var TypesenseInstantsearchAdapter = /*#__PURE__*/function () { typesenseResponse = _context2.sent; adaptedResponses = typesenseResponse.results.map(function (typesenseResult, index) { _this3._validateTypesenseResult(typesenseResult); - var responseAdapter = new _FacetSearchResponseAdapter__WEBPACK_IMPORTED_MODULE_10__.FacetSearchResponseAdapter(typesenseResult, instantsearchRequests[index], _this3.configuration); + var responseAdapter = new _FacetSearchResponseAdapter__WEBPACK_IMPORTED_MODULE_8__.FacetSearchResponseAdapter(typesenseResult, instantsearchRequests[index], _this3.configuration); return responseAdapter.adapt(); }); return _context2.abrupt("return", adaptedResponses); @@ -9637,12 +9633,12 @@ var TypesenseInstantsearchAdapter = /*#__PURE__*/function () { }, { key: "_adaptAndPerformTypesenseRequest", value: function () { - var _adaptAndPerformTypesenseRequest2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().mark(function _callee3(instantsearchRequests) { + var _adaptAndPerformTypesenseRequest2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee3(instantsearchRequests) { var requestAdapter, typesenseResponse; - return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().wrap(function _callee3$(_context3) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee3$(_context3) { while (1) switch (_context3.prev = _context3.next) { case 0: - requestAdapter = new _SearchRequestAdapter__WEBPACK_IMPORTED_MODULE_8__.SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration); + requestAdapter = new _SearchRequestAdapter__WEBPACK_IMPORTED_MODULE_6__.SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration); _context3.next = 3; return requestAdapter.request(); case 3: @@ -9662,15 +9658,15 @@ var TypesenseInstantsearchAdapter = /*#__PURE__*/function () { }, { key: "clearCache", value: function clearCache() { - this.typesenseClient = new typesense__WEBPACK_IMPORTED_MODULE_7__.SearchClient(this.configuration.server); + this.typesenseClient = new typesense__WEBPACK_IMPORTED_MODULE_5__.SearchClient(this.configuration.server); return this.searchClient; } }, { key: "updateConfiguration", value: function updateConfiguration(options) { - this.configuration = new _Configuration__WEBPACK_IMPORTED_MODULE_6__.Configuration(options); + this.configuration = new _Configuration__WEBPACK_IMPORTED_MODULE_4__.Configuration(options); this.configuration.validate(); - this.typesenseClient = new typesense__WEBPACK_IMPORTED_MODULE_7__.SearchClient(this.configuration.server); + this.typesenseClient = new typesense__WEBPACK_IMPORTED_MODULE_5__.SearchClient(this.configuration.server); return true; } }, { diff --git a/dist/typesense-instantsearch-adapter.js.map b/dist/typesense-instantsearch-adapter.js.map index 23006e3..fae0df0 100644 --- a/dist/typesense-instantsearch-adapter.js.map +++ b/dist/typesense-instantsearch-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense-instantsearch-adapter.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;ACVa;;AAAA;AAAA;AAEN,IAAME,aAAa;EACxB,SAAAA,cAAA,EAA0B;IAAA,IAAAC,qBAAA;MAAAC,qBAAA;MAAAC,IAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,sBAAA;MAAAC,sBAAA;MAAAC,sBAAA;IAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAAAzB,iFAAA,OAAAE,aAAA;IACtB,IAAI,CAAC0B,MAAM,GAAGJ,OAAO,CAACI,MAAM,IAAI;MAC9BC,KAAK,EAAE,CACL;QACEC,IAAI,EAAE,WAAW;QACjBC,IAAI,EAAE,MAAM;QACZC,IAAI,EAAE,EAAE;QACRC,QAAQ,EAAE;MACZ,CAAC;IAEL,CAAC;IAED,IAAI,CAACL,MAAM,CAACM,4BAA4B,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ACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;ACxSY;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,GAAG,oBAAoB,GA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;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACvEa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B,mBAAO,CAAC,0DAAO;AAC7C,eAAe,mBAAO,CAAC,wEAAU;AACjC,uCAAuC,mBAAO,CAAC,gGAAyB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,gFAAgF,kCAAkC;AAClH,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,wNAAwN;AACxN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,gEAAgE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,uCAAuC;AAC3G;AACA;AACA,oEAAoE,sIAAsI;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,6CAA6C;AACpH,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC1Ya;AACb;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,6BAA6B,mBAAO,CAAC,8DAAQ;AAC7C,4BAA4B,mBAAO,CAAC,4DAAO;AAC3C,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,qCAAqC,mBAAO,CAAC,8EAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACxHa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,eAAe,mBAAO,CAAC,wEAAU;AACjC,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,iBAAiB,mBAAO,CAAC,sEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACjJa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACpEa;AACb;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,mBAAO,CAAC,yDAAU;AAC5C,eAAe,mBAAO,CAAC,wEAAU;AACjC;AACA;AACA;AACA;AACA;AACA,mCAAmC,0CAA0C;AAC7E,mCAAmC,0CAA0C;AAC7E,mCAAmC,mBAAmB,WAAW,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ia;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC1Ea;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,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A+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,wEAAU;AACjC,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uGAAuG,aAAa,kBAAkB;AACtI,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA,2GAA2G,aAAa,kBAAkB;AAC1I;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,kCAAkC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B;AACnF;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB;AAC3E,oFAAoF,6BAA6B;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClMa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;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AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ha;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,6BAA6B,mBAAO,CAAC,8FAAwB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;A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;;;;;ACAA,cAAc,sGAAiC;AAC/C;AACA,gBAAgB;AAChB;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;ACdA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;ACzrGe;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA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,mDAAqB,CAAC,IAAI,CAACjQ,aAAa,CAACjF,MAAM,CAAC;MAC3E,OAAO,IAAI;IACb;EAAC;IAAA6B,GAAA;IAAAS,KAAA,EAED,SAAA2T,yBAAyBD,eAAe,EAAE;MACxC,IAAIA,eAAe,CAAC5P,KAAK,EAAE;QACzB,MAAM,IAAIvD,KAAK,IAAAwD,MAAA,CAAI2P,eAAe,CAACiB,IAAI,SAAA5Q,MAAA,CAAM2P,eAAe,CAAC5P,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAAC4P,eAAe,CAAC7F,IAAI,IAAI,CAAC6F,eAAe,CAACxB,YAAY,EAAE;QAC1D,MAAM,IAAI3R,KAAK,2BAAAwD,MAAA,CAA2B2P,eAAe,CAACiB,IAAI,SAAA5Q,MAAA,CAAM2P,eAAe,CAAC5P,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/ignored|/Users/jason/Programming/jprojs/typesense/typesense-instantsearch-adapter/node_modules/typesense/lib/Typesense|crypto","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/webpack/runtime/make namespace object","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true) {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest, configuration, allTypesenseResponses = []) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResponses = allTypesenseResponses;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResponses\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __spreadArray = (this && this.__spreadArray) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n );\n let adaptedResponse = {\n ...responseAdapter.adapt(),\n // eslint-disable-next-line no-unused-vars\n ...(({ results, ...o }) => o)(typesenseResponse), // All other keys in the response (like `conversation`)\n };\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["_classCallCheck","_createClass","Configuration","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","Object","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","value","validate","values","some","c","console","warn","Error","utils","FacetSearchResponseAdapter","typesenseResponse","instantsearchRequest","_adaptFacetHits","typesenseFacetCounts","adaptedResult","facet","find","field_name","facetName","counts","map","facetCount","highlighted","_adaptHighlightTag","highlightPreTag","highlightPostTag","count","adapt","facetHits","facet_counts","exhaustiveFacetsCount","processingTimeMS","search_time_ms","assign","prototype","_objectWithoutProperties","_asyncToGenerator","_slicedToArray","_excluded","_regeneratorRuntime","SearchRequestAdapter","instantsearchRequests","typesenseClient","configuration","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","exactMatch","_adaptFacetFilters","facetFilters","transformedTypesenseFilters","item","Array","isArray","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","_this3$configuration$","_buildSearchParameters","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","q","query","facet_by","filter_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","searches","commonParams","_searches$2","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","get","_typeof","_toConsumableArray","_defineProperty","ownKeys","e","r","t","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread","getOwnPropertyDescriptors","defineProperties","defineProperty","SearchResponseAdapter","allTypesenseResponses","_adaptGroupedHits","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","metadataField","includes","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","attribute","matchLevel","matchedWords","highlights","matched_tokens","indices","k","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","index","indexOf","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","facetOrdering","order","Set","fc","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","isFinite","Math","ceil","SearchClient","TypesenseSearchClient","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","clearCache","search","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","sent","results","typesenseResult","_validateTypesenseResult","responseAdapter","adaptedResponse","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_callee2$","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","_x3","code","default"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense-instantsearch-adapter.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;ACVa;;AAAA;AAAA;AAEN,IAAME,aAAa;EACxB,SAAAA,cAAA,EAA0B;IAAA,IAAAC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IACpB,IAAMnO,MAAM,GAAG,IAAI,CAAC1D,iBAAiB,CAACuN,KAAK,GAAG,IAAI,CAACvN,iBAAiB,CAAC8R,cAAc,CAACpI,QAAQ;IAC5F,IAAIvE,MAAM,CAAC6M,QAAQ,CAACtO,MAAM,CAAC,EAAE;MAC3B,OAAOuO,IAAI,CAACC,IAAI,CAACxO,MAAM,CAAC;IAC1B,CAAC,MAAM;MACL,OAAO,CAAC;IACV;EACF;AACF,CAAC;;;;;;;;;;ACdD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAA0C;AAClD,QAAQ,oCAAO,UAAU;AAAA;AAAA;AAAA;AAAA,kGAAC;AAC1B,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;ACxSY;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,GAAG,oBAAoB,GAAG,cAAc;AACtD,+BAA+B,mBAAO,CAAC,4EAAoB;AAC3D,cAAc;AACd,qCAAqC,mBAAO,CAAC,wFAA0B;AACvE,oBAAoB;AACpB,0BAA0B,mBAAO,CAAC,kFAAoB;AACtD,cAAc;AACd,kBAAe,KAAK;AACpB;;;;;;;;;;;ACpCa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,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;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,wNAAwN;AACxN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,gEAAgE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,uCAAuC;AAC3G;AACA;AACA,oEAAoE,sIAAsI;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACxHa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,eAAe,mBAAO,CAAC,wEAAU;AACjC,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,iBAAiB,mBAAO,CAAC,sEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACjJa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACpEa;AACb;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,mBAAO,CAAC,yDAAU;AAC5C,eAAe,mBAAO,CAAC,wEAAU;AACjC;AACA;AACA;AACA;AACA;AACA,mCAAmC,0CAA0C;AAC7E,mCAAmC,0CAA0C;AAC7E,mCAAmC,mBAAmB,WAAW,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ia;AACb;AACA,4BAA4B,+D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b,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uGAAuG,aAAa,kBAAkB;AACtI,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA,2GAA2G,aAAa,kBAAkB;AAC1I;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,kCAAkC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B;AACnF;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB;AAC3E,oFAAoF,6BAA6B;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClMa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AAC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gB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ha;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,6BAA6B,mBAAO,CAAC,8FAAwB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC9Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;A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AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;ACdA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;ACzrGe;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJ+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;;ACF6E;AAC9D;AACf;AACA,eAAe,4EAA4B;AAC3C;AACA;AACA;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACXiD;AACY;AACY;AACtB;AACpC;AACf,SAAS,8DAAc,SAAS,oEAAoB,YAAY,0EAA0B,YAAY,+DAAe;AACrH;;;;;;;;;;;;;;;;;;;ACNuD;AACJ;AACsB;AAClB;AACxC;AACf,SAAS,iEAAiB,SAAS,+DAAe,SAAS,0EAA0B,SAAS,iEAAiB;AAC/G;;;;;;;;;;;;;;;;ACNkC;AACnB;AACf,kBAAkB,sDAAO;AACzB;AACA;AACA;AACA,oBAAoB,sDAAO;AAC3B;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVkC;AACS;AAC5B;AACf,UAAU,2DAAW;AACrB,qBAAqB,sDAAO;AAC5B;;;;;;;;;;;;;;;ACLe;AACf;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACRqD;AACtC;AACf;AACA,oCAAoC,gEAAgB;AACpD;AACA;AACA;AACA,sFAAsF,gEAAgB;AACtG;;;;;;UCRA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;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9F,IAAI,IAAI,CAAC8F,eAAe,CAACxB,YAAY,EAAE;QAC1D,MAAM,IAAI7R,KAAK,2BAAAwD,MAAA,CAA2B6P,eAAe,CAACiB,IAAI,SAAA9Q,MAAA,CAAM6P,eAAe,CAAC9P,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/ignored|/Users/jason/Programming/jprojs/typesense/typesense-instantsearch-adapter/node_modules/typesense/lib/Typesense|crypto","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/webpack/runtime/make namespace object","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true) {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __spreadArray = (this && this.__spreadArray) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["_classCallCheck","_createClass","Configuration","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","Object","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","value","validate","values","some","c","console","warn","Error","utils","FacetSearchResponseAdapter","typesenseResponse","instantsearchRequest","_adaptFacetHits","typesenseFacetCounts","adaptedResult","facet","find","field_name","facetName","counts","map","facetCount","highlighted","_adaptHighlightTag","highlightPreTag","highlightPostTag","count","adapt","facetHits","facet_counts","exhaustiveFacetsCount","processingTimeMS","search_time_ms","assign","prototype","_objectWithoutProperties","_asyncToGenerator","_slicedToArray","_excluded","_regeneratorRuntime","SearchRequestAdapter","instantsearchRequests","typesenseClient","configuration","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","exactMatch","_adaptFacetFilters","facetFilters","transformedTypesenseFilters","item","Array","isArray","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","_this3$configuration$","_buildSearchParameters","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","q","query","facet_by","filter_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","searches","commonParams","_searches$2","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","get","_typeof","_toConsumableArray","_defineProperty","ownKeys","e","r","t","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread","getOwnPropertyDescriptors","defineProperties","defineProperty","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","_adaptGroupedHits","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","includes","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","attribute","matchLevel","matchedWords","highlights","matched_tokens","indices","k","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","index","indexOf","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","facetOrdering","order","Set","fc","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","isFinite","Math","ceil","SearchClient","TypesenseSearchClient","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","clearCache","search","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","sent","results","typesenseResult","_validateTypesenseResult","responseAdapter","adaptedResponse","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_callee2$","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","_x3","code","default"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/typesense-instantsearch-adapter.min.js b/dist/typesense-instantsearch-adapter.min.js index c041fdf..a836df2 100644 --- a/dist/typesense-instantsearch-adapter.min.js +++ b/dist/typesense-instantsearch-adapter.min.js @@ -1,3 +1,3 @@ /*! For license information please see typesense-instantsearch-adapter.min.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TypesenseInstantSearchAdapter=e():t.TypesenseInstantSearchAdapter=e()}(self,(()=>(()=>{var t={3065:function(t,e,n){var r,o;!function(i,a){"use strict";r=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(e,n){for(var o=0;o=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(t){}}}(n),a.call(s,n,t),typeof console===e&&n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0},transformResponse:[function(t,e){var n=t;return void 0!==e&&"string"==typeof t&&e["content-type"]&&e["content-type"].startsWith("application/json")&&(n=JSON.parse(t)),n}]},!0!==_&&(g.timeout=1e3*h.connectionTimeoutSeconds),f&&0!==Object.keys(f).length&&(g.params=f),h.sendApiKeyAsQueryParam&&(g.params=g.params||{},g.params["x-typesense-api-key"]=h.apiKey),h.configuration.httpAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpAgent")),g.httpAgent=h.configuration.httpAgent),h.configuration.httpsAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpsAgent")),g.httpsAgent=h.configuration.httpsAgent),p&&("string"==typeof p&&0!==p.length||"object"==typeof p&&0!==Object.keys(p).length)&&(g.data=p),b&&(w=a.default.CancelToken,O=w.source(),v=function(){return O.cancel()},b.addEventListener("abort",v),g.cancelToken=O.token),[4,(0,a.default)(g)];case 2:if((S=o.sent()).status>=1&&S.status<=499&&h.setNodeHealthcheck(d,c),h.logger.debug("Request #".concat(n,": Request to Node ").concat(d.index," was made. Response Code was ").concat(S.status,".")),S.status>=200&&S.status<300)return[2,{value:Promise.resolve(S.data)}];if(S.status<500)return[2,{value:Promise.reject(h.customErrorForResponse(S,null===(i=S.data)||void 0===i?void 0:i.message))}];throw h.customErrorForResponse(S,null===(s=S.data)||void 0===s?void 0:s.message);case 3:return P=o.sent(),h.setNodeHealthcheck(d,!1),r=P,h.logger.warn("Request #".concat(n,": Request to Node ").concat(d.index,' failed due to "').concat(P.code," ").concat(P.message).concat(null==P.response?"":" - "+JSON.stringify(null===(u=P.response)||void 0===u?void 0:u.data),'"')),h.logger.warn("Request #".concat(n,": Sleeping for ").concat(h.retryIntervalSeconds,"s and then retrying request...")),[4,h.timer(h.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return b&&v&&b.removeEventListener("abort",v),[7];case 6:return[2]}}))},h=this,d=1,g.label=1;case 1:return d<=this.numRetriesPerRequest+1?[5,l(d)]:[3,4];case 2:if("object"==typeof(v=g.sent()))return[2,v.value];g.label=3;case 3:return d++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(r)]}}))}))},t.prototype.getNextNode=function(t){if(void 0===t&&(t=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(t,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(t,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(t,": Nodes Health: ").concat(this.nodes.map((function(t){return"Node ".concat(t.index," is ").concat(!0===t.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var e=this.nodes[0],n=0;n<=this.nodes.length;n++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(e=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(e,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(e.index)),e;return this.logger.debug("Request #".concat(t,": No healthy nodes were found. Returning the next node, Node ").concat(e.index)),e},t.prototype.nodeDueForHealthcheck=function(t,e){void 0===e&&(e=0);var n=Date.now()-t.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},t.prototype.initializeMetadataForNodes=function(){var t=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,c)),this.nodes.forEach((function(e,n){e.index=n,t.setNodeHealthcheck(e,c)}))},t.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},t.prototype.uriFor=function(t,e){return null!=e.url?"".concat(e.url).concat(t):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path).concat(t)},t.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},t.prototype.timer=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},t.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status);"string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e));var r=new u.default(n);return(r=400===t.status?new s.RequestMalformed(n):401===t.status?new s.RequestUnauthorized(n):404===t.status?new s.ObjectNotFound(n):409===t.status?new s.ObjectAlreadyExists(n):422===t.status?new s.ObjectUnprocessable(n):t.status>=500&&t.status<=599?new s.ServerError(n):new s.HTTPError(n)).httpStatus=t.status,r},t}();e.default=l},5641:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(7361)),s=r(n(2626)),u=r(n(612)),c=r(n(5300)),l=r(n(326)),f=r(n(2275)),h=r(n(3343)),p=r(n(657)),d=r(n(8231)),y=r(n(3684)),v=r(n(8621)),b=r(n(5156)),g=r(n(3777)),m=r(n(800)),w=r(n(3533)),_=r(n(4646)),O=r(n(8700)),S=r(n(8313)),P=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null!==(e=t.sendApiKeyAsQueryParam)&&void 0!==e&&e,this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new p.default(this.apiCall),this.health=new d.default(this.apiCall),this.operations=new y.default(this.apiCall),this.multiSearch=new v.default(this.apiCall,this.configuration),this._collections=new a.default(this.apiCall),this.individualCollections={},this._aliases=new u.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new b.default(this.apiCall),this.individualPresets={},this._stopwords=new w.default(this.apiCall),this.individualStopwords={},this.analytics=new m.default(this.apiCall),this._conversations=new O.default(this.apiCall),this.individualConversations={}}return t.prototype.collections=function(t){return void 0===t?this._collections:(void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.default(t,this.apiCall,this.configuration)),this.individualCollections[t])},t.prototype.aliases=function(t){return void 0===t?this._aliases:(void 0===this.individualAliases[t]&&(this.individualAliases[t]=new c.default(t,this.apiCall)),this.individualAliases[t])},t.prototype.keys=function(t){return void 0===t?this._keys:(void 0===this.individualKeys[t]&&(this.individualKeys[t]=new f.default(t,this.apiCall)),this.individualKeys[t])},t.prototype.presets=function(t){return void 0===t?this._presets:(void 0===this.individualPresets[t]&&(this.individualPresets[t]=new g.default(t,this.apiCall)),this.individualPresets[t])},t.prototype.stopwords=function(t){return void 0===t?this._stopwords:(void 0===this.individualStopwords[t]&&(this.individualStopwords[t]=new _.default(t,this.apiCall)),this.individualStopwords[t])},t.prototype.conversations=function(t){return void 0===t?this._conversations:(void 0===this.individualConversations[t]&&(this.individualConversations[t]=new S.default(t,this.apiCall)),this.individualConversations[t])},t}();e.default=P},2626:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0;n--){var r=Math.floor(Math.random()*(n+1));e=[t[r],t[n]],t[n]=e[0],t[r]=e[1]}},t}();e.default=c},8313:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)throw new s.ImportError("".concat(o.length-i.length," documents imported successfully, ").concat(i.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,r]}}))}))},e.prototype.export=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t)]}))}))},e.prototype.exportStream=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t,{responseType:"stream"})]}))}))},e}(n(6124).SearchOnlyDocuments);e.default=u},2144:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8331:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.importResults=n,r}return o(e,t),e}(i(n(7796)).default);e.default=a},2426:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6731:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8280:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},2703:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8274:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6909:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},1081:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},7796:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.name=n.name,Object.setPrototypeOf(r,n.prototype),r}return r(e,t),e}(Error);e.default=o},4410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImportError=e.TypesenseError=e.ServerError=e.RequestUnauthorized=e.RequestMalformed=e.ObjectUnprocessable=e.ObjectNotFound=e.ObjectAlreadyExists=e.MissingConfigurationError=e.HTTPError=void 0;var o=r(n(2144));e.HTTPError=o.default;var i=r(n(2426));e.MissingConfigurationError=i.default;var a=r(n(6731));e.ObjectAlreadyExists=a.default;var s=r(n(8280));e.ObjectNotFound=s.default;var u=r(n(2703));e.ObjectUnprocessable=u.default;var c=r(n(8274));e.RequestMalformed=c.default;var l=r(n(6909));e.RequestUnauthorized=l.default;var f=r(n(1081));e.ServerError=f.default;var h=r(n(8331));e.ImportError=h.default;var p=r(n(7796));e.TypesenseError=p.default},8231:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]c&&(v=this.responseCache.keys().next().value,this.responseCache.delete(v)),this.responsePromiseCache.size>c&&(v=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(v)),[2,y]}}))}))},t}();e.default=i},8557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(8621)),s=n(7112),u=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null===(e=t.sendApiKeyAsQueryParam)||void 0===e||e,!0===t.sendApiKeyAsQueryParam&&(t.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),t.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return t.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(t){t[0],t[1].documents().clearCache()}))},t.prototype.collections=function(t){if(t)return void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.SearchOnlyCollection(t,this.apiCall,this.configuration)),this.individualCollections[t];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},t}();e.default=u},7112:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchOnlyCollection=void 0;var r=n(6124),o=function(){function t(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return t.prototype.documents=function(){return this._documents},t}();e.SearchOnlyCollection=o},6124:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{},4633:(t,e,n)=>{var r=n(3738).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new N(r||[]);return s(i,"_invoke",{value:j(t,n,a)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",v="suspendedYield",b="executing",g="completed",m={};function w(){}function _(){}function O(){}var S={};h(S,c,(function(){return this}));var P=Object.getPrototypeOf,E=P&&P(P(F([])));E&&E!==i&&a.call(E,c)&&(S=E);var C=O.prototype=w.prototype=Object.create(S);function x(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(o,i,s,u){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var o=y;return function(i,a){if(o===b)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=T(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=b;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},3738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:(t,e,n)=>{var r=n(4633)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6425:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(s=Object.create(null),t=>{const e=o.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const u=t=>(t=t.toLowerCase(),e=>a(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,f=c("undefined"),h=u("ArrayBuffer"),p=c("string"),d=c("function"),y=c("number"),v=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=u("Date"),m=u("File"),w=u("Blob"),_=u("FileList"),O=u("URLSearchParams");function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,o=t.length;r0;)if(r=n[o],e===r.toLowerCase())return r;return null}const E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,C=t=>!f(t)&&t!==E,x=(R="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>R&&t instanceof R);var R;const j=u("HTMLFormElement"),T=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),k=u("RegExp"),A=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};S(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},N="abcdefghijklmnopqrstuvwxyz",F="0123456789",M={DIGIT:F,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+F},U=u("AsyncFunction");var q={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:b,isUndefined:f,isDate:g,isFile:m,isBlob:w,isRegExp:k,isFunction:d,isStream:t=>v(t)&&d(t.pipe),isURLSearchParams:O,isTypedArray:x,isFileList:_,forEach:S,merge:function t(){const{caseless:e}=C(this)&&this||{},n={},r=(r,o)=>{const i=e&&P(n,o)||o;b(n[i])&&b(r)?n[i]=t(n[i],r):b(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t(S(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)s=o[a],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:A,freezeMethods:t=>{A(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:P,global:E,isContextDefined:C,ALPHABET:M,generateString:(t=16,e=M.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=l(t)?[]:{};return S(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:U,isThenable:t=>t&&(v(t)||d(t))&&d(t.then)&&d(t.catch)};function D(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}q.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const H=D.prototype,L={};function I(t){return q.isPlainObject(t)||q.isArray(t)}function B(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function G(t,e,n){return t?t.concat(e).map((function(t,e){return t=B(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{L[t]={value:t}})),Object.defineProperties(D,L),Object.defineProperty(H,"isAxiosError",{value:!0}),D.from=(t,e,n,r,o,i)=>{const a=Object.create(H);return q.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),D.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const V=q.toFlatObject(q,{},null,(function(t){return/^is[A-Z]/.test(t)}));function W(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!q.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(q.isDate(t))return t.toISOString();if(!s&&q.isBlob(t))throw new D("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(t)||q.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,o){let s=t;if(t&&!o&&"object"==typeof t)if(q.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(q.isArray(t)&&function(t){return q.isArray(t)&&!t.some(I)}(t)||(q.isFileList(t)||q.endsWith(n,"[]"))&&(s=q.toArray(t)))return n=B(n),s.forEach((function(t,r){!q.isUndefined(t)&&null!==t&&e.append(!0===a?G([n],r,i):null===a?n:n+"[]",u(t))})),!1;return!!I(t)||(e.append(G(o,n,i),u(t)),!1)}const l=[],f=Object.assign(V,{defaultVisitor:c,convertValue:u,isVisitable:I});if(!q.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!q.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),q.forEach(n,(function(n,i){!0===(!(q.isUndefined(n)||null===n)&&o.call(e,n,q.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function K(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function z(t,e){this._pairs=[],t&&W(t,this,e)}const J=z.prototype;function Q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||Q,o=n&&n.serialize;let i;if(i=o?o(e,n):q.isURLSearchParams(e)?e.toString():new z(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}J.append=function(t,e){this._pairs.push([t,e])},J.toString=function(t){const e=t?function(e){return t.call(this,e,K)}:K;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var $=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const tt="undefined"!=typeof window&&"undefined"!=typeof document,et=(nt="undefined"!=typeof navigator&&navigator.product,tt&&["ReactNative","NativeScript","NS"].indexOf(nt)<0);var nt;const rt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ot={...Object.freeze({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:rt,hasStandardBrowserEnv:et}),...Z};function it(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&q.isArray(r)?r.length:i,s?(q.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&q.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&q.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r{e(function(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const at={transitional:Y,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return r?JSON.stringify(it(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return W(t,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return ot.isNode&&q.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return W(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(q.isString(t))try{return(0,JSON.parse)(t),q.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||at.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&q.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw D.from(t,D.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],(t=>{at.headers[t]={}}));var st=at;const ut=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ct=Symbol("internals");function lt(t){return t&&String(t).trim().toLowerCase()}function ft(t){return!1===t||null==t?t:q.isArray(t)?t.map(ft):String(t)}function ht(t,e,n,r,o){return q.isFunction(r)?r.call(this,e,n):(o&&(e=n),q.isString(e)?q.isString(r)?-1!==e.indexOf(r):q.isRegExp(r)?r.test(e):void 0:void 0)}class pt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=lt(e);if(!o)throw new Error("header name must be a non-empty string");const i=q.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=ft(t))}const i=(t,e)=>q.forEach(t,((t,n)=>o(t,n,e)));return q.isPlainObject(t)||t instanceof this.constructor?i(t,e):q.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&ut[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=lt(t)){const n=q.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(q.isFunction(e))return e.call(this,t,n);if(q.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=lt(t)){const n=q.findKey(this,t);return!(!n||void 0===this[n]||e&&!ht(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=lt(t)){const o=q.findKey(n,t);!o||e&&!ht(0,n[o],o,e)||(delete n[o],r=!0)}}return q.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!ht(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return q.forEach(this,((r,o)=>{const i=q.findKey(n,o);if(i)return e[i]=ft(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=ft(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return q.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&q.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ct]=this[ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=lt(t);e[r]||(function(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return q.isArray(t)?t.forEach(r):r(t),this}}pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(pt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),q.freezeMethods(pt);var dt=pt;function yt(t,e){const n=this||st,r=e||n,o=dt.from(r.headers);let i=r.data;return q.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function vt(t){return!(!t||!t.__CANCEL__)}function bt(t,e,n){D.call(this,null==t?"canceled":t,D.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(bt,D,{__CANCEL__:!0});var gt=ot.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),q.isString(r)&&a.push("path="+r),q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var wt=ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=q.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function _t(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Ot={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=dt.from(t.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(q.isFormData(r))if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=mt(t.baseURL,t.url);function h(){if(!l)return;const r=dt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),c()}),(function(t){n(t),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new D("Request aborted",D.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new D("Network Error",D.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Y;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new D(e,r.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,l)),l=null},ot.hasStandardBrowserEnv&&(u&&q.isFunction(u)&&(u=u(t)),u||!1!==u&&wt(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&>.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&q.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),q.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",_t(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new bt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);p&&-1===ot.protocols.indexOf(p)?n(new D("Unsupported protocol "+p+":",D.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};q.forEach(Ot,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St=t=>`- ${t}`,Pt=t=>q.isFunction(t)||null===t||!1===t;var Et=t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new D("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(St).join("\n"):" "+St(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ct(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new bt(null,t)}function xt(t){return Ct(t),t.headers=dt.from(t.headers),t.data=yt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Et(t.adapter||st.adapter)(t).then((function(e){return Ct(t),e.data=yt.call(t,t.transformResponse,e),e.headers=dt.from(e.headers),e}),(function(e){return vt(e)||(Ct(t),e&&e.response&&(e.response.data=yt.call(t,t.transformResponse,e.response),e.response.headers=dt.from(e.response.headers))),Promise.reject(e)}))}const Rt=t=>t instanceof dt?{...t}:t;function jt(t,e){e=e||{};const n={};function r(t,e,n){return q.isPlainObject(t)&&q.isPlainObject(e)?q.merge.call({caseless:n},t,e):q.isPlainObject(e)?q.merge({},e):q.isArray(e)?e.slice():e}function o(t,e,n){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!q.isUndefined(e))return r(void 0,e)}function a(t,e){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=u[r]||o,a=i(t[r],e[r],r);q.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Tt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Tt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const kt={};Tt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new D(r(o," has been removed"+(e?" in "+e:"")),D.ERR_DEPRECATED);return e&&!kt[o]&&(kt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};var At={assertOptions:function(t,e,n){if("object"!=typeof t)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new D("option "+i+" must be "+n,D.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}},validators:Tt};const Nt=At.validators;class Ft{constructor(t){this.defaults=t,this.interceptors={request:new $,response:new $}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&At.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),null!=r&&(q.isFunction(r)?e.paramsSerializer={serialize:r}:At.assertOptions(r,{encode:Nt.function,serialize:Nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&q.merge(o.common,o[e.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=dt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[xt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new bt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Ut((function(e){t=e})),cancel:t}}}var qt=Ut;const Dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dt).forEach((([t,e])=>{Dt[e]=t}));var Ht=Dt;const Lt=function t(e){const n=new Mt(e),o=r(Mt.prototype.request,n);return q.extend(o,Mt.prototype,n,{allOwnKeys:!0}),q.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(jt(e,n))},o}(st);Lt.Axios=Mt,Lt.CanceledError=bt,Lt.CancelToken=qt,Lt.isCancel=vt,Lt.VERSION="1.6.8",Lt.toFormData=W,Lt.AxiosError=D,Lt.Cancel=Lt.CanceledError,Lt.all=function(t){return Promise.all(t)},Lt.spread=function(t){return function(e){return t.apply(null,e)}},Lt.isAxiosError=function(t){return q.isObject(t)&&!0===t.isAxiosError},Lt.mergeConfig=jt,Lt.AxiosHeaders=dt,Lt.formToJSON=t=>it(q.isHTMLForm(t)?new FormData(t):t),Lt.getAdapter=Et,Lt.HttpStatusCode=Ht,Lt.default=Lt,t.exports=Lt}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";function t(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}function i(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){a(i,r,o,s,u,"next",t)}function u(t){a(i,r,o,s,u,"throw",t)}s(void 0)}))}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;nj});var f=n(4756),h=n.n(f),p=function(){return l((function t(){var e,n,r,o,i,a,s,c,l,f,h,p,d,y,v,b,g,m,w,_,O=this,S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,t),this.server=S.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(e=this.server.cacheSearchResultsForSeconds)&&void 0!==e?e:120,this.additionalSearchParameters=null!==(n=S.additionalSearchParameters)&&void 0!==n?n:{},this.additionalSearchParameters.query_by=null!==(r=null!==(o=this.additionalSearchParameters.queryBy)&&void 0!==o?o:this.additionalSearchParameters.query_by)&&void 0!==r?r:"",this.additionalSearchParameters.preset=null!==(i=null!==(a=this.additionalSearchParameters.preset)&&void 0!==a?a:this.additionalSearchParameters.preset)&&void 0!==i?i:"",this.additionalSearchParameters.sort_by=null!==(s=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==s?s:"",this.additionalSearchParameters.highlight_full_fields=null!==(l=null!==(f=this.additionalSearchParameters.highlightFullFields)&&void 0!==f?f:this.additionalSearchParameters.highlight_full_fields)&&void 0!==l?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=S.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=S.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=S.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=O.collectionSpecificSearchParameters[t];s.query_by=null!==(e=s.queryBy)&&void 0!==e?e:s.query_by,s.preset=null!==(n=s.preset)&&void 0!==n?n:s.preset,s.sort_by=null!==(r=s.sortBy)&&void 0!==r?r:s.sort_by,s.highlight_full_fields=null!==(o=null!==(i=null!==(a=s.highlightFullFields)&&void 0!==a?a:s.highlight_full_fields)&&void 0!==i?i:O.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:s.query_by,Object.keys(s).forEach((function(t){return void 0===s[t]?delete s[t]:{}}))})),this.renderingContent=S.renderingContent,this.flattenGroupedHits=null===(y=S.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=S.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(b=S.filterByOptions)&&void 0!==b?b:{},this.sortByOptions=null!==(g=S.sortByOptions)&&void 0!==g?g:{},this.collectionSpecificFacetByOptions=null!==(m=S.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(w=S.collectionSpecificFilterByOptions)&&void 0!==w?w:{},this.collectionSpecificSortByOptions=null!==(_=S.collectionSpecificSortByOptions)&&void 0!==_?_:{}}),[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(t){return t.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(t){return 0===(t.query_by||"").length&&0===(t.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])}(),d=n(8567);function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(r).join(",")));var o=Object.keys(r)[0],i=r[o].reduce((function(t,e){return e.startsWith("-")&&!n._isNumber(e)?t[0].push(e.substring(1)):t[1].push(e),t}),[[],[]]),a=b(i,2),s=a[0],u=a[1],c=[];if(u.length>0){var l=n._shouldUseExactMatchForField(o,e)?":=":":";c.push("".concat(o).concat(l,"[").concat(u.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}if(s.length>0){var f=n._shouldUseExactMatchForField(o,e)?":!=":":!";c.push("".concat(o).concat(f,"[").concat(s.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}return c.filter((function(t){return t})).join(" && ")}var h,p=n._parseFacetFilter(t),d=p.fieldName,y=p.fieldValue;if(y.startsWith("-")&&!n._isNumber(y)){var v=n._shouldUseExactMatchForField(d,e)?":!=":":!";h="".concat(d).concat(v,"[").concat(n._escapeFacetValue(y.substring(1)),"]")}else{var g=n._shouldUseExactMatchForField(d,e)?":=":":";h="".concat(d).concat(g,"[").concat(n._escapeFacetValue(y),"]")}return h})).join(" && "):r}},{key:"_parseFacetFilter",value:function(t){var e,n,r,o,i;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(r=t.match(n)))return{fieldName:o="".concat(r[1]),fieldValue:i="".concat(r[2])}}return n=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(r[1]).concat(r[2]),i="".concat(r[3])),{fieldName:o,fieldValue:i}}},{key:"_escapeFacetValue",value:function(t){return"boolean"==typeof t||"true"===t||"false"===t||this._isNumber(t)?t:"`".concat(t,"`")}},{key:"_isNumber",value:function(t){return Number.isInteger(t%1)||!!(t%1)}},{key:"_adaptNumericFilters",value:function(t){var e=this,n="";if(!t)return n;var r={};t.forEach((function(t){var n=e._parseNumericFilter(t),o=n.fieldName,i=n.operator,a=n.fieldValue;r[o]=r[o]||{},r[o][i]=a}));var o=[];return Object.keys(r).forEach((function(t){null!=r[t]["<="]&&null!=r[t][">="]?o.push("".concat(t,":=[").concat(r[t][">="],"..").concat(r[t]["<="],"]")):null!=r[t]["<="]?o.push("".concat(t,":<=").concat(r[t]["<="])):null!=r[t][">="]?o.push("".concat(t,":>=").concat(r[t][">="])):null!=r[t]["="]?o.push("".concat(t,":=").concat(r[t]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(r[t])))})),o.join(" && ")}},{key:"_parseNumericFilter",value:function(t){var e,n,r,o,i,a;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(r=t.match(n))){var u=b(r,4);return{fieldName:o=u[1],operator:i=u[2],fieldValue:a=u[3]}}}if(n=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var c=b(r,4);o=c[1],i=c[2],a=c[3]}return{fieldName:o,operator:i,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(t){var e=t.insideBoundingBox,n=t.aroundRadius,r=t.aroundLatLng,o=t.insidePolygon;if(e){var i,a,s,u;if(Array.isArray(e)){var c=b(e.flat(),4);i=c[0],a=c[1],s=c[2],u=c[3]}else{var l=b(e.split(","),4);i=l[0],a=l[1],s=l[2],u=l[3]}return"".concat(this.configuration.geoLocationField,":(").concat(i,", ").concat(a,", ").concat(i,", ").concat(u,", ").concat(s,", ").concat(u,", ").concat(s,", ").concat(a,")")}if(r||n){if(!n||"all"===n)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var f="".concat(parseFloat(n)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(r,", ").concat(f,")")}if(o){var h=o;return Array.isArray(o)&&(h=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(h,")")}}},{key:"_adaptFilters",value:function(t,e){var n=[];return t.filters&&n.push(t.filters),n.push(this._adaptFacetFilters(t.facetFilters,e)),n.push(this._adaptNumericFilters(t.numericFilters)),n.push(this._adaptGeoFilter(t)),n.filter((function(t){return t&&""!==t})).join(" && ")}},{key:"_adaptIndexName",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(t,e){var n=this;return[t].flat().map((function(t){var r;return null!==(r=n.configuration.collectionSpecificFacetByOptions)&&void 0!==r&&null!==(r=r[e])&&void 0!==r&&r[t]?"".concat(t).concat(n.configuration.collectionSpecificFacetByOptions[e][t]):n.configuration.facetByOptions[t]?"".concat(t).concat(n.configuration.facetByOptions[t]):t})).join(",")}},{key:"_buildSearchParameters",value:function(t){for(var e,n,r=t.params,o=t.indexName,i=this._adaptIndexName(o),a={},s=0,u=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]);var e}();function w(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _={_adaptHighlightTag:function(t,e,n){return t.replace(new RegExp("","g"),e||"").replace(new RegExp("","g"),n||"")},_adaptNumberOfPages:function(){var t=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(t)?Math.ceil(t):1}};function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:[];u(this,t),this.typesenseResponse=e,this.instantsearchRequest=n,this.configuration=r,this.allTypesenseResponses=o}),[{key:"_adaptGroupedHits",value:function(t){var e=this,n=[];return n=t.map((function(t){var n=e._adaptHits(t.hits);return n.forEach((function(e){e.group_key=e._group_key=t.group_key,t.found&&(e._group_found=t.found)})),n})),this.configuration.flattenGroupedHits?n.flat():n.map((function(t){return S(S({},t[0]),{},{_grouped_hits:t})}))}},{key:"_adaptHits",value:function(t){var e=this;return t.map((function(t){var n=S({},t.document);n.objectID=t.document.id,n._snippetResult=e._adaptHighlightResult(t,"snippet"),n._highlightResult=e._adaptHighlightResult(t,"value"),n._rawTypesenseHit=t,["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(e){Object.keys(t).includes(e)&&!Object.keys(n).includes(e)&&(n[e]=t[e])}));var r=n[e.configuration.geoLocationField];return r&&(n._geoloc={lat:r[0],lng:r[1]}),n}))}},{key:"_adaptHighlightResult",value:function(t,e){var n={};return null!=t.highlight&&this.isHighlightPost0240RCN32Format(t.highlight)?this.adaptHighlightObject(t,n,e):this.adaptHighlightsArray(t,n,e),n}},{key:"isHighlightPost0240RCN32Format",value:function(t){return null==t.full&&null==t.snippet}},{key:"adaptHighlightsArray",value:function(t,n,r){var o=this;Object.assign.apply(Object,[n].concat(w(Object.entries(t.document).map((function(t){var e=b(t,2);return i({},e[0],{value:e[1],matchLevel:"none",matchedWords:[]})}))))),t.highlights.forEach((function(t){n[t.field]={value:t[r]||t["".concat(r,"s")],matchLevel:"full",matchedWords:t.matched_tokens},t.indices&&(n[t.field].matchedIndices=t.indices)})),Object.entries(n).forEach((function(i){var a=b(i,2),s=a[0],u=a[1],c=s,l=u.value,f=u.matchLevel,h=u.matchedWords,p=u.matchedIndices;null==l?n[c]=o._adaptHighlightNullValue():Array.isArray(l)?(n[c]=[],t.document[c].forEach((function(t,i){p&&p.includes(i)?n[c].push({value:o._adaptHighlightTag("".concat(l[p.indexOf(i)]),o.instantsearchRequest.params.highlightPreTag,o.instantsearchRequest.params.highlightPostTag),matchLevel:f,matchedWords:h[i]}):"object"===e(t)?n[c].push(o._adaptHighlightInObjectValue(t,{},r)):n[c].push({value:"".concat(t),matchLevel:"none",matchedWords:[]})}))):"object"===e(l)?n[c]=o._adaptHighlightInObjectValue(l,{},r):n[c].value=o._adaptHighlightTag("".concat(l),o.instantsearchRequest.params.highlightPreTag,o.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(t,e,n){Object.assign(e,this._adaptHighlightInObjectValue(t.document,t.highlight,n))}},{key:"_adaptHighlightInObjectValue",value:function(t,n,r){var o=this;return Object.assign.apply(Object,[{}].concat(w(Object.entries(t).map((function(t){var a,s=b(t,2),u=s[0],c=s[1];if(null==c)a=o._adaptHighlightNullValue();else if(Array.isArray(c)){var l;a=o._adaptHighlightInArrayValue(c,null!==(l=null==n?void 0:n[u])&&void 0!==l?l:[],r)}else if("object"===e(c)){var f;a=o._adaptHighlightInObjectValue(c,null!==(f=null==n?void 0:n[u])&&void 0!==f?f:{},r)}else a=o._adaptHighlightInPrimitiveValue(c,null==n?void 0:n[u],r);return i({},u,a)})))))}},{key:"_adaptHighlightInArrayValue",value:function(t,n,r){var o=this;return t.map((function(t,i){var a;if(null==t)a=o._adaptHighlightNullValue();else if(Array.isArray(t)){var s;a=o._adaptHighlightInArrayValue(t,null!==(s=null==n?void 0:n[i])&&void 0!==s?s:[],r)}else if("object"===e(t)){var u;a=o._adaptHighlightInObjectValue(t,null!==(u=null==n?void 0:n[i])&&void 0!==u?u:{},r)}else a=o._adaptHighlightInPrimitiveValue(t,null==n?void 0:n[i],r);return a}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(t,e,n){var r,o;return null!=e?{value:this._adaptHighlightTag("".concat(null!==(r=null!==(o=e[n])&&void 0!==o?o:e.highlight)&&void 0!==r?r:e.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(e.matched_tokens||[]).length>0?"full":"none",matchedWords:e.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(t),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(t){var e={};return t.forEach((function(t){Object.assign(e,i({},t.field_name,Object.assign.apply(Object,[{}].concat(w(t.counts.map((function(t){return i({},t.value,t.count)})))))))})),e}},{key:"_adaptFacetStats",value:function(t){var e={};return t.forEach((function(t){Object.keys(t.stats).length>0&&Object.assign(e,i({},t.field_name,t.stats))})),e}},{key:"_adaptRenderingContent",value:function(t){var e,n=Object.assign({},this.configuration.renderingContent);return null==(null===(e=n.facetOrdering)||void 0===e||null===(e=e.facets)||void 0===e?void 0:e.order)&&(n.facetOrdering=n.facetOrdering||{},n.facetOrdering.facets=n.facetOrdering.facets||{},n.facetOrdering.facets.order=w(new Set(t.map((function(t){return t.field_name})).concat(this.allTypesenseResponses.map((function(t){return t.facet_counts||[]})).flat().map((function(t){return t.field_name})).filter((function(t){return t})))))),n}},{key:"adapt",value:function(){var t=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]);return S({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(t).length>0?{renderingContent:t}:null)}}])}();Object.assign(P.prototype,_);var E=function(){return l((function t(e,n){u(this,t),this.typesenseResponse=e,this.instantsearchRequest=n}),[{key:"_adaptFacetHits",value:function(t){var e=this;return t.find((function(t){return t.field_name===e.instantsearchRequest.params.facetName})).counts.map((function(t){return{value:t.value,highlighted:e._adaptHighlightTag(t.highlighted,e.instantsearchRequest.params.highlightPreTag,e.instantsearchRequest.params.highlightPostTag),count:t.count}}))}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])}();Object.assign(E.prototype,_);var C=["results"];function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(t){for(var e=1;e(()=>{var t={3065:function(t,e,n){var r,o;!function(i,a){"use strict";r=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(e,n){for(var o=0;o=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(t){}}}(n),a.call(s,n,t),typeof console===e&&n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0},transformResponse:[function(t,e){var n=t;return void 0!==e&&"string"==typeof t&&e["content-type"]&&e["content-type"].startsWith("application/json")&&(n=JSON.parse(t)),n}]},!0!==_&&(g.timeout=1e3*h.connectionTimeoutSeconds),f&&0!==Object.keys(f).length&&(g.params=f),h.sendApiKeyAsQueryParam&&(g.params=g.params||{},g.params["x-typesense-api-key"]=h.apiKey),h.configuration.httpAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpAgent")),g.httpAgent=h.configuration.httpAgent),h.configuration.httpsAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpsAgent")),g.httpsAgent=h.configuration.httpsAgent),p&&("string"==typeof p&&0!==p.length||"object"==typeof p&&0!==Object.keys(p).length)&&(g.data=p),b&&(w=a.default.CancelToken,O=w.source(),v=function(){return O.cancel()},b.addEventListener("abort",v),g.cancelToken=O.token),[4,(0,a.default)(g)];case 2:if((S=o.sent()).status>=1&&S.status<=499&&h.setNodeHealthcheck(d,c),h.logger.debug("Request #".concat(n,": Request to Node ").concat(d.index," was made. Response Code was ").concat(S.status,".")),S.status>=200&&S.status<300)return[2,{value:Promise.resolve(S.data)}];if(S.status<500)return[2,{value:Promise.reject(h.customErrorForResponse(S,null===(i=S.data)||void 0===i?void 0:i.message))}];throw h.customErrorForResponse(S,null===(s=S.data)||void 0===s?void 0:s.message);case 3:return P=o.sent(),h.setNodeHealthcheck(d,!1),r=P,h.logger.warn("Request #".concat(n,": Request to Node ").concat(d.index,' failed due to "').concat(P.code," ").concat(P.message).concat(null==P.response?"":" - "+JSON.stringify(null===(u=P.response)||void 0===u?void 0:u.data),'"')),h.logger.warn("Request #".concat(n,": Sleeping for ").concat(h.retryIntervalSeconds,"s and then retrying request...")),[4,h.timer(h.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return b&&v&&b.removeEventListener("abort",v),[7];case 6:return[2]}}))},h=this,d=1,g.label=1;case 1:return d<=this.numRetriesPerRequest+1?[5,l(d)]:[3,4];case 2:if("object"==typeof(v=g.sent()))return[2,v.value];g.label=3;case 3:return d++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(r)]}}))}))},t.prototype.getNextNode=function(t){if(void 0===t&&(t=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(t,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(t,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(t,": Nodes Health: ").concat(this.nodes.map((function(t){return"Node ".concat(t.index," is ").concat(!0===t.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var e=this.nodes[0],n=0;n<=this.nodes.length;n++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(e=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(e,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(e.index)),e;return this.logger.debug("Request #".concat(t,": No healthy nodes were found. Returning the next node, Node ").concat(e.index)),e},t.prototype.nodeDueForHealthcheck=function(t,e){void 0===e&&(e=0);var n=Date.now()-t.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},t.prototype.initializeMetadataForNodes=function(){var t=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,c)),this.nodes.forEach((function(e,n){e.index=n,t.setNodeHealthcheck(e,c)}))},t.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},t.prototype.uriFor=function(t,e){return null!=e.url?"".concat(e.url).concat(t):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path).concat(t)},t.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},t.prototype.timer=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},t.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status);"string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e));var r=new u.default(n);return(r=400===t.status?new s.RequestMalformed(n):401===t.status?new s.RequestUnauthorized(n):404===t.status?new s.ObjectNotFound(n):409===t.status?new s.ObjectAlreadyExists(n):422===t.status?new s.ObjectUnprocessable(n):t.status>=500&&t.status<=599?new s.ServerError(n):new s.HTTPError(n)).httpStatus=t.status,r},t}();e.default=l},5641:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(7361)),s=r(n(2626)),u=r(n(612)),c=r(n(5300)),l=r(n(326)),f=r(n(2275)),h=r(n(3343)),p=r(n(657)),d=r(n(8231)),y=r(n(3684)),v=r(n(8621)),b=r(n(5156)),g=r(n(3777)),m=r(n(800)),w=r(n(3533)),_=r(n(4646)),O=r(n(8700)),S=r(n(8313)),P=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null!==(e=t.sendApiKeyAsQueryParam)&&void 0!==e&&e,this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new p.default(this.apiCall),this.health=new d.default(this.apiCall),this.operations=new y.default(this.apiCall),this.multiSearch=new v.default(this.apiCall,this.configuration),this._collections=new a.default(this.apiCall),this.individualCollections={},this._aliases=new u.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new b.default(this.apiCall),this.individualPresets={},this._stopwords=new w.default(this.apiCall),this.individualStopwords={},this.analytics=new m.default(this.apiCall),this._conversations=new O.default(this.apiCall),this.individualConversations={}}return t.prototype.collections=function(t){return void 0===t?this._collections:(void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.default(t,this.apiCall,this.configuration)),this.individualCollections[t])},t.prototype.aliases=function(t){return void 0===t?this._aliases:(void 0===this.individualAliases[t]&&(this.individualAliases[t]=new c.default(t,this.apiCall)),this.individualAliases[t])},t.prototype.keys=function(t){return void 0===t?this._keys:(void 0===this.individualKeys[t]&&(this.individualKeys[t]=new f.default(t,this.apiCall)),this.individualKeys[t])},t.prototype.presets=function(t){return void 0===t?this._presets:(void 0===this.individualPresets[t]&&(this.individualPresets[t]=new g.default(t,this.apiCall)),this.individualPresets[t])},t.prototype.stopwords=function(t){return void 0===t?this._stopwords:(void 0===this.individualStopwords[t]&&(this.individualStopwords[t]=new _.default(t,this.apiCall)),this.individualStopwords[t])},t.prototype.conversations=function(t){return void 0===t?this._conversations:(void 0===this.individualConversations[t]&&(this.individualConversations[t]=new S.default(t,this.apiCall)),this.individualConversations[t])},t}();e.default=P},2626:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0;n--){var r=Math.floor(Math.random()*(n+1));e=[t[r],t[n]],t[n]=e[0],t[r]=e[1]}},t}();e.default=c},8313:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)throw new s.ImportError("".concat(o.length-i.length," documents imported successfully, ").concat(i.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,r]}}))}))},e.prototype.export=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t)]}))}))},e.prototype.exportStream=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t,{responseType:"stream"})]}))}))},e}(n(6124).SearchOnlyDocuments);e.default=u},2144:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8331:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.importResults=n,r}return o(e,t),e}(i(n(7796)).default);e.default=a},2426:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6731:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8280:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},2703:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8274:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6909:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},1081:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},7796:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.name=n.name,Object.setPrototypeOf(r,n.prototype),r}return r(e,t),e}(Error);e.default=o},4410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImportError=e.TypesenseError=e.ServerError=e.RequestUnauthorized=e.RequestMalformed=e.ObjectUnprocessable=e.ObjectNotFound=e.ObjectAlreadyExists=e.MissingConfigurationError=e.HTTPError=void 0;var o=r(n(2144));e.HTTPError=o.default;var i=r(n(2426));e.MissingConfigurationError=i.default;var a=r(n(6731));e.ObjectAlreadyExists=a.default;var s=r(n(8280));e.ObjectNotFound=s.default;var u=r(n(2703));e.ObjectUnprocessable=u.default;var c=r(n(8274));e.RequestMalformed=c.default;var l=r(n(6909));e.RequestUnauthorized=l.default;var f=r(n(1081));e.ServerError=f.default;var h=r(n(8331));e.ImportError=h.default;var p=r(n(7796));e.TypesenseError=p.default},8231:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]c&&(v=this.responseCache.keys().next().value,this.responseCache.delete(v)),this.responsePromiseCache.size>c&&(v=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(v)),[2,y]}}))}))},t}();e.default=i},8557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(8621)),s=n(7112),u=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null===(e=t.sendApiKeyAsQueryParam)||void 0===e||e,!0===t.sendApiKeyAsQueryParam&&(t.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),t.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return t.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(t){t[0],t[1].documents().clearCache()}))},t.prototype.collections=function(t){if(t)return void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.SearchOnlyCollection(t,this.apiCall,this.configuration)),this.individualCollections[t];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},t}();e.default=u},7112:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchOnlyCollection=void 0;var r=n(6124),o=function(){function t(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return t.prototype.documents=function(){return this._documents},t}();e.SearchOnlyCollection=o},6124:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{},4633:(t,e,n)=>{var r=n(3738).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new N(r||[]);return s(i,"_invoke",{value:j(t,n,a)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",v="suspendedYield",b="executing",g="completed",m={};function w(){}function _(){}function O(){}var S={};h(S,c,(function(){return this}));var P=Object.getPrototypeOf,E=P&&P(P(F([])));E&&E!==i&&a.call(E,c)&&(S=E);var C=O.prototype=w.prototype=Object.create(S);function x(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(o,i,s,u){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var o=y;return function(i,a){if(o===b)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=T(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=b;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},3738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:(t,e,n)=>{var r=n(4633)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6425:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(s=Object.create(null),t=>{const e=o.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const u=t=>(t=t.toLowerCase(),e=>a(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,f=c("undefined"),h=u("ArrayBuffer"),p=c("string"),d=c("function"),y=c("number"),v=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=u("Date"),m=u("File"),w=u("Blob"),_=u("FileList"),O=u("URLSearchParams");function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,o=t.length;r0;)if(r=n[o],e===r.toLowerCase())return r;return null}const E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,C=t=>!f(t)&&t!==E,x=(R="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>R&&t instanceof R);var R;const j=u("HTMLFormElement"),T=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),k=u("RegExp"),A=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};S(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},N="abcdefghijklmnopqrstuvwxyz",F="0123456789",M={DIGIT:F,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+F},U=u("AsyncFunction");var q={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:b,isUndefined:f,isDate:g,isFile:m,isBlob:w,isRegExp:k,isFunction:d,isStream:t=>v(t)&&d(t.pipe),isURLSearchParams:O,isTypedArray:x,isFileList:_,forEach:S,merge:function t(){const{caseless:e}=C(this)&&this||{},n={},r=(r,o)=>{const i=e&&P(n,o)||o;b(n[i])&&b(r)?n[i]=t(n[i],r):b(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t(S(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)s=o[a],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:A,freezeMethods:t=>{A(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:P,global:E,isContextDefined:C,ALPHABET:M,generateString:(t=16,e=M.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=l(t)?[]:{};return S(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:U,isThenable:t=>t&&(v(t)||d(t))&&d(t.then)&&d(t.catch)};function H(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}q.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const L=H.prototype,D={};function I(t){return q.isPlainObject(t)||q.isArray(t)}function B(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function G(t,e,n){return t?t.concat(e).map((function(t,e){return t=B(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{D[t]={value:t}})),Object.defineProperties(H,D),Object.defineProperty(L,"isAxiosError",{value:!0}),H.from=(t,e,n,r,o,i)=>{const a=Object.create(L);return q.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),H.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const V=q.toFlatObject(q,{},null,(function(t){return/^is[A-Z]/.test(t)}));function W(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!q.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(q.isDate(t))return t.toISOString();if(!s&&q.isBlob(t))throw new H("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(t)||q.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,o){let s=t;if(t&&!o&&"object"==typeof t)if(q.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(q.isArray(t)&&function(t){return q.isArray(t)&&!t.some(I)}(t)||(q.isFileList(t)||q.endsWith(n,"[]"))&&(s=q.toArray(t)))return n=B(n),s.forEach((function(t,r){!q.isUndefined(t)&&null!==t&&e.append(!0===a?G([n],r,i):null===a?n:n+"[]",u(t))})),!1;return!!I(t)||(e.append(G(o,n,i),u(t)),!1)}const l=[],f=Object.assign(V,{defaultVisitor:c,convertValue:u,isVisitable:I});if(!q.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!q.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),q.forEach(n,(function(n,i){!0===(!(q.isUndefined(n)||null===n)&&o.call(e,n,q.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function K(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function z(t,e){this._pairs=[],t&&W(t,this,e)}const J=z.prototype;function Q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||Q,o=n&&n.serialize;let i;if(i=o?o(e,n):q.isURLSearchParams(e)?e.toString():new z(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}J.append=function(t,e){this._pairs.push([t,e])},J.toString=function(t){const e=t?function(e){return t.call(this,e,K)}:K;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var $=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const tt="undefined"!=typeof window&&"undefined"!=typeof document,et=(nt="undefined"!=typeof navigator&&navigator.product,tt&&["ReactNative","NativeScript","NS"].indexOf(nt)<0);var nt;const rt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ot={...Object.freeze({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:rt,hasStandardBrowserEnv:et}),...Z};function it(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&q.isArray(r)?r.length:i,s?(q.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&q.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&q.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r{e(function(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const at={transitional:Y,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return r?JSON.stringify(it(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return W(t,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return ot.isNode&&q.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return W(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(q.isString(t))try{return(0,JSON.parse)(t),q.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||at.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&q.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw H.from(t,H.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],(t=>{at.headers[t]={}}));var st=at;const ut=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ct=Symbol("internals");function lt(t){return t&&String(t).trim().toLowerCase()}function ft(t){return!1===t||null==t?t:q.isArray(t)?t.map(ft):String(t)}function ht(t,e,n,r,o){return q.isFunction(r)?r.call(this,e,n):(o&&(e=n),q.isString(e)?q.isString(r)?-1!==e.indexOf(r):q.isRegExp(r)?r.test(e):void 0:void 0)}class pt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=lt(e);if(!o)throw new Error("header name must be a non-empty string");const i=q.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=ft(t))}const i=(t,e)=>q.forEach(t,((t,n)=>o(t,n,e)));return q.isPlainObject(t)||t instanceof this.constructor?i(t,e):q.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&ut[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=lt(t)){const n=q.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(q.isFunction(e))return e.call(this,t,n);if(q.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=lt(t)){const n=q.findKey(this,t);return!(!n||void 0===this[n]||e&&!ht(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=lt(t)){const o=q.findKey(n,t);!o||e&&!ht(0,n[o],o,e)||(delete n[o],r=!0)}}return q.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!ht(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return q.forEach(this,((r,o)=>{const i=q.findKey(n,o);if(i)return e[i]=ft(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=ft(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return q.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&q.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ct]=this[ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=lt(t);e[r]||(function(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return q.isArray(t)?t.forEach(r):r(t),this}}pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(pt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),q.freezeMethods(pt);var dt=pt;function yt(t,e){const n=this||st,r=e||n,o=dt.from(r.headers);let i=r.data;return q.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function vt(t){return!(!t||!t.__CANCEL__)}function bt(t,e,n){H.call(this,null==t?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(bt,H,{__CANCEL__:!0});var gt=ot.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),q.isString(r)&&a.push("path="+r),q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var wt=ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=q.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function _t(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Ot={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=dt.from(t.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(q.isFormData(r))if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=mt(t.baseURL,t.url);function h(){if(!l)return;const r=dt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),c()}),(function(t){n(t),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new H("Request aborted",H.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new H("Network Error",H.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Y;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new H(e,r.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,l)),l=null},ot.hasStandardBrowserEnv&&(u&&q.isFunction(u)&&(u=u(t)),u||!1!==u&&wt(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&>.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&q.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),q.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",_t(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new bt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);p&&-1===ot.protocols.indexOf(p)?n(new H("Unsupported protocol "+p+":",H.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};q.forEach(Ot,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St=t=>`- ${t}`,Pt=t=>q.isFunction(t)||null===t||!1===t;var Et=t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new H("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(St).join("\n"):" "+St(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ct(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new bt(null,t)}function xt(t){return Ct(t),t.headers=dt.from(t.headers),t.data=yt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Et(t.adapter||st.adapter)(t).then((function(e){return Ct(t),e.data=yt.call(t,t.transformResponse,e),e.headers=dt.from(e.headers),e}),(function(e){return vt(e)||(Ct(t),e&&e.response&&(e.response.data=yt.call(t,t.transformResponse,e.response),e.response.headers=dt.from(e.response.headers))),Promise.reject(e)}))}const Rt=t=>t instanceof dt?{...t}:t;function jt(t,e){e=e||{};const n={};function r(t,e,n){return q.isPlainObject(t)&&q.isPlainObject(e)?q.merge.call({caseless:n},t,e):q.isPlainObject(e)?q.merge({},e):q.isArray(e)?e.slice():e}function o(t,e,n){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!q.isUndefined(e))return r(void 0,e)}function a(t,e){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=u[r]||o,a=i(t[r],e[r],r);q.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Tt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Tt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const kt={};Tt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new H(r(o," has been removed"+(e?" in "+e:"")),H.ERR_DEPRECATED);return e&&!kt[o]&&(kt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};var At={assertOptions:function(t,e,n){if("object"!=typeof t)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new H("option "+i+" must be "+n,H.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new H("Unknown option "+i,H.ERR_BAD_OPTION)}},validators:Tt};const Nt=At.validators;class Ft{constructor(t){this.defaults=t,this.interceptors={request:new $,response:new $}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&At.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),null!=r&&(q.isFunction(r)?e.paramsSerializer={serialize:r}:At.assertOptions(r,{encode:Nt.function,serialize:Nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&q.merge(o.common,o[e.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=dt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[xt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new bt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Ut((function(e){t=e})),cancel:t}}}var qt=Ut;const Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((([t,e])=>{Ht[e]=t}));var Lt=Ht;const Dt=function t(e){const n=new Mt(e),o=r(Mt.prototype.request,n);return q.extend(o,Mt.prototype,n,{allOwnKeys:!0}),q.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(jt(e,n))},o}(st);Dt.Axios=Mt,Dt.CanceledError=bt,Dt.CancelToken=qt,Dt.isCancel=vt,Dt.VERSION="1.6.8",Dt.toFormData=W,Dt.AxiosError=H,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=function(t){return function(e){return t.apply(null,e)}},Dt.isAxiosError=function(t){return q.isObject(t)&&!0===t.isAxiosError},Dt.mergeConfig=jt,Dt.AxiosHeaders=dt,Dt.formToJSON=t=>it(q.isHTMLForm(t)?new FormData(t):t),Dt.getAdapter=Et,Dt.HttpStatusCode=Lt,Dt.default=Dt,t.exports=Dt}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e){for(var n=0;nC});var c=n(4756),l=n.n(c),f=function(){return u((function t(){var e,n,r,i,a,s,u,c,l,f,h,p,d,y,v,b,g,m,w,_,O=this,S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.server=S.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(e=this.server.cacheSearchResultsForSeconds)&&void 0!==e?e:120,this.additionalSearchParameters=null!==(n=S.additionalSearchParameters)&&void 0!==n?n:{},this.additionalSearchParameters.query_by=null!==(r=null!==(i=this.additionalSearchParameters.queryBy)&&void 0!==i?i:this.additionalSearchParameters.query_by)&&void 0!==r?r:"",this.additionalSearchParameters.preset=null!==(a=null!==(s=this.additionalSearchParameters.preset)&&void 0!==s?s:this.additionalSearchParameters.preset)&&void 0!==a?a:"",this.additionalSearchParameters.sort_by=null!==(u=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==u?u:"",this.additionalSearchParameters.highlight_full_fields=null!==(l=null!==(f=this.additionalSearchParameters.highlightFullFields)&&void 0!==f?f:this.additionalSearchParameters.highlight_full_fields)&&void 0!==l?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=S.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=S.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=S.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=O.collectionSpecificSearchParameters[t];s.query_by=null!==(e=s.queryBy)&&void 0!==e?e:s.query_by,s.preset=null!==(n=s.preset)&&void 0!==n?n:s.preset,s.sort_by=null!==(r=s.sortBy)&&void 0!==r?r:s.sort_by,s.highlight_full_fields=null!==(o=null!==(i=null!==(a=s.highlightFullFields)&&void 0!==a?a:s.highlight_full_fields)&&void 0!==i?i:O.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:s.query_by,Object.keys(s).forEach((function(t){return void 0===s[t]?delete s[t]:{}}))})),this.renderingContent=S.renderingContent,this.flattenGroupedHits=null===(y=S.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=S.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(b=S.filterByOptions)&&void 0!==b?b:{},this.sortByOptions=null!==(g=S.sortByOptions)&&void 0!==g?g:{},this.collectionSpecificFacetByOptions=null!==(m=S.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(w=S.collectionSpecificFilterByOptions)&&void 0!==w?w:{},this.collectionSpecificSortByOptions=null!==(_=S.collectionSpecificSortByOptions)&&void 0!==_?_:{}}),[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(t){return t.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(t){return 0===(t.query_by||"").length&&0===(t.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])}(),h=n(8567);function p(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(r).join(",")));var o=Object.keys(r)[0],i=r[o].reduce((function(t,e){return e.startsWith("-")&&!n._isNumber(e)?t[0].push(e.substring(1)):t[1].push(e),t}),[[],[]]),a=v(i,2),s=a[0],u=a[1],c=[];if(u.length>0){var l=n._shouldUseExactMatchForField(o,e)?":=":":";c.push("".concat(o).concat(l,"[").concat(u.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}if(s.length>0){var f=n._shouldUseExactMatchForField(o,e)?":!=":":!";c.push("".concat(o).concat(f,"[").concat(s.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}return c.filter((function(t){return t})).join(" && ")}var h,p=n._parseFacetFilter(t),d=p.fieldName,y=p.fieldValue;if(y.startsWith("-")&&!n._isNumber(y)){var b=n._shouldUseExactMatchForField(d,e)?":!=":":!";h="".concat(d).concat(b,"[").concat(n._escapeFacetValue(y.substring(1)),"]")}else{var g=n._shouldUseExactMatchForField(d,e)?":=":":";h="".concat(d).concat(g,"[").concat(n._escapeFacetValue(y),"]")}return h})).join(" && "):r}},{key:"_parseFacetFilter",value:function(t){var e,n,r,o,i;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(r=t.match(n)))return{fieldName:o="".concat(r[1]),fieldValue:i="".concat(r[2])}}return n=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(r[1]).concat(r[2]),i="".concat(r[3])),{fieldName:o,fieldValue:i}}},{key:"_escapeFacetValue",value:function(t){return"boolean"==typeof t||"true"===t||"false"===t||this._isNumber(t)?t:"`".concat(t,"`")}},{key:"_isNumber",value:function(t){return Number.isInteger(t%1)||!!(t%1)}},{key:"_adaptNumericFilters",value:function(t){var e=this,n="";if(!t)return n;var r={};t.forEach((function(t){var n=e._parseNumericFilter(t),o=n.fieldName,i=n.operator,a=n.fieldValue;r[o]=r[o]||{},r[o][i]=a}));var o=[];return Object.keys(r).forEach((function(t){null!=r[t]["<="]&&null!=r[t][">="]?o.push("".concat(t,":=[").concat(r[t][">="],"..").concat(r[t]["<="],"]")):null!=r[t]["<="]?o.push("".concat(t,":<=").concat(r[t]["<="])):null!=r[t][">="]?o.push("".concat(t,":>=").concat(r[t][">="])):null!=r[t]["="]?o.push("".concat(t,":=").concat(r[t]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(r[t])))})),o.join(" && ")}},{key:"_parseNumericFilter",value:function(t){var e,n,r,o,i,a;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(r=t.match(n))){var u=v(r,4);return{fieldName:o=u[1],operator:i=u[2],fieldValue:a=u[3]}}}if(n=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var c=v(r,4);o=c[1],i=c[2],a=c[3]}return{fieldName:o,operator:i,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(t){var e=t.insideBoundingBox,n=t.aroundRadius,r=t.aroundLatLng,o=t.insidePolygon;if(e){var i,a,s,u;if(Array.isArray(e)){var c=v(e.flat(),4);i=c[0],a=c[1],s=c[2],u=c[3]}else{var l=v(e.split(","),4);i=l[0],a=l[1],s=l[2],u=l[3]}return"".concat(this.configuration.geoLocationField,":(").concat(i,", ").concat(a,", ").concat(i,", ").concat(u,", ").concat(s,", ").concat(u,", ").concat(s,", ").concat(a,")")}if(r||n){if(!n||"all"===n)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var f="".concat(parseFloat(n)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(r,", ").concat(f,")")}if(o){var h=o;return Array.isArray(o)&&(h=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(h,")")}}},{key:"_adaptFilters",value:function(t,e){var n=[];return t.filters&&n.push(t.filters),n.push(this._adaptFacetFilters(t.facetFilters,e)),n.push(this._adaptNumericFilters(t.numericFilters)),n.push(this._adaptGeoFilter(t)),n.filter((function(t){return t&&""!==t})).join(" && ")}},{key:"_adaptIndexName",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(t,e){var n=this;return[t].flat().map((function(t){var r;return null!==(r=n.configuration.collectionSpecificFacetByOptions)&&void 0!==r&&null!==(r=r[e])&&void 0!==r&&r[t]?"".concat(t).concat(n.configuration.collectionSpecificFacetByOptions[e][t]):n.configuration.facetByOptions[t]?"".concat(t).concat(n.configuration.facetByOptions[t]):t})).join(",")}},{key:"_buildSearchParameters",value:function(t){for(var e,n,r=t.params,o=t.indexName,i=this._adaptIndexName(o),a={},s=0,u=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]);var t}();function m(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _={_adaptHighlightTag:function(t,e,n){return t.replace(new RegExp("","g"),e||"").replace(new RegExp("","g"),n||"")},_adaptNumberOfPages:function(){var t=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(t)?Math.ceil(t):1}};function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n,this.configuration=r,this.allTypesenseResults=i,this.fullTypesenseResponse=a}),[{key:"_adaptGroupedHits",value:function(t){var e=this,n=[];return n=t.map((function(t){var n=e._adaptHits(t.hits);return n.forEach((function(e){e.group_key=e._group_key=t.group_key,t.found&&(e._group_found=t.found)})),n})),this.configuration.flattenGroupedHits?n.flat():n.map((function(t){return S(S({},t[0]),{},{_grouped_hits:t})}))}},{key:"_adaptHits",value:function(t){var e=this;return t.map((function(t){var n=S({},t.document);n.objectID=t.document.id,n._snippetResult=e._adaptHighlightResult(t,"snippet"),n._highlightResult=e._adaptHighlightResult(t,"value"),n._rawTypesenseHit=t,e.fullTypesenseResponse.conversation&&(n._rawTypesenseConversation=e.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(e){Object.keys(t).includes(e)&&!Object.keys(n).includes(e)&&(n[e]=t[e])}));var r=n[e.configuration.geoLocationField];return r&&(n._geoloc={lat:r[0],lng:r[1]}),n}))}},{key:"_adaptHighlightResult",value:function(t,e){var n={};return null!=t.highlight&&this.isHighlightPost0240RCN32Format(t.highlight)?this.adaptHighlightObject(t,n,e):this.adaptHighlightsArray(t,n,e),n}},{key:"isHighlightPost0240RCN32Format",value:function(t){return null==t.full&&null==t.snippet}},{key:"adaptHighlightsArray",value:function(t,e,n){var r=this;Object.assign.apply(Object,[e].concat(m(Object.entries(t.document).map((function(t){var e=v(t,2);return w({},e[0],{value:e[1],matchLevel:"none",matchedWords:[]})}))))),t.highlights.forEach((function(t){e[t.field]={value:t[n]||t["".concat(n,"s")],matchLevel:"full",matchedWords:t.matched_tokens},t.indices&&(e[t.field].matchedIndices=t.indices)})),Object.entries(e).forEach((function(o){var a=v(o,2),s=a[0],u=a[1],c=s,l=u.value,f=u.matchLevel,h=u.matchedWords,p=u.matchedIndices;null==l?e[c]=r._adaptHighlightNullValue():Array.isArray(l)?(e[c]=[],t.document[c].forEach((function(t,o){p&&p.includes(o)?e[c].push({value:r._adaptHighlightTag("".concat(l[p.indexOf(o)]),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag),matchLevel:f,matchedWords:h[o]}):"object"===i(t)?e[c].push(r._adaptHighlightInObjectValue(t,{},n)):e[c].push({value:"".concat(t),matchLevel:"none",matchedWords:[]})}))):"object"===i(l)?e[c]=r._adaptHighlightInObjectValue(l,{},n):e[c].value=r._adaptHighlightTag("".concat(l),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(t,e,n){Object.assign(e,this._adaptHighlightInObjectValue(t.document,t.highlight,n))}},{key:"_adaptHighlightInObjectValue",value:function(t,e,n){var r=this;return Object.assign.apply(Object,[{}].concat(m(Object.entries(t).map((function(t){var o,a=v(t,2),s=a[0],u=a[1];if(null==u)o=r._adaptHighlightNullValue();else if(Array.isArray(u)){var c;o=r._adaptHighlightInArrayValue(u,null!==(c=null==e?void 0:e[s])&&void 0!==c?c:[],n)}else if("object"===i(u)){var l;o=r._adaptHighlightInObjectValue(u,null!==(l=null==e?void 0:e[s])&&void 0!==l?l:{},n)}else o=r._adaptHighlightInPrimitiveValue(u,null==e?void 0:e[s],n);return w({},s,o)})))))}},{key:"_adaptHighlightInArrayValue",value:function(t,e,n){var r=this;return t.map((function(t,o){var a;if(null==t)a=r._adaptHighlightNullValue();else if(Array.isArray(t)){var s;a=r._adaptHighlightInArrayValue(t,null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],n)}else if("object"===i(t)){var u;a=r._adaptHighlightInObjectValue(t,null!==(u=null==e?void 0:e[o])&&void 0!==u?u:{},n)}else a=r._adaptHighlightInPrimitiveValue(t,null==e?void 0:e[o],n);return a}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(t,e,n){var r,o;return null!=e?{value:this._adaptHighlightTag("".concat(null!==(r=null!==(o=e[n])&&void 0!==o?o:e.highlight)&&void 0!==r?r:e.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(e.matched_tokens||[]).length>0?"full":"none",matchedWords:e.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(t),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(t){var e={};return t.forEach((function(t){Object.assign(e,w({},t.field_name,Object.assign.apply(Object,[{}].concat(m(t.counts.map((function(t){return w({},t.value,t.count)})))))))})),e}},{key:"_adaptFacetStats",value:function(t){var e={};return t.forEach((function(t){Object.keys(t.stats).length>0&&Object.assign(e,w({},t.field_name,t.stats))})),e}},{key:"_adaptRenderingContent",value:function(t){var e,n=Object.assign({},this.configuration.renderingContent);return null==(null===(e=n.facetOrdering)||void 0===e||null===(e=e.facets)||void 0===e?void 0:e.order)&&(n.facetOrdering=n.facetOrdering||{},n.facetOrdering.facets=n.facetOrdering.facets||{},n.facetOrdering.facets.order=m(new Set(t.map((function(t){return t.field_name})).concat(this.allTypesenseResults.map((function(t){return t.facet_counts||[]})).flat().map((function(t){return t.field_name})).filter((function(t){return t})))))),n}},{key:"adapt",value:function(){var t=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]);return S({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(t).length>0?{renderingContent:t}:null)}}])}();Object.assign(P.prototype,_);var E=function(){return u((function t(e,n){o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n}),[{key:"_adaptFacetHits",value:function(t){var e=this;return t.find((function(t){return t.field_name===e.instantsearchRequest.params.facetName})).counts.map((function(t){return{value:t.value,highlighted:e._adaptHighlightTag(t.highlighted,e.instantsearchRequest.params.highlightPreTag,e.instantsearchRequest.params.highlightPostTag),count:t.count}}))}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])}();Object.assign(E.prototype,_);var C=function(){return u((function t(e){var n=this;o(this,t),this.updateConfiguration(e),this.searchClient={clearCache:function(){return n.clearCache()},search:function(t){return n.searchTypesenseAndAdapt(t)},searchForFacetValues:function(t){return n.searchTypesenseForFacetValuesAndAdapt(t)}}}),[{key:"searchTypesenseAndAdapt",value:(r=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,r){return o._validateTypesenseResult(t),new P(t,e[r],o.configuration,n.results,n).adapt()})),t.abrupt("return",{results:r});case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return r.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(n=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,n){return o._validateTypesenseResult(t),new E(t,e[n],o.configuration).adapt()})),t.abrupt("return",r);case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return n.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(t=e(l().mark((function t(e){var n,r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new g(e,this.typesenseClient,this.configuration),t.next=3,n.request();case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new h.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(t){return this.configuration=new f(t),this.configuration.validate(),this.typesenseClient=new h.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(t){if(t.error)throw new Error("".concat(t.code," - ").concat(t.error));if(!t.hits&&!t.grouped_hits)throw new Error("Did not find any hits. ".concat(t.code," - ").concat(t.error))}}]);var t,n,r}()})(),r.default})())); //# sourceMappingURL=typesense-instantsearch-adapter.min.js.map \ No newline at end of file diff --git a/dist/typesense-instantsearch-adapter.min.js.map b/dist/typesense-instantsearch-adapter.min.js.map index 79cdb72..023cbdd 100644 --- a/dist/typesense-instantsearch-adapter.min.js.map +++ b/dist/typesense-instantsearch-adapter.min.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense-instantsearch-adapter.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuC,8BAAID,IAE3CD,EAAoC,8BAAIC,GACzC,CATD,CASGK,MAAM,sCCTT,SAMC,SAAUN,EAAMO,GACb,aAEI,EAMA,WAIJ,IAAIC,EAAO,WAAY,EACnBC,EAAgB,YAChBC,SAAeC,SAAWF,UAA0BE,OAAOC,YAAcH,GACzE,kBAAkBI,KAAKF,OAAOC,UAAUE,WAGxCC,EAAa,CACb,QACA,QACA,OACA,OACA,SAIJ,SAASC,EAAWC,EAAKC,GACrB,IAAIC,EAASF,EAAIC,GACjB,GAA2B,mBAAhBC,EAAOC,KACd,OAAOD,EAAOC,KAAKH,GAEnB,IACI,OAAOI,SAASC,UAAUF,KAAKG,KAAKJ,EAAQF,EAChD,CAAE,MAAOO,GAEL,OAAO,WACH,OAAOH,SAASC,UAAUG,MAAMA,MAAMN,EAAQ,CAACF,EAAKS,WACxD,CACJ,CAER,CAGA,SAASC,IACDC,QAAQC,MACJD,QAAQC,IAAIJ,MACZG,QAAQC,IAAIJ,MAAMG,QAASF,WAG3BL,SAASC,UAAUG,MAAMA,MAAMG,QAAQC,IAAK,CAACD,QAASF,aAG1DE,QAAQE,OAAOF,QAAQE,OAC/B,CAwBA,SAASC,EAAsBC,EAAOC,GAElC,IAAK,IAAIC,EAAI,EAAGA,EAAInB,EAAWoB,OAAQD,IAAK,CACxC,IAAIhB,EAAaH,EAAWmB,GAC5BE,KAAKlB,GAAegB,EAAIF,EACpBxB,EACA4B,KAAKC,cAAcnB,EAAYc,EAAOC,EAC9C,CAGAG,KAAKP,IAAMO,KAAKE,KACpB,CAIA,SAASC,EAAgCrB,EAAYc,EAAOC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,KAAK4mC,gBAAkB,IAAI6O,EAAAA,aAAsBz1C,KAAK2I,cAAc87B,SAC7D,CACT,GAAC,CAAArvB,IAAA,2BAAAnR,MAED,SAAyB0wC,GACvB,GAAIA,EAAgBtlC,MAClB,MAAM,IAAIjD,MAAM,GAADhF,OAAIutC,EAAgB3mC,KAAI,OAAA5G,OAAMutC,EAAgBtlC,QAE/D,IAAKslC,EAAgB3F,OAAS2F,EAAgB1B,aAC5C,MAAM,IAAI7mC,MAAM,0BAADhF,OAA2ButC,EAAgB3mC,KAAI,OAAA5G,OAAMutC,EAAgBtlC,OAExF,KA3BC,IAAA+lC,EAtBAJ,EA/BAT,CAgFA,CAzF+C","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __spreadArray = (this && this.__spreadArray) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true) {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest, configuration, allTypesenseResponses = []) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResponses = allTypesenseResponses;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResponses\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n );\n let adaptedResponse = {\n ...responseAdapter.adapt(),\n // eslint-disable-next-line no-unused-vars\n ...(({ results, ...o }) => o)(typesenseResponse), // All other keys in the response (like `conversation`)\n };\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","definition","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","log","trace","replaceLoggingMethods","level","loggerName","i","length","this","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","undefined","realMethod","Logger","name","defaultLevel","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","cookie","document","location","indexOf","encodeURIComponent","exec","slice","levels","getLevel","setLevel","persist","toUpperCase","SILENT","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","TypeError","logger","_log","noConflict","getLoggers","__createBinding","Object","create","o","m","k","k2","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","hasOwnProperty","__importDefault","Errors","SearchClient","Client","Client_1","default","SearchClient_1","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","done","then","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","op","pop","push","Aliases_1","Alias","apiCall","retrieve","_a","endpointPath","delete","concat","RESOURCEPATH","Aliases","upsert","mapping","put","aliasName","AnalyticsRules_1","AnalyticsRule_1","Analytics","individualAnalyticsRules","_analyticsRules","rules","id","AnalyticsRule","AnalyticsRules","params","operation","axios_1","Errors_1","TypesenseError_1","HEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_b","_c","abortSignal","_d","responseType","_e","performRequest","post","bodyParameters","patch","requestType","_f","_g","_h","_j","_k","skipConnectionTimeout","requestNumber","lastException","_loop_1","this_1","numTries","state_1","_l","validate","Date","now","node","abortListener","requestOptions","cancelToken","source_1","response","error_1","_m","getNextNode","index","aborted","Error","url","uriFor","headers","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","httpsAgent","CancelToken","source","cancel","addEventListener","token","setNodeHealthcheck","customErrorForResponse","message","warn","code","timer","removeEventListener","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_this","forEach","protocol","host","port","path","seconds","setTimeout","messageFromServer","errorMessage","trim","error","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","httpStatus","Configuration_1","ApiCall_1","Collections_1","Collection_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","Stopwords_1","Stopword_1","Conversations_1","Conversation_1","options","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","collections","collectionName","aliases","presets","stopwords","conversations","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","update","schema","exists","e_1","documents","documentId","Document","overrides","overrideId","synonyms","synonymId","Collections","__assign","s","p","Configuration","setDefaultPathInNode","setDefaultPortInNode","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","MissingConfigurationError","isNodeMissingAnyParameters","some","every","key","masterNode","readReplicaNodes","array","j","Math","floor","random","Conversation","ConversationModels_1","ConversationModel","ConversationModels","ConversationModel_1","Conversations","individualConversationModels","_conversationsModels","models","Debug","partialDocument","extendStatics","__extends","d","b","setPrototypeOf","__proto__","Array","String","__","constructor","Documents","_super","action","query","createMany","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","isArray","RangeError","includes","split","r","filter","success","ImportError","export","exportStream","SearchOnlyDocuments","importResults","TypesenseError","_newTarget","HTTPError_1","MissingConfigurationError_1","ObjectAlreadyExists_1","ObjectNotFound_1","ObjectUnprocessable_1","RequestMalformed_1","RequestUnauthorized_1","ServerError_1","ImportError_1","Health","Key","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","createHmac","keyPrefix","substr","rawScopedKey","toString","Metrics","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","clearCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","cacheResponseForSeconds","Operations","operationName","Override","Overrides","Preset","presetId","Presets","__spreadArray","to","pack","ar","l","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","requestTimestamp","set","size","SearchOnlyCollection_1","entries","SearchOnlyCollection","SearchOnlyDocuments_1","search","searchParameters","Stopword","stopwordId","Stopwords","Synonym","Synonyms","_typeof","_regeneratorRuntime","a","c","asyncIterator","u","toStringTag","wrap","Generator","Context","makeInvokeMethod","tryCatch","type","arg","h","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","values","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","async","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","fn","kindOf","cache","thing","str","toLowerCase","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","utils$1","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","position","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","p1","p2","toFiniteNumber","defaultValue","Number","isFinite","global","generateString","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","target","reducedValue","isThenable","catch","AxiosError","config","request","captureStackTrace","toJSON","description","number","fileName","lineNumber","columnNumber","prototype$1","isVisitable","removeBrackets","renderKey","dots","customProps","axiosError","cause","predicates","toFormData","formData","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","isFlatArray","el","exposedHelpers","build","encode$1","charMap","match","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","synchronous","runWhen","eject","clear","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","freeze","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","defaults","transitional","adapter","transformRequest","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","stringifySafely","JSONRequested","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","common","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","tokens","tokensRE","parseTokens","has","matcher","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","first","computed","accessor","accessors","defineAccessor","accessorName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","write","expires","domain","secure","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","hash","hostname","pathname","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","unsubscribe","signal","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","abort","subscribe","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","validators$1","deprecatedWarnings","validator","version","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$1","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","_objectWithoutProperties","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","toPropertyKey","toPrimitive","_defineProperty","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","args","_classCallCheck","Constructor","_defineProperties","_createClass","protoProps","staticProps","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","server","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_slicedToArray","_excluded","SearchRequestAdapter","instantsearchRequests","typesenseClient","fieldName","_this$configuration$c","_this$configuration$f","exactMatch","facetFilters","adaptedResult","item","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","_fieldValues$reduce","reduce","_isNumber","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","_shouldUseExactMatchForField","_escapeFacetValue","typesenseFilterString","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","isInteger","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches4","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl2","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","instantsearchParams","filters","_adaptFacetFilters","_adaptNumericFilters","_adaptGeoFilter","indexName","INDEX_NAME_MATCHING_REGEX","facets","_this3","facet","_this3$configuration$","instantsearchRequest","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","_adaptIndexName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","_adaptSortBy","q","facet_by","_adaptFacetBy","filter_by","_adaptFilters","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_callee","_searches$","searches","_searches$2","conversation","conversation_id","conversation_model_id","_this4","_context","_buildSearchParameters","searchParams","_toConsumableArray","iter","utils","_adaptHighlightTag","highlightPreTag","highlightPostTag","_adaptNumberOfPages","typesenseResponse","found","request_params","ceil","ownKeys","_objectSpread","SearchResponseAdapter","allTypesenseResponses","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","objectID","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","metadataField","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","matchLevel","matchedWords","highlights","matched_tokens","indices","attribute","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","adaptedValue","_ref7","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","typesenseFacetCounts","field_name","counts","count","stats","_adaptedResult$facetO","facetOrdering","order","Set","fc","facet_counts","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","FacetSearchResponseAdapter","find","facetCount","highlighted","facetHits","_adaptFacetHits","exhaustiveFacetsCount","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","results","typesenseResult","_validateTypesenseResult","adapt","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_context3","_x3","TypesenseSearchClient"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense-instantsearch-adapter.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuC,8BAAID,IAE3CD,EAAoC,8BAAIC,GACzC,CATD,CASGK,MAAM,sCCTT,SAMC,SAAUN,EAAMO,GACb,aAEI,EAMA,WAIJ,IAAIC,EAAO,WAAY,EACnBC,EAAgB,YAChBC,SAAeC,SAAWF,UAA0BE,OAAOC,YAAcH,GACzE,kBAAkBI,KAAKF,OAAOC,UAAUE,WAGxCC,EAAa,CACb,QACA,QACA,OACA,OACA,SAIJ,SAASC,EAAWC,EAAKC,GACrB,IAAIC,EAASF,EAAIC,GACjB,GAA2B,mBAAhBC,EAAOC,KACd,OAAOD,EAAOC,KAAKH,GAEnB,IACI,OAAOI,SAASC,UAAUF,KAAKG,KAAKJ,EAAQF,EAChD,CAAE,MAAOO,GAEL,OAAO,WACH,OAAOH,SAASC,UAAUG,MAAMA,MAAMN,EAAQ,CAACF,EAAKS,WACxD,CACJ,CAER,CAGA,SAASC,IACDC,QAAQC,MACJD,QAAQC,IAAIJ,MACZG,QAAQC,IAAIJ,MAAMG,QAASF,WAG3BL,SAASC,UAAUG,MAAMA,MAAMG,QAAQC,IAAK,CAACD,QAASF,aAG1DE,QAAQE,OAAOF,QAAQE,OAC/B,CAwBA,SAASC,EAAsBC,EAAOC,GAElC,IAAK,IAAIC,EAAI,EAAGA,EAAInB,EAAWoB,OAAQD,IAAK,CACxC,IAAIhB,EAAaH,EAAWmB,GAC5BE,KAAKlB,GAAegB,EAAIF,EACpBxB,EACA4B,KAAKC,cAAcnB,EAAYc,EAAOC,EAC9C,CAGAG,KAAKP,IAAMO,KAAKE,KACpB,CAIA,SAASC,EAAgCrB,EAAYc,EAAOC,G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wC,EAAiB,IAAI/O,EAAqBC,EAAuB1mC,KAAK2mC,gBAAiB3mC,KAAK2I,eAAc8sC,EAAAlwC,KAAA,EAChFiwC,EAAeptB,UAAS,OAAjC,OAAjBgmB,EAAiBqH,EAAAtvC,KAAAsvC,EAAAt2B,OAAA,SAChBivB,GAAiB,wBAAAqH,EAAAj1B,OAAA,GAAA+0B,EAAA,UACzB,SAAAG,GAAA,OAAAJ,EAAAj2C,MAAA,KAAAC,UAAA,KAAA8V,IAAA,aAAAnR,MAED,WAEE,OADAjE,KAAK2mC,gBAAkB,IAAIgP,EAAAA,aAAsB31C,KAAK2I,cAAcu7B,QAC7DlkC,KAAKq0C,YACd,GAAC,CAAAj/B,IAAA,sBAAAnR,MAED,SAAoBgN,GAIlB,OAHAjR,KAAK2I,cAAgB,IAAI0L,EAAcpD,GACvCjR,KAAK2I,cAAc2C,WACnBtL,KAAK2mC,gBAAkB,IAAIgP,EAAAA,aAAsB31C,KAAK2I,cAAcu7B,SAC7D,CACT,GAAC,CAAA9uB,IAAA,2BAAAnR,MAED,SAAyB4wC,GACvB,GAAIA,EAAgBxlC,MAClB,MAAM,IAAIjD,MAAM,GAADhF,OAAIytC,EAAgB7mC,KAAI,OAAA5G,OAAMytC,EAAgBxlC,QAE/D,IAAKwlC,EAAgB5F,OAAS4F,EAAgB1B,aAC5C,MAAM,IAAI/mC,MAAM,0BAADhF,OAA2BytC,EAAgB7mC,KAAI,OAAA5G,OAAMytC,EAAgBxlC,OAExF,KA3BC,IAAAimC,EAtBAJ,EA5BAT,CA6EA,CAtF+C","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var 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 return function (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})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __spreadArray = (this && this.__spreadArray) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true) {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","definition","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","log","trace","replaceLoggingMethods","level","loggerName","i","length","this","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","undefined","realMethod","Logger","name","defaultLevel","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","cookie","document","location","indexOf","encodeURIComponent","exec","slice","levels","getLevel","setLevel","persist","toUpperCase","SILENT","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","TypeError","logger","_log","noConflict","getLoggers","__createBinding","Object","create","o","m","k","k2","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","hasOwnProperty","__importDefault","Errors","SearchClient","Client","Client_1","default","SearchClient_1","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","done","then","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","op","pop","push","Aliases_1","Alias","apiCall","retrieve","_a","endpointPath","delete","concat","RESOURCEPATH","Aliases","upsert","mapping","put","aliasName","AnalyticsRules_1","AnalyticsRule_1","Analytics","individualAnalyticsRules","_analyticsRules","rules","id","AnalyticsRule","AnalyticsRules","params","operation","axios_1","Errors_1","TypesenseError_1","HEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_b","_c","abortSignal","_d","responseType","_e","performRequest","post","bodyParameters","patch","requestType","_f","_g","_h","_j","_k","skipConnectionTimeout","requestNumber","lastException","_loop_1","this_1","numTries","state_1","_l","validate","Date","now","node","abortListener","requestOptions","cancelToken","source_1","response","error_1","_m","getNextNode","index","aborted","Error","url","uriFor","headers","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","httpsAgent","CancelToken","source","cancel","addEventListener","token","setNodeHealthcheck","customErrorForResponse","message","warn","code","timer","removeEventListener","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_this","forEach","protocol","host","port","path","seconds","setTimeout","messageFromServer","errorMessage","trim","error","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","httpStatus","Configuration_1","ApiCall_1","Collections_1","Collection_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","Stopwords_1","Stopword_1","Conversations_1","Conversation_1","options","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","collections","collectionName","aliases","presets","stopwords","conversations","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","update","schema","exists","e_1","documents","documentId","Document","overrides","overrideId","synonyms","synonymId","Collections","__assign","s","p","Configuration","setDefaultPathInNode","setDefaultPortInNode","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","MissingConfigurationError","isNodeMissingAnyParameters","some","every","key","masterNode","readReplicaNodes","array","j","Math","floor","random","Conversation","ConversationModels_1","ConversationModel","ConversationModels","ConversationModel_1","Conversations","individualConversationModels","_conversationsModels","models","Debug","partialDocument","extendStatics","__extends","d","b","setPrototypeOf","__proto__","Array","String","__","constructor","Documents","_super","action","query","createMany","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","isArray","RangeError","includes","split","r","filter","success","ImportError","export","exportStream","SearchOnlyDocuments","importResults","TypesenseError","_newTarget","HTTPError_1","MissingConfigurationError_1","ObjectAlreadyExists_1","ObjectNotFound_1","ObjectUnprocessable_1","RequestMalformed_1","RequestUnauthorized_1","ServerError_1","ImportError_1","Health","Key","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","createHmac","keyPrefix","substr","rawScopedKey","toString","Metrics","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","clearCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","cacheResponseForSeconds","Operations","operationName","Override","Overrides","Preset","presetId","Presets","__spreadArray","to","pack","ar","l","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","requestTimestamp","set","size","SearchOnlyCollection_1","entries","SearchOnlyCollection","SearchOnlyDocuments_1","search","searchParameters","Stopword","stopwordId","Stopwords","Synonym","Synonyms","_typeof","_regeneratorRuntime","a","c","asyncIterator","u","toStringTag","wrap","Generator","Context","makeInvokeMethod","tryCatch","type","arg","h","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","values","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","async","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","fn","kindOf","cache","thing","str","toLowerCase","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","utils$1","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","position","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","p1","p2","toFiniteNumber","defaultValue","Number","isFinite","global","generateString","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","target","reducedValue","isThenable","catch","AxiosError","config","request","captureStackTrace","toJSON","description","number","fileName","lineNumber","columnNumber","prototype$1","isVisitable","removeBrackets","renderKey","dots","customProps","axiosError","cause","predicates","toFormData","formData","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","isFlatArray","el","exposedHelpers","build","encode$1","charMap","match","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","synchronous","runWhen","eject","clear","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","freeze","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","defaults","transitional","adapter","transformRequest","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","stringifySafely","JSONRequested","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","common","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","tokens","tokensRE","parseTokens","has","matcher","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","first","computed","accessor","accessors","defineAccessor","accessorName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","write","expires","domain","secure","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","hash","hostname","pathname","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","unsubscribe","signal","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","abort","subscribe","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","validators$1","deprecatedWarnings","validator","version","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$1","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","args","_classCallCheck","Constructor","toPropertyKey","toPrimitive","_defineProperties","_createClass","protoProps","staticProps","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","server","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","_objectWithoutProperties","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_slicedToArray","_excluded","SearchRequestAdapter","instantsearchRequests","typesenseClient","fieldName","_this$configuration$c","_this$configuration$f","exactMatch","facetFilters","adaptedResult","item","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","_fieldValues$reduce","reduce","_isNumber","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","_shouldUseExactMatchForField","_escapeFacetValue","typesenseFilterString","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","isInteger","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches4","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl2","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","instantsearchParams","filters","_adaptFacetFilters","_adaptNumericFilters","_adaptGeoFilter","indexName","INDEX_NAME_MATCHING_REGEX","facets","_this3","facet","_this3$configuration$","instantsearchRequest","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","_adaptIndexName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","_adaptSortBy","q","facet_by","_adaptFacetBy","filter_by","_adaptFilters","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_callee","_searches$","searches","_searches$2","conversation","conversation_id","conversation_model_id","_this4","_context","_buildSearchParameters","searchParams","_toConsumableArray","iter","_defineProperty","utils","_adaptHighlightTag","highlightPreTag","highlightPostTag","_adaptNumberOfPages","typesenseResponse","found","request_params","ceil","ownKeys","_objectSpread","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","objectID","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","matchLevel","matchedWords","highlights","matched_tokens","indices","attribute","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","adaptedValue","_ref7","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","typesenseFacetCounts","field_name","counts","count","stats","_adaptedResult$facetO","facetOrdering","order","Set","fc","facet_counts","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","FacetSearchResponseAdapter","find","facetCount","highlighted","facetHits","_adaptFacetHits","exhaustiveFacetsCount","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","results","typesenseResult","_validateTypesenseResult","adapt","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_context3","_x3","TypesenseSearchClient"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/SearchResponseAdapter.js b/lib/SearchResponseAdapter.js index f3f3c17..b4f1663 100644 --- a/lib/SearchResponseAdapter.js +++ b/lib/SearchResponseAdapter.js @@ -16,12 +16,14 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } var SearchResponseAdapter = exports.SearchResponseAdapter = /*#__PURE__*/function () { function SearchResponseAdapter(typesenseResponse, instantsearchRequest, configuration) { - var allTypesenseResponses = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + var allTypesenseResults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + var fullTypesenseResponse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; (0, _classCallCheck2["default"])(this, SearchResponseAdapter); this.typesenseResponse = typesenseResponse; this.instantsearchRequest = instantsearchRequest; this.configuration = configuration; - this.allTypesenseResponses = allTypesenseResponses; + this.allTypesenseResults = allTypesenseResults; + this.fullTypesenseResponse = fullTypesenseResponse; } return (0, _createClass2["default"])(SearchResponseAdapter, [{ key: "_adaptGroupedHits", @@ -68,6 +70,11 @@ var SearchResponseAdapter = exports.SearchResponseAdapter = /*#__PURE__*/functio adaptedHit._highlightResult = _this2._adaptHighlightResult(typesenseHit, "value"); adaptedHit._rawTypesenseHit = typesenseHit; + // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits + if (_this2.fullTypesenseResponse.conversation) { + adaptedHit._rawTypesenseConversation = _this2.fullTypesenseResponse.conversation; + } + // Add metadata fields to result, if a field with that name doesn't already exist ["text_match", "geo_distance_meters", "curated", "text_match_info", "hybrid_search_info", "vector_distance"].forEach(function (metadataField) { if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) { @@ -291,7 +298,7 @@ var SearchResponseAdapter = exports.SearchResponseAdapter = /*#__PURE__*/functio adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {}; adaptedResult.facetOrdering.facets.order = (0, _toConsumableArray2["default"])(new Set(typesenseFacetCounts.map(function (fc) { return fc["field_name"]; - }).concat(this.allTypesenseResponses.map(function (r) { + }).concat(this.allTypesenseResults.map(function (r) { return r.facet_counts || []; }).flat().map(function (fc) { return fc["field_name"]; diff --git a/lib/SearchResponseAdapter.js.map b/lib/SearchResponseAdapter.js.map index 72e0fd0..ea4b1b5 100644 --- a/lib/SearchResponseAdapter.js.map +++ b/lib/SearchResponseAdapter.js.map @@ -1 +1 @@ -{"version":3,"file":"SearchResponseAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","SearchResponseAdapter","_typeof2","_slicedToArray2","_toConsumableArray2","_defineProperty2","_classCallCheck2","_createClass2","_utils","ownKeys","e","r","t","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","typesenseResponse","instantsearchRequest","configuration","allTypesenseResponses","undefined","key","_adaptGroupedHits","typesenseGroupedHits","_this","adaptedResult","map","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","flattenGroupedHits","flat","adaptedGroupedHit","_grouped_hits","typesenseHits","_this2","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","metadataField","includes","geoLocationValue","geoLocationField","_geoloc","lat","lng","snippetOrValue","result","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","_this3","assign","concat","entries","_ref","_ref2","attribute","matchLevel","matchedWords","highlights","field","matched_tokens","indices","_ref4","_ref5","k","v","matchedIndices","_adaptHighlightNullValue","Array","isArray","unhighlightedValueFromArray","index","_adaptHighlightTag","indexOf","params","highlightPreTag","highlightPostTag","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_this4","_ref6","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","typesenseFacetCounts","facet","field_name","counts","count","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","renderingContent","facetOrdering","facets","order","Set","fc","facet_counts","f","adapt","adaptedRenderingContent","grouped_hits","nbHits","page","nbPages","_adaptNumberOfPages","hitsPerPage","request_params","per_page","facets_stats","query","q","processingTimeMS","search_time_ms","prototype","utils"],"sources":["../src/SearchResponseAdapter.js"],"sourcesContent":["\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest, configuration, allTypesenseResponses = []) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResponses = allTypesenseResponses;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResponses\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MA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I,CAACiI,uBAAuB,CAAC,CAACvH,MAAM,GAAG,CAAC,GAAG;QAAE8G,gBAAgB,EAAES;MAAwB,CAAC,GAAG,IAAI,CAC3G;;MAED;MACA,OAAO1G,aAAa;IACtB;EAAC;AAAA;AAGHvC,MAAM,CAAC+E,MAAM,CAAC3E,qBAAqB,CAAC2J,SAAS,EAAEC,YAAK,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"SearchResponseAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","SearchResponseAdapter","_typeof2","_slicedToArray2","_toConsumableArray2","_defineProperty2","_classCallCheck2","_createClass2","_utils","ownKeys","e","r","t","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","typesenseResponse","instantsearchRequest","configuration","allTypesenseResults","undefined","fullTypesenseResponse","key","_adaptGroupedHits","typesenseGroupedHits","_this","adaptedResult","map","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","flattenGroupedHits","flat","adaptedGroupedHit","_grouped_hits","typesenseHits","_this2","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","conversation","_rawTypesenseConversation","metadataField","includes","geoLocationValue","geoLocationField","_geoloc","lat","lng","snippetOrValue","result","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","_this3","assign","concat","entries","_ref","_ref2","attribute","matchLevel","matchedWords","highlights","field","matched_tokens","indices","_ref4","_ref5","k","v","matchedIndices","_adaptHighlightNullValue","Array","isArray","unhighlightedValueFromArray","index","_adaptHighlightTag","indexOf","params","highlightPreTag","highlightPostTag","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_this4","_ref6","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","typesenseFacetCounts","facet","field_name","counts","count","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","renderingContent","facetOrdering","facets","order","Set","fc","facet_counts","f","adapt","adaptedRenderingContent","grouped_hits","nbHits","page","nbPages","_adaptNumberOfPages","hitsPerPage","request_params","per_page","facets_stats","query","q","processingTimeMS","search_time_ms","prototype","utils"],"sources":["../src/SearchResponseAdapter.js"],"sourcesContent":["\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,qBAAA;AAAA,IAAAC,QAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,eAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAAAQ,mBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAA,IAAAS,gBAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAA,IAAAU,gBAAA,GAAAX,sBAAA,CAAAC,OAAA;AAAA,IAAAW,aAAA,GAAAZ,sBAAA,CAAAC,OAAA;AAEb,IAAAY,MAAA,GAAAZ,OAAA;AAAwC,SAAAa,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAf,MAAA,CAAAgB,IAAA,CAAAH,CAAA,OAAAb,MAAA,CAAAiB,qBAAA,QAAAC,CAAA,GAAAlB,MAAA,CAAAiB,qBAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAd,MAAA,CAAAoB,wBAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA;AAAA,SAAAS,cAAAX,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iB,CAACuH,YAAY,CAAC,GAC3D,IAAI,CAACzG,UAAU,CAAC,IAAI,CAACd,iBAAiB,CAACe,IAAI,CAAC;QAChDyG,MAAM,EAAE,IAAI,CAACxH,iBAAiB,CAACkB,KAAK;QACpCuG,IAAI,EAAE,IAAI,CAACzH,iBAAiB,CAACyH,IAAI,GAAG,CAAC;QACrCC,OAAO,EAAE,IAAI,CAACC,mBAAmB,CAAC,CAAC;QACnCC,WAAW,EAAE,IAAI,CAAC5H,iBAAiB,CAAC6H,cAAc,CAACC,QAAQ;QAC3Df,MAAM,EAAE,IAAI,CAACZ,YAAY,CAAC,IAAI,CAACnG,iBAAiB,CAACmH,YAAY,IAAI,EAAE,CAAC;QACpEY,YAAY,EAAE,IAAI,CAACtB,gBAAgB,CAAC,IAAI,CAACzG,iBAAiB,CAACmH,YAAY,IAAI,CAAC,CAAC,CAAC;QAC9Ea,KAAK,EAAE,IAAI,CAAChI,iBAAiB,CAAC6H,cAAc,CAACI,CAAC;QAC9CC,gBAAgB,EAAE,IAAI,CAAClI,iBAAiB,CAACmI;MAAc,GACnDjK,MAAM,CAACgB,IAAI,CAACoI,uBAAuB,CAAC,CAAC1H,MAAM,GAAG,CAAC,GAAG;QAAEiH,gBAAgB,EAAES;MAAwB,CAAC,GAAG,IAAI,CAC3G;;MAED;MACA,OAAO5G,aAAa;IACtB;EAAC;AAAA;AAGHxC,MAAM,CAACkF,MAAM,CAAC9E,qBAAqB,CAAC8J,SAAS,EAAEC,YAAK,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/lib/TypesenseInstantsearchAdapter.js b/lib/TypesenseInstantsearchAdapter.js index e8d26f3..e2a7813 100644 --- a/lib/TypesenseInstantsearchAdapter.js +++ b/lib/TypesenseInstantsearchAdapter.js @@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", { }); exports["default"] = void 0; var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); -var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); @@ -16,9 +14,6 @@ var _typesense = require("typesense"); var _SearchRequestAdapter = require("./SearchRequestAdapter"); var _SearchResponseAdapter = require("./SearchResponseAdapter"); var _FacetSearchResponseAdapter = require("./FacetSearchResponseAdapter"); -var _excluded = ["results"]; -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } var TypesenseInstantsearchAdapter = exports["default"] = /*#__PURE__*/function () { function TypesenseInstantsearchAdapter(options) { var _this = this; @@ -52,12 +47,8 @@ var TypesenseInstantsearchAdapter = exports["default"] = /*#__PURE__*/function ( typesenseResponse = _context.sent; adaptedResponses = typesenseResponse.results.map(function (typesenseResult, index) { _this2._validateTypesenseResult(typesenseResult); - var responseAdapter = new _SearchResponseAdapter.SearchResponseAdapter(typesenseResult, instantsearchRequests[index], _this2.configuration, typesenseResponse.results); - var adaptedResponse = _objectSpread(_objectSpread({}, responseAdapter.adapt()), function (_ref) { - var results = _ref.results, - o = (0, _objectWithoutProperties2["default"])(_ref, _excluded); - return o; - }(typesenseResponse)); + var responseAdapter = new _SearchResponseAdapter.SearchResponseAdapter(typesenseResult, instantsearchRequests[index], _this2.configuration, typesenseResponse.results, typesenseResponse); + var adaptedResponse = responseAdapter.adapt(); return adaptedResponse; }); return _context.abrupt("return", { diff --git a/lib/TypesenseInstantsearchAdapter.js.map b/lib/TypesenseInstantsearchAdapter.js.map index 754fb01..4816ab6 100644 --- a/lib/TypesenseInstantsearchAdapter.js.map +++ b/lib/TypesenseInstantsearchAdapter.js.map @@ -1 +1 @@ -{"version":3,"file":"TypesenseInstantsearchAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","_regenerator","_objectWithoutProperties2","_defineProperty2","_asyncToGenerator2","_classCallCheck2","_createClass2","_Configuration","_typesense","_SearchRequestAdapter","_SearchResponseAdapter","_FacetSearchResponseAdapter","_excluded","ownKeys","e","r","t","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","TypesenseInstantsearchAdapter","options","_this","updateConfiguration","searchClient","clearCache","search","instantsearchRequests","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","key","_searchTypesenseAndAdapt","mark","_callee","_this2","typesenseResponse","adaptedResponses","wrap","_callee$","_context","prev","next","_adaptAndPerformTypesenseRequest","sent","results","map","typesenseResult","index","_validateTypesenseResult","responseAdapter","SearchResponseAdapter","configuration","adaptedResponse","adapt","_ref","abrupt","t0","console","error","stop","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_this3","_callee2$","_context2","FacetSearchResponseAdapter","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","SearchRequestAdapter","typesenseClient","request","_x3","TypesenseSearchClient","server","Configuration","validate","Error","concat","code","hits","grouped_hits"],"sources":["../src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n );\n let adaptedResponse = {\n ...responseAdapter.adapt(),\n // eslint-disable-next-line no-unused-vars\n ...(({ results, ...o }) => o)(typesenseResponse), // All other keys in the response (like `conversation`)\n };\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA;AAAA,IAAAE,YAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAA,IAAAM,yBAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,gBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAAAQ,kBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAA,IAAAS,gBAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAA,IAAAU,aAAA,GAAAX,sBAAA,CAAAC,OAAA;AAEb,IAAAW,cAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AACA,IAAAa,qBAAA,GAAAb,OAAA;AACA,IAAAc,sBAAA,GAAAd,OAAA;AACA,IAAAe,2BAAA,GAAAf,OAAA;AAA0E,IAAAgB,SAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAnB,MAAA,CAAAoB,IAAA,CAAAH,CAAA,OAAAjB,MAAA,CAAAqB,qBAAA,QAAAC,CAAA,GAAAtB,MAAA,CAAAqB,qBAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAlB,MAAA,CAAAwB,wBAAA,CAAAP,CAA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C3E,OAAO,IAAI,CAACvD,YAAY;IAC1B;EAAC;IAAAO,GAAA;IAAA1C,KAAA,EAED,SAAAkC,oBAAoBF,OAAO,EAAE;MAC3B,IAAI,CAAC+B,aAAa,GAAG,IAAI4B,4BAAa,CAAC3D,OAAO,CAAC;MAC/C,IAAI,CAAC+B,aAAa,CAAC6B,QAAQ,CAAC,CAAC;MAC7B,IAAI,CAACN,eAAe,GAAG,IAAIG,uBAAqB,CAAC,IAAI,CAAC1B,aAAa,CAAC2B,MAAM,CAAC;MAC3E,OAAO,IAAI;IACb;EAAC;IAAAhD,GAAA;IAAA1C,KAAA,EAED,SAAA4D,yBAAyBF,eAAe,EAAE;MACxC,IAAIA,eAAe,CAACY,KAAK,EAAE;QACzB,MAAM,IAAIuB,KAAK,IAAAC,MAAA,CAAIpC,eAAe,CAACqC,IAAI,SAAAD,MAAA,CAAMpC,eAAe,CAACY,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAACZ,eAAe,CAACsC,IAAI,IAAI,CAACtC,eAAe,CAACuC,YAAY,EAAE;QAC1D,MAAM,IAAIJ,KAAK,2BAAAC,MAAA,CAA2BpC,eAAe,CAACqC,IAAI,SAAAD,MAAA,CAAMpC,eAAe,CAACY,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"TypesenseInstantsearchAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","_regenerator","_asyncToGenerator2","_classCallCheck2","_createClass2","_Configuration","_typesense","_SearchRequestAdapter","_SearchResponseAdapter","_FacetSearchResponseAdapter","TypesenseInstantsearchAdapter","options","_this","updateConfiguration","searchClient","clearCache","search","instantsearchRequests","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","key","_searchTypesenseAndAdapt","mark","_callee","_this2","typesenseResponse","adaptedResponses","wrap","_callee$","_context","prev","next","_adaptAndPerformTypesenseRequest","sent","results","map","typesenseResult","index","_validateTypesenseResult","responseAdapter","SearchResponseAdapter","configuration","adaptedResponse","adapt","abrupt","t0","console","error","stop","_x","apply","arguments","_searchTypesenseForFacetValuesAndAdapt","_callee2","_this3","_callee2$","_context2","FacetSearchResponseAdapter","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","SearchRequestAdapter","typesenseClient","request","_x3","TypesenseSearchClient","server","Configuration","validate","Error","concat","code","hits","grouped_hits"],"sources":["../src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA;AAAA,IAAAE,YAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAA,IAAAM,kBAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,gBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAAAQ,aAAA,GAAAT,sBAAA,CAAAC,OAAA;AAEb,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,qBAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAZ,OAAA;AACA,IAAAa,2BAAA,GAAAb,OAAA;AAA0E,IAErDc,6BAA6B,GAAAX,OAAA;EAChD,SAAAW,8BAAYC,OAAO,EAAE;IAAA,IAAAC,KAAA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OAAAC,SAAA;MAAA;MAAA,OAAAnB,gCAAA;IAAA;EAAA;IAAAZ,GAAA;IAAArB,KAAA,EAED,SAAAe,WAAA,EAAa;MACX,IAAI,CAACmD,eAAe,GAAG,IAAIG,uBAAqB,CAAC,IAAI,CAAC3B,aAAa,CAAC4B,MAAM,CAAC;MAC3E,OAAO,IAAI,CAACxD,YAAY;IAC1B;EAAC;IAAAO,GAAA;IAAArB,KAAA,EAED,SAAAa,oBAAoBF,OAAO,EAAE;MAC3B,IAAI,CAAC+B,aAAa,GAAG,IAAI6B,4BAAa,CAAC5D,OAAO,CAAC;MAC/C,IAAI,CAAC+B,aAAa,CAAC8B,QAAQ,CAAC,CAAC;MAC7B,IAAI,CAACN,eAAe,GAAG,IAAIG,uBAAqB,CAAC,IAAI,CAAC3B,aAAa,CAAC4B,MAAM,CAAC;MAC3E,OAAO,IAAI;IACb;EAAC;IAAAjD,GAAA;IAAArB,KAAA,EAED,SAAAuC,yBAAyBF,eAAe,EAAE;MACxC,IAAIA,eAAe,CAACW,KAAK,EAAE;QACzB,MAAM,IAAIyB,KAAK,IAAAC,MAAA,CAAIrC,eAAe,CAACsC,IAAI,SAAAD,MAAA,CAAMrC,eAAe,CAACW,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAACX,eAAe,CAACuC,IAAI,IAAI,CAACvC,eAAe,CAACwC,YAAY,EAAE;QAC1D,MAAM,IAAIJ,KAAK,2BAAAC,MAAA,CAA2BrC,eAAe,CAACsC,IAAI,SAAAD,MAAA,CAAMrC,eAAe,CAACW,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f1d1057..c130473 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "typesense": "^1.8.0-7" + "typesense": "^1.8.2" }, "devDependencies": { "@babel/cli": "^7.24.1", @@ -11990,9 +11990,9 @@ } }, "node_modules/typesense": { - "version": "1.8.0-7", - "resolved": "https://registry.npmjs.org/typesense/-/typesense-1.8.0-7.tgz", - "integrity": "sha512-VGaMn2W1+8VS8Gb9xSEI3YzZekdfE9qtm08FZHqw4c+2r4lIMVlw3Eq4TxCHIRgVpwQjOvWpNmKhp8W4geEMBw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/typesense/-/typesense-1.8.2.tgz", + "integrity": "sha512-aBpePjA99Qvo+OP2pJwMpvga4Jrm1Y2oV5NsrWXBxlqUDNEUCPZBIksPv2Hq0jxQxHhLLyJVbjXjByXsvpCDVA==", "dependencies": { "axios": "^1.6.0", "loglevel": "^1.8.1" @@ -21306,9 +21306,9 @@ "dev": true }, "typesense": { - "version": "1.8.0-7", - "resolved": "https://registry.npmjs.org/typesense/-/typesense-1.8.0-7.tgz", - "integrity": "sha512-VGaMn2W1+8VS8Gb9xSEI3YzZekdfE9qtm08FZHqw4c+2r4lIMVlw3Eq4TxCHIRgVpwQjOvWpNmKhp8W4geEMBw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/typesense/-/typesense-1.8.2.tgz", + "integrity": "sha512-aBpePjA99Qvo+OP2pJwMpvga4Jrm1Y2oV5NsrWXBxlqUDNEUCPZBIksPv2Hq0jxQxHhLLyJVbjXjByXsvpCDVA==", "requires": { "axios": "^1.6.0", "loglevel": "^1.8.1" diff --git a/package.json b/package.json index 1783da2..1b15961 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "build:dist": "webpack", "test:type": "tsd", "build": "npm run build:lib && npm run build:dist", - "typesenseServer": "docker run -i -p 8108:8108 -v`pwd`/typesense-server-data/:/data typesense/typesense:0.25.2.rc6 --data-dir /data --api-key=xyz --listen-port 8108 --enable-cors", + "typesenseServer": "docker run -i -p 8108:8108 -v`pwd`/typesense-server-data/:/data typesense/typesense:26.0 --data-dir /data --api-key=xyz --listen-port 8108 --enable-cors", "createServerNodesFile": "echo '172.17.0.2:8107:8108,172.17.0.3:7107:7108,172.17.0.4:9107:9108' > `pwd`/typesense-server-nodes", "typesenseServer:0": "docker run -i -p 8108:8108 -p 8107:8107 -v/tmp/typesense-server-data-node-1/:/data -v`pwd`/typesense-server-nodes:/typesense-server-nodes typesense/typesense:0.19.0 --data-dir /data --api-key=xyz --listen-port 8108 --peering-port 8107 --enable-cors --nodes=/typesense-server-nodes", "typesenseServer:1": "docker run -i -p 7108:7108 -p 7107:7107 -v/tmp/.typesense-server-data-node-2/:/data -v`pwd`/typesense-server-nodes:/typesense-server-nodes typesense/typesense:0.19.0 --data-dir /data --api-key=xyz --listen-port 7108 --peering-port 7107 --enable-cors --nodes=/typesense-server-nodes", @@ -83,7 +83,7 @@ "webpack-cli": "^5.1.4" }, "dependencies": { - "typesense": "^1.8.0-7" + "typesense": "^1.8.2" }, "peerDependencies": { "@babel/runtime": "^7.24.1" diff --git a/src/SearchResponseAdapter.js b/src/SearchResponseAdapter.js index 6ca1d34..8d4bb7f 100644 --- a/src/SearchResponseAdapter.js +++ b/src/SearchResponseAdapter.js @@ -3,11 +3,18 @@ import { utils } from "./support/utils"; export class SearchResponseAdapter { - constructor(typesenseResponse, instantsearchRequest, configuration, allTypesenseResponses = []) { + constructor( + typesenseResponse, + instantsearchRequest, + configuration, + allTypesenseResults = [], + fullTypesenseResponse = {}, + ) { this.typesenseResponse = typesenseResponse; this.instantsearchRequest = instantsearchRequest; this.configuration = configuration; - this.allTypesenseResponses = allTypesenseResponses; + this.allTypesenseResults = allTypesenseResults; + this.fullTypesenseResponse = fullTypesenseResponse; } _adaptGroupedHits(typesenseGroupedHits) { @@ -55,6 +62,11 @@ export class SearchResponseAdapter { adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, "value"); adaptedHit._rawTypesenseHit = typesenseHit; + // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits + if (this.fullTypesenseResponse.conversation) { + adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation; + } + // Add metadata fields to result, if a field with that name doesn't already exist [ "text_match", @@ -302,7 +314,7 @@ export class SearchResponseAdapter { typesenseFacetCounts .map((fc) => fc["field_name"]) .concat( - this.allTypesenseResponses + this.allTypesenseResults .map((r) => r.facet_counts || []) .flat() .map((fc) => fc["field_name"]) diff --git a/src/TypesenseInstantsearchAdapter.js b/src/TypesenseInstantsearchAdapter.js index 42e5c7a..744460a 100644 --- a/src/TypesenseInstantsearchAdapter.js +++ b/src/TypesenseInstantsearchAdapter.js @@ -29,12 +29,9 @@ export default class TypesenseInstantsearchAdapter { instantsearchRequests[index], this.configuration, typesenseResponse.results, + typesenseResponse, ); - let adaptedResponse = { - ...responseAdapter.adapt(), - // eslint-disable-next-line no-unused-vars - ...(({ results, ...o }) => o)(typesenseResponse), // All other keys in the response (like `conversation`) - }; + let adaptedResponse = responseAdapter.adapt(); return adaptedResponse; });