1(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2562],{55873:function(t,e,n){!function(t){"use strict";var e=function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function i(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function u(t){try{o(r.next(t))}catch(e){a(e)}}function s(t){try{o(r.throw(t))}catch(e){a(e)}}function o(t){t.done?n(t.value):i(t.value).then(u,s)}o((r=r.apply(t,e||[])).next())}))}function a(t,e){var n,r,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return o([t,e])}}function o(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(u=0)),u;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return u.label++,{value:s[1],done:!1};case 5:u.label++,r=s[1],s=[0];continue;case 7:s=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){u=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){u.label=s[1];break}if(6===s[0]&&u.label<i[1]){u.label=i[1],i=s;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(s);break}i[2]&&u.ops.pop(),u.trys.pop();continue}s=e.call(t,u)}catch(o){s=[6,o],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t){var e={exports:{}};return t(e,e.exports),e.exports}"function"==typeof SuppressedError&&SuppressedError,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var o=s((function(t,e){!function(t,n){n(e)}(0,(function(t){var e={ALL:"all",LAST:"last",FREQUENCY:"frequency"},n={JSON:"application/json",CSV:"text/csv",NDJSON:"application/x-ndjson"},r={TASK_SUCCEEDED:"succeeded",TASK_PROCESSING:"processing",TASK_FAILED:"failed",TASK_ENQUEUED:"enqueued",TASK_CANCELED:"canceled"},i={DOCUMENTS_ADDITION_OR_UPDATE:"documentAdditionOrUpdate",DOCUMENT_DELETION:"documentDeleti
1on",DUMP_CREATION:"dumpCreation",INDEX_CREATION:"indexCreation",INDEX_DELETION:"indexDeletion",INDEXES_SWAP:"indexSwap",INDEX_UPDATE:"indexUpdate",SETTINGS_UPDATE:"settingsUpdate",SNAPSHOT_CREATION:"snapshotCreation",TASK_CANCELATION:"taskCancelation",TASK_DELETION:"taskDeletion"},a={INDEX_CREATION_FAILED:"index_creation_failed",MISSING_INDEX_UID:"missing_index_uid",INDEX_ALREADY_EXISTS:"index_already_exists",INDEX_NOT_FOUND:"index_not_found",INVALID_INDEX_UID:"invalid_index_uid",INDEX_NOT_ACCESSIBLE:"index_not_accessible",INVALID_INDEX_OFFSET:"invalid_index_offset",INVALID_INDEX_LIMIT:"invalid_index_limit",INVALID_STATE:"invalid_state",PRIMARY_KEY_INFERENCE_FAILED:"primary_key_inference_failed",INDEX_PRIMARY_KEY_ALREADY_EXISTS:"index_primary_key_already_exists",INVALID_INDEX_PRIMARY_KEY:"invalid_index_primary_key",DOCUMENTS_FIELDS_LIMIT_REACHED:"document_fields_limit_reached",MISSING_DOCUMENT_ID:"missing_document_id",INVALID_DOCUMENT_ID:"invalid_document_id",INVALID_CONTENT_TYPE:"invalid_content_type",MISSING_CONTENT_TYPE:"missing_content_type",INVALID_DOCUMENT_FIELDS:"invalid_document_fields",INVALID_DOCUMENT_LIMIT:"invalid_document_limit",INVALID_DOCUMENT_OFFSET:"invalid_document_offset",INVALID_DOCUMENT_FILTER:"invalid_document_filter",MISSING_DOCUMENT_FILTER:"missing_document_filter",INVALID_DOCUMENT_VECTORS_FIELD:"invalid_document_vectors_field",PAYLOAD_TOO_LARGE:"payload_too_large",MISSING_PAYLOAD:"missing_payload",MALFORMED_PAYLOAD:"malformed_payload",NO_SPACE_LEFT_ON_DEVICE:"no_space_left_on_device",INVALID_STORE_FILE:"invalid_store_file",INVALID_RANKING_RULES:"missing_document_id",INVALID_REQUEST:"invalid_request",INVALID_DOCUMENT_GEO_FIELD:"invalid_document_geo_field",INVALID_SEARCH_Q:"invalid_search_q",INVALID_SEARCH_OFFSET:"invalid_search_offset",INVALID_SEARCH_LIMIT:"invalid_search_limit",INVA
1LID_SEARCH_PAGE:"invalid_search_page",INVALID_SEARCH_HITS_PER_PAGE:"invalid_search_hits_per_page",INVALID_SEARCH_ATTRIBUTES_TO_RETRIEVE:"invalid_search_attributes_to_retrieve",INVALID_SEARCH_ATTRIBUTES_TO_CROP:"invalid_search_attributes_to_crop",INVALID_SEARCH_CROP_LENGTH:"invalid_search_crop_length",INVALID_SEARCH_ATTRIBUTES_TO_HIGHLIGHT:"invalid_search_attributes_to_highlight",INVALID_SEARCH_SHOW_MATCHES_POSITION:"invalid_search_show_matches_position",INVALID_SEARCH_FILTER:"invalid_search_filter",INVALID_SEARCH_SORT:"invalid_search_sort",INVALID_SEARCH_FACETS:"invalid_search_facets",INVALID_SEARCH_HIGHLIGHT_PRE_TAG:"invalid_search_highlight_pre_tag",INVALID_SEARCH_HIGHLIGHT_POST_TAG:"invalid_search_highlight_post_tag",INVALID_SEARCH_CROP_MARKER:"invalid_search_crop_marker",INVALID_SEARCH_MATCHING_STRATEGY:"invalid_search_matching_strategy",INVALID_SEARCH_VECTOR:"invalid_search_vector",INVALID_SEARCH_ATTRIBUTES_TO_SEARCH_ON:"invalid_search_attributes_to_search_on",BAD_REQUEST:"bad_request",DOCUMENT_NOT_FOUND:"document_not_found",INTERNAL:"internal",INVALID_API_KEY:"invalid_api_key",INVALID_API_KEY_DESCRIPTION:"invalid_api_key_description",INVALID_API_KEY_ACTIONS:"invalid_api_key_actions",INVALID_API_KEY_INDEXES:"invalid_api_key_indexes",INVALID_API_KEY_EXPIRES_AT:"invalid_api_key_expires_at",API_KEY_NOT_FOUND:"api_key_not_found",IMMUTABLE_API_KEY_UID:"immutable_api_key_uid",IMMUTABLE_API_KEY_ACTIONS:"immutable_api_key_actions",IMMUTABLE_API_KEY_INDEXES:"immutable_api_key_indexes",IMMUTABLE_API_KEY_EXPIRES_AT:"immutable_api_key_expires_at",IMMUTABLE_API_KEY_CREATED_AT:"immutable_api_key_created_at",IMMUTABLE_API_KEY_UPDATED_AT:"immutable_api_key_updated_at",MISSING_AUTHORIZATION_HEADER:"missing_authorization_header",UNRETRIEVABLE_DOCUMENT:"unretrievable_document",MAX_DATABASE_SIZE_LIMIT_REACHED:"database_size_limit_reached",TASK_NOT_FOUND:"task_not_found",DUMP_PROCESS_FAILED:"dump_process_failed",DUMP_NOT_FOUND:"dump_not_found",INVALID_SWAP_DUPLICATE_INDEX_FOUND:"invalid_swap_duplicate_index_found",INVALID_SWAP_INDEXES:"invalid_swap_indexes",MISSING_SWAP_INDEXES:"missing_swap_indexes",MISSING_MASTER_KEY:"missing_master_key",INVALID_TASK_TYPES:"invalid_task_types",INVALID_TASK_UIDS:"invalid_task_uids",INVALID_TASK_STATUSES:"invalid_task_statuses",INVALID_TASK_LIMIT:"invalid_task_limit",INVA
1LID_TASK_FROM:"invalid_task_from",INVALID_TASK_CANCELED_BY:"invalid_task_canceled_by",MISSING_TASK_FILTERS:"missing_task_filters",TOO_MANY_OPEN_FILES:"too_many_open_files",IO_ERROR:"io_error",INVALID_TASK_INDEX_UIDS:"invalid_task_index_uids",IMMUTABLE_INDEX_UID:"immutable_index_uid",IMMUTABLE_INDEX_CREATED_AT:"immutable_index_created_at",IMMUTABLE_INDEX_UPDATED_AT:"immutable_index_updated_at",INVALID_SETTINGS_DISPLAYED_ATTRIBUTES:"invalid_settings_displayed_attributes",INVALID_SETTINGS_SEARCHABLE_ATTRIBUTES:"invalid_settings_searchable_attributes",INVALID_SETTINGS_FILTERABLE_ATTRIBUTES:"invalid_settings_filterable_attributes",INVALID_SETTINGS_SORTABLE_ATTRIBUTES:"invalid_settings_sortable_attributes",INVALID_SETTINGS_RANKING_RULES:"invalid_settings_ranking_rules",INVALID_SETTINGS_STOP_WORDS:"invalid_settings_stop_words",INVALID_SETTINGS_SYNONYMS:"invalid_settings_synonyms",INVALID_SETTINGS_DISTINCT_ATTRIBUTE:"invalid_settings_distinct_attribute",INVALID_SETTINGS_TYPO_TOLERANCE:"invalid_settings_typo_tolerance",INVALID_SETTINGS_FACETING:"invalid_settings_faceting",INVALID_SETTINGS_PAGINATION:"invalid_settings_pagination",INVALID_SETTINGS_SEARCH_CUTOFF_MS:"invalid_settings_search_cutoff_ms",INVALID_SETTINGS_LOCALIZED_ATTRIBUTES:"invalid_settings_localized_attributes",INVALID_TASK_BEFORE_ENQUEUED_AT:"invalid_task_before_enqueued_at",INVALID_TASK_AFTER_ENQUEUED_AT:"invalid_task_after_enqueued_at",INVALID_TASK_BEFORE_STARTED_AT:"invalid_task_before_started_at",INVALID_TASK_AFTER_STARTED_AT:"invalid_task_after_started_at",INVALID_TASK_BEFORE_FINISHED_AT:"invalid_task_before_finished_at",INVALID_TASK_AFTER_FINISHED_AT:"invalid_task_after_finished_at",MISSING_API_KEY_ACTIONS:"missing_api_key_actions",MISSING_API_KEY_INDEXES:"missing_api_key_indexes",MISSING_API_KEY_EXPIRES_AT:"missing_api_key_expires_at",INVALID_API_KEY_LIMIT:"invalid_api_key_limit",INVA
1LID_API_KEY_OFFSET:"invalid_api_key_offset",INVALID_FACET_SEARCH_FACET_NAME:"invalid_facet_search_facet_name",MISSING_FACET_SEARCH_FACET_NAME:"missing_facet_search_facet_name",INVALID_FACET_SEARCH_FACET_QUERY:"invalid_facet_search_facet_query",INVALID_SEARCH_RANKING_SCORE_THRESHOLD:"invalid_search_ranking_score_threshold",INVALID_SIMILAR_RANKING_SCORE_THRESHOLD:"invalid_similar_ranking_score_threshold"};function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(t){if(Array.isArray(t))return t}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e,n,r,i,a,u){try{var s=t[a](u),o=s.value}catch(t){return void n(t)}s.done?e(o):Promise.resolve(o).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function u(t){c(a,r,i,u,s,"next",t)}function s(t){c(a,r,i,u,s,"throw",t)}u(void 0)}))}}function h(t,e,n){return e=g(e),T(t,x()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e,n){if(x())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&S(i,n.prototype),i}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,N(r.key),r)}}function v(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){s=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw a}}}}function y(t,e,n){return(e=N(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function w(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}function m(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}function b(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,u,s=[],o=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e);else for(;!(o=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);o=!0);}catch(t){c=!0,i=t}finally{try{if(!o&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw i}}return s}}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(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 I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function T(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return o(t)}function E(){E=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",o=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var a=e&&e.prototype instanceof y?e:y,u=Object.create(a.prototype),s=new N(r||[]);return i(u,"_invoke",{value:T(t,n,s)}),u}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var f="suspendedStart",d="suspendedYield",l="executing",v="completed",_={};function y(){}function g(){}function w(){}var m={};c(m,u,(function(){return this}));var x=Object.getPrototypeOf,b=x&&x(x(O([])));b&&b!==n&&r.call(b,u)&&(m=b);var k=w.prototype=y.prototype=Object.create(m);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(i,a,u,s){var o=h(t[i],t,a);if("throw"!==o.type){var c=o.arg,p=c.value;return p&&"object"==typeof p&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,u,s)}),(function(t){n("throw",t,u,s)}
vendor: 5,189 bytes, line 1
1)):e.resolve(p).then((function(t){c.value=t,u(c)}),(function(t){return n("throw",t,u,s)}))}s(o.arg)}var a;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return a=a?a.then(i,i):i()}})}function T(e,n,r){var i=f;return function(a,u){if(i===l)throw Error("Generator is already running");if(i===v){if("throw"===a)throw u;return{value:t,done:!0}}for(r.method=a,r.arg=u;;){var s=r.delegate;if(s){var o=S(s,r);if(o){if(o===_)continue;return o}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=l;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===_)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function S(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var a=h(i,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,_;var u=a.arg;return u?u.done?(n[e.resultName]=u.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,_):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,_)}function R(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 D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function O(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=w,i(k,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=c(w,o,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,o,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(I.prototype),c(I.prototype,s,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var u=new I(p(t,n,r,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},A(k),c(k,o,"Generator"),c(k,u,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,N.prototype={constructor:N,reset:function(e){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(D),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],s=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var o=r.call(u,"catchLoc"),c=r.call(u,"finallyLoc");if(o&&c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(o){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=t,u.arg=e,a?(this.method="next",this.next=a.finallyLoc,_):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;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),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),_}},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 i=r.arg;D(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:O(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),_}},e}
1function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function R(t,e){return s(t)||b(t,e)||P(t,e)||k()}function D(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function N(t){var e=D(t,"string");return"symbol"==typeof e?e:e+""}function O(t){return O="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},O(t)}function P(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function q(t){var e="function"==typeof Map?new Map:void 0;return q=function(t){if(null===t||!m(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return d(t,arguments,g(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),S(n,t)},q(t)}var L=function(t){function e(){var t;f(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return y(t=h(this,e,[].concat(r)),"name","MeiliSearchError"),t}return w(e,t),v(e)}(q(Error)),C=function(t){function e(t,n){var r,i;return f(this,e),y(i=h(this,e,[null!==(r=null==n?void 0:n.message)&&void 0!==r?r:"".concat(t.status,": ").concat(t.statusText)]),"name","MeiliSearchApiError"),y(i,"cause",void 0),y(i,"response",void 0),i.response=t,void 0!==n&&(i.cause=n),i}return w(e,t),v(e)}(L),M=function(t){function e(t,n){var r;return f(this,e),y(r=h(this,e,["Request to ".concat(t," has failed"),{cause:n}]),"name","MeiliSearchRequestError"),r}return w(e,t),v(e)}(L),U=function(t){function e(t){var n;return f(this,e),y(n=h(this,e,[t]),"name","MeiliSearchTimeOutError"),n}return w(e,t),v(e)}(L);function F(t,e){return"".concat(t,"\nHint: It might not be working because maybe you're not up to date with the Meilisearch version that ").concat(e," call requires.")}function j(t){return Object.entries(t).reduce((function(t,e){var n=R(e,2),r=n[0],i=n[1];return void 0!==i&&(t[r]=i),t}),{})}function V(t){return K.apply(this,arguments)}function K(){return(K=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t){return setTimeout(t,e)}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(t){return t.startsWith("https://")||t.startsWith("http://")?t:"http://".concat(t)}function G(t){return t.endsWith("/")||(t+="/"),t}var B="0.45.0";function Y(t){return Object.keys(t).reduce((function(e,n){var r=t[n];return void 0===r?e:Array.isArray(r)?I(I({},e),{},y({}
1,n,r.join(","))):r instanceof Date?I(I({},e),{},y({},n,r.toISOString())):I(I({},e),{},y({},n,r))}),{})}function X(t){try{return t=G(t=H(t))}catch(e){throw new L("The provided host is not valid.")}}function W(t){if(Array.isArray(t))return t.reduce((function(t,e){return t[e[0]]=e[1],t}),{});if("has"in t){var e={};return t.forEach((function(t,n){return e[n]=t})),e}return Object.assign({},t)}function Q(t){var e,n,r="X-Meilisearch-Client",i="Meilisearch JavaScript (v".concat(B,")"),a="Content-Type",u="Authorization",s=W(null!==(e=null===(n=t.requestConfig)||void 0===n?void 0:n.headers)&&void 0!==e?e:{});if(t.apiKey&&!s[u]&&(s[u]="Bearer ".concat(t.apiKey)),s[a]||(s["Content-Type"]="application/json"),t.clientAgents&&Array.isArray(t.clientAgents)){var o=t.clientAgents.concat(i);s[r]=o.join(" ; ")}else{if(t.clientAgents&&!Array.isArray(t.clientAgents))throw new L('Meilisearch: The header "'.concat(r,'" should be an array of string(s).\n'));s[r]=i}return s}var z=function(){function t(e){f(this,t),y(this,"headers",void 0),y(this,"url",void 0),y(this,"requestConfig",void 0),y(this,"httpClient",void 0),y(this,"requestTimeout",void 0),this.headers=Q(e),this.requestConfig=e.requestConfig,this.httpClient=e.httpClient,this.requestTimeout=e.timeout;try{var n=X(e.host);this.url=new URL(n)}catch(r){throw new L("The provided host is not valid.")}}return v(t,[{key:"request",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u,s,o,c,p,h,f,d,l,v;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.method,i=e.url,a=e.params,u=e.body,s=e.config,o=void 0===s?{}:s,c=new URL(i,this.url),a&&(p=new URLSearchParams,Object.keys(a).filter((function(t){return null!==a[t]})).map((function(t){return p.set(t,a[t])})),c.search=p.toString()),null!==(n=o.headers)&&void 0!==n&&n["Content-Type"]||(u=JSON.stringify(u)),h=I(I({},this.headers),o.headers),f=this.fetchWithTimeout(c.toString(),I(I(I({},o),this.requestConfig),{},{method:r,body:u,headers:h}),this.requestTimeout),t.next=8,f.catch((function(t){throw new M(c.toString(),t)}));case 8:if(d=t.sent,void 0===this.httpClient){t.next=11;break}return t.abrupt("return",d);case 11:return t.next=13,d.text();case 13:if(l=t.sent,v=""===l?void 0:JSON.parse(l),d.ok){t.next=17;break}throw new C(d,v);case 17:return t.abrupt("return",v);case 18:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"fetchWithTimeout",value:function(){var t=p(E().mark((function t(e,n,r){var i=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,a){var u,s=[(i.httpClient?i.httpClient:fetch)(e,n)];if(r){var o=new Promise((function(t,e){u=setTimeout((function(){e(new Error("Error: Request Timed Out"))}),r)}));s.push(o)}Promise.race(s).then(t).catch(a).finally((function(){clearTimeout(u)}))})));case 1:case"end":return t.stop()}}),t)})));function e(e,n,r){return t.apply(this,arguments)}return e}()},{key:"get",value:function(){var t=p(E().mark((function t(e,n,r){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"GET",url:e,params:n,config:r});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e,n,r){return t.apply(this,arguments)}return e}()},{key:"post",value:function(){var t=p(E().mark((function t(e,n,r,i){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"POST",url:e,body:n,params:r,config:i});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e,n,r,i){return t.apply(this,arguments)}return e}()},{key:"put",value:function(){var t=p(E().mark((function t(e,n,r,i){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"PUT",url:e,body:n,params:r,config:i});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e,n,r,i){return t.apply(this,arguments)}return e}()},{key:"patch",value:function(){var t=p(E().mark((function t(e,n,r,i){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"PATCH",url:e,body:n,params:r,config:i});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e,n,r,i){return t.apply(this,arguments)}return e}()},{key:"delete",value:function(){var t=p(E().mark((function t(e,n,r,i){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"DELETE",url:e,body:n,params:r,config:i});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e,n,r,i){return t.apply(this,arguments)}return e}()}])}(),J=v((function t(e){f(this,t),y(this,"taskUid",void 0),y(this,"indexUid",void 0),y(this,"status",void 0),y(this,"type",void 0),y(this,"enqueuedAt",void 0),this.taskUid=e.taskUid,this.indexUid=e.indexUid,this.status=e.status,this.type=e.type,this.enqueuedAt=new Date(e.enqueuedAt)})),Z=v((function t(e){f(this,t),y(this,"indexUid",void 0),y(this,"status",void 0),y(this,"type",void 0),y(this,"uid",void 0),y(this,"canceledBy",void 0),y(this,"details",void 0),y(this,"error",void 0),y(this,"duration",void 0),y(this,"startedAt",void 0),y(this,"enqueuedAt",void 0),y(this,"finishedAt",void 0),this.indexUid=e.indexUid,this.status=e.status,this.type=e.type,this.uid=e.uid,this.details=e.details,this.canceledBy=e.canceledBy,this.error=e.error,this.duration=e.duration,this.startedAt=new Date(e.startedAt),this.enqueuedAt=new Date(e.enqueuedAt),this.finishedAt=new Date(e.finishedAt)})),$=function(){function t(e){f(this,t),y(this,"httpRequest",void 0),this.httpRequest=new z(e)}return v(t,[{key:"getTask",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="tasks/".concat(e),t.next=3,this.httpRequest.get(n);case 3:return r=t.sent,t.abrupt("return",new Z(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getTasks",value:function(){var t=p(E().mark((function t(){var e,n,r,i=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},n="tasks",t.next=4,this.httpRequest.get(n,Y(e));case 4:return r=t.sent,t.abrupt("return",I(I({},r),{},{results:r.results.map((function(t){return new Z(t)}))}));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"waitForTask",value:function(){var t=p(E().mark((function t(e){var n,i,a,u,s,o,c,p=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=p.length>1&&void 0!==p[1]?p[1]:{},i=n.timeOutMs,a=void 0===i?5e3:i,u=n.intervalMs,s=void 0===u?50:u,o=Date.now();case 2:if(!(Date.now()-o<a)){t.next=12;break}return t.next=5,this.getTask(e);case 5:if(c=t.sent,[r.TASK_ENQUEUED,r.TASK_PROCESSING].includes(c.status)){t.next=8;break}return t.abrupt("return",c);case 8:return t.next=10,V(s);case 10:t.next=2;break;case 12:throw new U("timeout of ".concat(a,"ms has exceeded on process ").concat(e," when waiting a task to be resolved."));case 13:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"waitForTasks",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u,s,o,c,p,h,f=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=f.length>1&&void 0!==f[1]?f[1]:{},r=n.timeOutMs,i=void 0===r?5e3:r,a=n.intervalMs,u=void 0===a?50:a,s=[],o=_(e),t.prev=3,o.s();case 5:if((c=o.n()).done){t.next=13;break}return p=c.value,t.next=9,this.waitForTask(p,{timeOutMs:i,intervalMs:u});case 9:h=t.sent,s.push(h);case 11:t.next=5;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(3),o.e(t.t0);case 18:return t.prev=18,o.f(),t.finish(18);case 21:return t.abrupt("return",s);case 22:case"end":return t.stop()}}),t,this,[[3,15,18,21]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"cancelTasks",value:function(){var t=p(E().mark((function t(){var e,n,r,i=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},n="tasks/cancel",t.next=4,this.httpRequest.post(n,{},Y(e));case 4:return r=t.sent,t.abrupt("return",new J(r));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"deleteTasks",value:function(){var t=p(E().mark((function t(){var e,n,r,i=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},n="tasks",t.next=4,this.httpRequest.delete(n,{},Y(e));case 4:return r=t.sent,t.abrupt("return",new J(r));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}])}(),tt=function(){function t(e,n,r){f(this,t),y(this,"uid",void 0),y(this,"primaryKey",void 0),y(this,"createdAt",void 0),y(this,"updatedAt",void 0),y(this,"httpRequest",void 0),y(this,"tasks",void 0),this.uid=n,this.primaryKey=r,this.httpRequest=new z(e),this.tasks=new $(e)}return v(t,[{key:"search",value:function(){var t=p(E().mark((function t(e,n,r){var i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="indexes/".concat(this.uid,"/search"),t.next=3,this.httpRequest.post(i,j(I({q:e},n)),void 0,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e,n,r){return t.apply(this,arguments)}return e}()},{key:"searchGet",value:function(){var t=p(E().mark((function t(e,n,r){var i,a,u,s,o,c,p,h,f,d;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h="indexes/".concat(this.uid,"/search"),f=function(t){if("string"==typeof t)return t;if(Array.isArray(t))throw new L("The filter query parameter should be in string format when using searchGet")},d=I(I({q:e},n),{},{filter:f(null==n?void 0:n.filter),sort:null==n||null===(i=n.sort)||void 0===i?void 0:i.join(","),facets:null==n||null===(a=n.facets)||void 0===a?void 0:a.join(","),attributesToRetrieve:null==n||null===(u=n.attributesToRetrieve)||void 0===u?void 0:u.join(","),attributesToCrop:null==n||null===(s=n.attributesToCrop)||void 0===s?void 0:s.join(","),attributesToHighlight:null==n||null===(o=n.attributesToHighlight)||void 0===o?void 0:o.join(","),vector:null==n||null===(c=n.vector)||void 0===c?void 0:c.join(","),attributesToSearchOn:null==n||null===(p=n.attributesToSearchOn)||void 0===p?void 0:p.join(",")}),t.next=5,this.httpRequest.get(h,j(d),r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));function e(e,n,r){return t.apply(this,arguments)}return e}()},{key:"searchForFacetValues",value:function(){var t=p(E().mark((function t(e,n){var r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/facet-search"),t.next=3,this.httpRequest.post(r,j(e),void 0,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},{key:"searchSimilarDocuments",value:function(){var t=p(E().mark((function t(e){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/similar"),t.next=3,this.httpRequest.post(n,j(e),void 0);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getRawInfo",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid),t.next=3,this.httpRequest.get(e);case 3:return n=t.sent,this.primaryKey=n.primaryKey,this.updatedAt=new Date(n.updatedAt),this.createdAt=new Date(n.createdAt),t.abrupt("return",n);case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"fetchInfo",value:function(){var t=p(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRawInfo();case 2:return t.abrupt("return",this);case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"fetchPrimaryKey",value:function(){var t=p(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRawInfo();case 2:return this.primaryKey=t.sent.primaryKey,t.abrupt("return",this.primaryKey);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"update",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid),t.next=3,this.httpRequest.patch(n,e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"delete",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new J(n));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getTasks",value:function(){var t=p(E().mark((function t(){var e,n=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,this.tasks.getTasks(I(I({},e),{},{indexUids:[this.uid]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getTask",value:function(){var t=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTask(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"waitForTasks",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u,s=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=n.timeOutMs,i=void 0===r?5e3:r,a=n.intervalMs,u=void 0===a?50:a,t.next=3,this.tasks.waitForTasks(e,{timeOutMs:i,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"waitForTask",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u,s=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=n.timeOutMs,i=void 0===r?5e3:r,a=n.intervalMs,u=void 0===a?50:a,t.next=3,this.tasks.waitForTask(e,{timeOutMs:i,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getStats",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/stats"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getDocuments",value:function(){var t=p(E().mark((function t(){var e,n,r,i,a,u,s=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(e=j(e=s.length>0&&void 0!==s[0]?s[0]:{})).filter){t.next=16;break}return t.prev=3,n="indexes/".concat(this.uid,"/documents/fetch"),t.next=7,this.httpRequest.post(n,e);case 7:case 20:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(3),(t.t0 instanceof M||t.t0 instanceof C)&&(t.t0.message=F(t.t0.message,"getDocuments")),t.t0;case 14:t.next=21;break;case 16:return a="indexes/".concat(this.uid,"/documents"),u=Array.isArray(null===(r=e)||void 0===r?void 0:r.fields)?{fields:null===(i=e)||void 0===i||null===(i=i.fields)||void 0===i?void 0:i.join(",")}:{},t.next=20,this.httpRequest.get(a,I(I({},e),u));case 21:case"end":return t.stop()}}),t,this,[[3,10]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"getDocument",value:functio
1n(){var t=p(E().mark((function t(e,n){var r,i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents/").concat(e),i=function(){var t;if(Array.isArray(null==n?void 0:n.fields))return null==n||null===(t=n.fields)||void 0===t?void 0:t.join(",")}(),t.next=4,this.httpRequest.get(r,j(I(I({},n),{},{fields:i})));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},{key:"addDocuments",value:function(){var t=p(E().mark((function t(e,n){var r,i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.post(r,e,n);case 3:return i=t.sent,t.abrupt("return",new J(i));case 5:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},{key:"addDocumentsFromString",value:function(){var t=p(E().mark((function t(e,n,r){var i,a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.post(i,e,r,{headers:{"Content-Type":n}});case 3:return a=t.sent,t.abrupt("return",new J(a));case 5:case"end":return t.stop()}}),t,this)})));function e(e,n,r){return t.apply(this,arguments)}return e}()},{key:"addDocumentsInBatches",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:1e3,r=u.length>2?u[2]:void 0,i=[],a=0;case 4:if(!(a<e.length)){t.next=13;break}return t.t0=i,t.next=8,this.addDocuments(e.slice(a,a+n),r);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:a+=n,t.next=4;break;case 13:return t.abrupt("return",i);case 14:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"updateDocuments",value:function(){var t=p(E().mark((function t(e,n){var r,i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.put(r,e,n);case 3:return i=t.sent,t.abrupt("return",new J(i));case 5:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},{key:"updateDocumentsInBatches",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:1e3,r=u.length>2?u[2]:void 0,i=[],a=0;case 4:if(!(a<e.length)){t.next=13;break}return t.t0=i,t.next=8,this.updateDocuments(e.slice(a,a+n),r);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:a+=n,t.next=4;break;case 13:return t.abrupt("return",i);case 14:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"updateDocumentsFromString",value:function(){var t=p(E().mark((function t(e,n,r){var i,a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.put(i,e,r,{headers:{"Content-Type":n}});case 3:return a=t.sent,t.abrupt("return",new J(a));case 5:case"end":return t.stop()}}),t,this)})));function e(e,n,r){return t.apply(this,arguments)}return e}()},{key:"deleteDocument",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/documents/").concat(e),t.next=3,this.httpRequest.delete(n);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"deleteDocuments",value:function(){var t=p(E().mark((function t(e){var n,r,i,a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!Array.isArray(e)&&"object"===O(e),r=n?"documents/delete":"documents/delete-batch",i="indexes/".concat(this.uid,"/").concat(r),t.prev=3,t.next=6,this.httpRequest.post(i,e);case 6:return a=t.sent,t.abrupt("return",new J(a));case 10:throw t.prev=10,t.t0=t.catch(3),(t.t0 instanceof M&&n||t.t0 instanceof C)&&(t.t0.message=F(t.t0.message,"deleteDocuments")),t.t0;case 14:case"end":return t.stop()}}),t,this,[[3,10]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"deleteAllDocuments",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateDocumentsByFunction",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/documents/edit"),t.next=3,this.httpRequest.post(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getSettings",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateSettings",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.patch(n,e);case 3:return(r=t.sent).enqueued=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetSettings",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getPagination",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updatePagination",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.patch(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetPagination",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new J(n));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getSynonyms",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateSynonyms",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetSynonyms",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getStopWords",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateStopWords",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetStopWords",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getRankingRules",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateRankingRules",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetRankingRules",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getDistinctAttribute",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateDistinctAttribute",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetDistinctAttribute",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getFilterableAttributes",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateFilterableAttributes",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetFilterableAttributes",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getSortableAttributes",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateSortableAttributes",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetSortableAttributes",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getSearchableAttributes",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateSearchableAttributes",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetSearchableAttributes",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getDisplayedAttributes",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRe
1quest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateDisplayedAttributes",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetDisplayedAttributes",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getTypoTolerance",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateTypoTolerance",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.patch(n,e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetTypoTolerance",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getFaceting",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateFaceting",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.patch(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetFaceting",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new J(n));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getSeparatorTokens",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateSeparatorTokens",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetSeparatorTokens",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getNonSeparatorTokens",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateNonSeparatorTokens",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetNonSeparatorTokens",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getDictionary",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateDictionary",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetDictionary",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getProximityPrecision",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateProximityPrecision",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetProximityPrecision",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getEmbedders",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateEmbedders",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.patch(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetEmbedders",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getSearchCutoffMs",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/search-cutoff-ms"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateSearchCutoffMs",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/search-cutoff-ms"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetSearchCutoffMs",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/search-cutoff-ms"),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new J(n));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getLocalizedAttributes",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/localized-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"updateLocalizedAttributes",value:function(){var t=p(E().mark((function t(e){var n,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/localized-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetLocalizedAttributes",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/localized-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new J(n));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}],[{key:"create",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u,s=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=s.length>2?s[2]:void 0,i="indexes",a=new z(r),t.next=6,a.post(i,I(I({},n),{},{uid:e}));case 6:return u=t.sent,t.abrupt("return",new J(u));case 8:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()}])}(),et=function(){function t(e){f(this,t),y(this,"config",void 0),y(this,"httpRequest",void 0),y(this,"tasks",void 0),this.config=e,this.httpRequest=new z(e),this.tasks=new $(e)}return v(t,[{key:"index",value:function(t){return new tt(this.config,t)}},{key:"getIndex",value:function(){var t=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new tt(this.config,e).fetchInfo());case 1:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getRawIndex",value:function(){var t=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new tt(this.config,e).getRawInfo());case 1:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getIndexes",value:function(){var t=p(E().mark((function t(){var e,n,r,i=this,a=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},t.next=3,this.getRawIndexes(e);case 3:return n=t.sent,r=n.results.map((function(t){return new tt(i.config,t.uid,t.primaryKey)})),t.abrupt("return",I(I({},n),{},{results:r}));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getRawIndexes",value:function(){var t=p(E().mark((function t(){var e,n,r=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},n="indexes",t.next=4,this.httpRequest.get(n,e);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"createIndex",value:function(){var t=p(E().mark((function t(e){var n,r=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},t.next=3,tt.create(e,n,this.config);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"updateIndex",value:function(){var t=p(E().mark((function t(e){var n,r=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},t.next=3,new tt(this.config,e).update(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"deleteIndex",value:function(){var t=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new tt(this.config,e).delete();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"deleteIndexIfExists",value:function(){var t=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.deleteIndex(e);case 3:return t.abrupt("return",!0);case 6:if(t.prev=6,t.t0=t.catch(0),t.t0.code!==a.INDEX_NOT_FOUND){t.next=10;break}return t.abrupt("return",!1);case 10:throw t.t0;case 11:case"end":return t.stop()}}),t,this,[[0,6]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"swapIndexes",value:function(){var t=p(E().mark((function t(e){var n;return E().wrap((function(t){for(;;
1)switch(t.prev=t.next){case 0:return n="/swap-indexes",t.next=3,this.httpRequest.post(n,e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"multiSearch",value:function(){var t=p(E().mark((function t(e,n){var r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="multi-search",t.next=3,this.httpRequest.post(r,e,void 0,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},{key:"getTasks",value:function(){var t=p(E().mark((function t(){var e,n=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,this.tasks.getTasks(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getTask",value:function(){var t=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTask(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"waitForTasks",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u,s=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=n.timeOutMs,i=void 0===r?5e3:r,a=n.intervalMs,u=void 0===a?50:a,t.next=3,this.tasks.waitForTasks(e,{timeOutMs:i,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"waitForTask",value:function(){var t=p(E().mark((function t(e){var n,r,i,a,u,s=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=n.timeOutMs,i=void 0===r?5e3:r,a=n.intervalMs,u=void 0===a?50:a,t.next=3,this.tasks.waitForTask(e,{timeOutMs:i,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"cancelTasks",value:function(){var t=p(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.cancelTasks(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"deleteTasks",value:function(){var t=p(E().mark((function t(){var e,n=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,this.tasks.deleteTasks(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getKeys",value:function(){var t=p(E().mark((function t(){var e,n,r,i=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},n="keys",t.next=4,this.httpRequest.get(n,e);case 4:return(r=t.sent).results=r.results.map((function(t){return I(I({},t),{},{createdAt:new Date(t.createdAt),updatedAt:new Date(t.updatedAt)})})),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getKey",value:function(){var t=p(E().mark((function t(e){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys/".concat(e),t.next=3,this.httpRequest.get(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"createKey",value:function(){var t=p(E().mark((function t(e){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys",t.next=3,this.httpRequest.post(n,e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"updateKey",value:function(){var t=p(E().mark((function t(e,n){var r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="keys/".concat(e),t.next=3,this.httpRequest.patch(r,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},{key:"deleteKey",value:function(){var t=p(E().mark((function t(e){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys/".concat(e),t.next=3,this.httpRequest.delete(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"health",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="health",t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"isHealthy",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e="health",t.next=4,this.httpRequest.get(e);case 4:return t.abrupt("return",!0);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",!1);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"getStats",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="stats",t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getVersion",value:function(){var t=p(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="version",t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"createDump",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="dumps",t.next=3,this.httpRequest.post(e);case 3:return n=t.sent,t.abrupt("return",new J(n));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"createSnapshot",value:function(){var t=p(E().mark((function t(){var e,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="snapshots",t.next=3,this.httpRequest.post(e);case 3:return n=t.sent,t.abrupt("return",new J(n));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"generateTenantToken",value:function(t,e,n){var r=new Error;return r.message="Meilisearch: failed to generate a tenant token. Generation of a token only w
1orks in a node environment \n ".concat(r.stack,"."),Promise.reject(r)}}])}(),nt=function(t){function e(t){return f(this,e),h(this,e,[t])}return w(e,t),v(e)}(et);t.ContentTypeEnum=n,t.ErrorStatusCode=a,t.Index=tt,t.MatchingStrategies=e,t.MeiliSearch=nt,t.MeiliSearchApiError=C,t.MeiliSearchError=L,t.MeiliSearchRequestError=M,t.MeiliSearchTimeOutError=U,t.Meilisearch=nt,t.TaskStatus=r,t.TaskTypes=i,t.default=nt,t.versionErrorHintMessage=F,Object.defineProperty(t,"__esModule",{value:!0})}))})),c=u(o),p=Object.freeze(Object.assign(Object.create(null),o,{default:c}));function h(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}function f(t){return e(e({},{placeholderSearch:!0,keepZeroFacets:!1,clientAgents:[],finitePagination:!1}),t)}function d(t){if("function"==typeof t){var e=t();if("string"!=typeof e)throw new TypeError("Provided apiKey function (2nd parameter) did not return a string, expected string");return e}return t}function l(t,e,n){var r=n.requestConfig,i=n.httpClient;if("string"!=typeof t)throw new TypeError("Provided hostUrl value (1st parameter) is not a string, expected string");if("string"!=typeof e&&"function"!=typeof e)throw new TypeError("Provided apiKey value (2nd parameter) is not a string or a function, expected string or function");if(void 0!==r&&!h(r))throw new TypeError("Provided requestConfig should be an object");if(i&&"function"!=typeof i)throw new TypeError("Provided custom httpClient should be a function")}function v(t,n){return{multiSearch:function(r,u){return i(this,void 0,void 0,(function(){var i,s,o,c;return a(this,(function(a){switch(a.label){case 0:return i=n.formatKey([r]),(s=n.getEntry(i))?[2,s]:[4,t.multiSearch({queries:r})];case 1:return o=a.sent(),c=o.results.map((function(t,n){return e(e({},t),{pagination:u[n]||{}})})),n.setEntry(i,c),[2,c]}}))}))}}}function _(t){var e,n,r,i=t.insideBoundingBox,a=t.aroundLatLng,u=t.aroundRadius,s=t.minimumAroundRadius;if(a){var o=a.split(",").map((function(t){return Number.parseFloat(t).toFixed(5)}));e=[l=o[0],v=o[1]]}if(null==u&&null==s||("all"===u?console.warn("instant-meilisearch is not compatible with the `all` value on the aroundRadius parameter"):n=null!=u?u:s),i&&"string"==typeof i){var c=i.split(",").map((function(t){return parseFloat(t)})),p=c[0],h=c[1],f=c[2],d=c[3];r="_geoBoundingBox([".concat(p,", ").concat(h,"], [").concat(f,", ").concat(d,"])")}else if(null!=e&&null!=n){var l=e[0],v=e[1];r="_geoRadius(".concat(l,", ").concat(v,", ").concat(n,")")}return r}var y=/([\\"])/g;function g(t){return t.replace(y,"\\$1")}function w(t){var e=g(t),n=e.indexOf(":"),r=e.slice(0,n),i=e.slice(n+1);return'"'.concat(r,'"="').concat(i,'"')}function m(t){var e=function(){var e=t.match(/^([^<!>:=]*)([<!>:=]+)(.*)$/);if(e){var n=e.slice(1),r=n[0],i=n[1],a=n[2],u=(i.match(/^([<!>]?=|<|>|:){1}(.*)/)||["",""]).slice(1);return[r,u[0],u[1]+a]}return[t,"",""]},n=e(),r=n[0],i=n[1],a=n[2],u=g(r);return'"'.concat(u.trim(),'"').concat(":"===i?" ":i).concat(a.trim())}function x(t,e){return"string"==typeof e?t(e):e.map((function(e){return"string"==typeof e?t(e):e.map((function(e){return t(e)}))}))}function b(t){return"string"==typeof t?[t]:t}function k(t,e,n){var r=b(e),i=b(n),a=[];return void 0!==t&&a.push(t),void 0!==r&&a.push.apply(a,r),void 0!==i&&a.push.apply(a,i),a}function A(t,e,n){return k(t,void 0!==e?x(m,e):e,void 0!==n?x(w,n):n)}function I(t,e,n){return!!(n||e||t&&0!==t.length)}function T(t,e){var n=t.page,r=t.hitsPerPage;return e?{limit:r+1,offset:n*r}:{limit:0,offset:0}}function E(t,e){var n=t.page,r=t.hitsPerPage;return e?{hitsPerPage:r,page:n+1}:{hitsPerPage:0,page:n+1}}function S(t){var e=t.query,n=t.indexUid,r=t.facets,i=t.attributesToSnippet,a=t.snippetEllipsisText,u=t.filters,s=t.numericFilters,o=t.facetFilters,c=t.attributesToRetrieve,p=t.attributesToHighlight,h=t.highlightPreTag,f=t.highlightPostTag,d=t.placeholderSearch,l=t.pagination,v=t.sort,y=t.restrictSearchableAttributes,g=t.meiliSearchParams,w={indexUid:n},m=A(u,s,o);return{getParams:function(){return w},addQuery:function(){w.q=e},addFacets:function(){var t=r;void 0!==t&&(w.facets="string"==typeof t?[t]:t)},addAttributesToCrop:function(){var t,e=null!==(t=null==g?void 0:g.attributesToCrop)&&void 0!==t?t:i;void 0!==e&&(w.attributesToCrop=e)},addCropLength:function(){var t=null==g?void 0:g.cropLength;void 0!==t&&(w.cropLength=t)},addCropMarker:function(){var t,e=null!==(t=null==g?void 0:g.cropMarker)&&void 0!==t?t:a;void 0!==e&&(w.cropMarker=e)},addFilters:function(){m.length&&(w.filter=m)},addAttributesToRetrieve:function(){var t,e=null!==(t=null==g?void 0:g.attributesToRetrieve)&&void 0!==t?t:c;void 0!==e&&(w.attributesToRetrieve=e)},addAttributesToHighlight:function(){var t,e;w.attributesToHighlight=null!==(e=null!==(t=null==g?void 0:g.attributesToHighlight)&&void 0!==t?t:p)&&void 0!==e?e:["*"]},addPreTag:function(){var t,e;w.highlightPreTag=null!==(e=null!==(t=null==g?void 0:g.highlightPreTag)&&void 0!==t?t:h)&&void 0!==e?e:"__ais-highlight__"},addPostTag:function(){var t,e;w.highlightPostTag=null!==(e=null!==(t=null==g?void 0:g.highlightPostTag)&&void 0!==t?t:f)&&void 0!==e?e:"__/ais-highlight__"},addPagination:function(){var t=I(m,e,d);if(l.finite){var n=E(l,t),r=n.hitsPerPage,i=n.page;w.hitsPerPage=r,w.page=i}else{var a=T(l,t),u=a.limit,s=a.offset;w.limit=u,w.offset=s}},addSort:function(){(null==v?void 0:v.length)&&(w.sort=Array.isArray(v)?v:[v])},addGeoSearchFilter:function(){var e=_({insideBoundingBox:t.insideBoundingBox,aroundLatLng:t.aroundLatLng,aroundRadius:t.aroundRadius,minimumAroun
1dRadius:t.minimumAroundRadius});void 0!==e&&(Array.isArray(w.filter)?w.filter.unshift(e):w.filter=[e])},addShowMatchesPosition:function(){var t=null==g?void 0:g.showMatchesPosition;void 0!==t&&(w.showMatchesPosition=t)},addMatchingStrategy:function(){var t=null==g?void 0:g.matchingStrategy;void 0!==t&&(w.matchingStrategy=t)},addShowRankingScore:function(){var t=null==g?void 0:g.showRankingScore;void 0!==t&&(w.showRankingScore=t)},addAttributesToSearchOn:function(){var t=void 0!==(null==g?void 0:g.attributesToSearchOn)?g.attributesToSearchOn:y;void 0!==t&&(w.attributesToSearchOn=t)},addHybridSearch:function(){var t=null==g?void 0:g.hybrid;void 0!==t&&(w.hybrid=t)},addDistinct:function(){var t=null==g?void 0:g.distinct;void 0!==t&&(w.distinct=t)},addRankingScoreThreshold:function(){var t=null==g?void 0:g.rankingScoreThreshold;void 0!==t&&(w.rankingScoreThreshold=t)}}}function R(t){var e=S(t);return e.addQuery(),e.addFacets(),e.addAttributesToCrop(),e.addCropLength(),e.addCropMarker(),e.addFilters(),e.addAttributesToRetrieve(),e.addAttributesToHighlight(),e.addPreTag(),e.addPostTag(),e.addPagination(),e.addSort(),e.addGeoSearchFilter(),e.addShowMatchesPosition(),e.addMatchingStrategy(),e.addShowRankingScore(),e.addAttributesToSearchOn(),e.addHybridSearch(),e.addDistinct(),e.addRankingScoreThreshold(),e.getParams()}function D(t){var e=[];return function(n){return!e.includes(n[t])&&(e.push(n[t]),!0)}}function N(t){return t.reduce((function(t,e){return t+JSON.stringify(e)}),"")}function O(t){return"string"==typeof t?t:void 0===t?JSON.stringify(null):JSON.stringify(t)}function P(t){return Array.isArray(t)?t.map((function(t){return P(t)})):h(t)?Object.keys(t).reduce((function(e,n){return e[n]=P(t[n]),e}),{}):{value:O(t)}}function q(t){if(!t)return{};var e=P(t);return{_highlightResult:e,_snippetResult:e}}function L(t){for(var e,n=0;n<t.length;n++){var r="".concat(n+1e6*Math.random());t[n]._geo&&(t[n]._geoloc=t[n]._geo,t[n].objectID||(t[n].objectID=r)),(null===(e=t[n]._formatted)||void 0===e?void 0:e._geo)&&(t[n]._formatted._geoloc=t[n]._formatted._geo,t[n]._formatted.objectID||(t[n]._formatted.objectID=r))}return t}function C(t,e){var n=t.hits,i=t.pagination.hitsPerPage,a=e.finitePagination,u=e.primaryKey;!a&&n.length>i&&n.splice(n.length-1,1);var s=n.map((function(t){var n;if(Object.keys(t).length>0){var i=t._formatted,a=t._matchesPosition,s=r(t,["_formatted","_matchesPosition"]),o=Object.assign(s,q(i));return(null===(n=null==e?void 0:e.meiliSearchParams)||void 0===n?void 0:n.showMatchesPosition)&&(o._matchesPosition=a),u&&(o.objectID=t[u]),o}return t}));return s=L(s)}function M(t){var e=t.hitsPerPage,n=void 0===e?0:e,r=t.totalPages,i=void 0===r?0:r,a=t.estimatedTotalHits,u=t.totalHits;return null!=a?a:null!=u?u:n*i}function U(t,e){if(null!=t.totalPages)return t.totalPages;if(0===e)return 0;var n=t.limit,r=void 0===n?20:n,i=t.offset;return(void 0===i?0:i)/e+1+(t.hits.length>=r?1:0)}function F(t,e){var n=e.hitsPerPage;return{page:e.page,nbPages:U(t,n),hitsPerPage:n}}function j(t){return t?"string"==typeof t?[t]:t:[]}function V(t,e,n){for(var r={},i=0,a=j(t);i<a.length;i++){var u=a[i];for(var s in e[u])r[u]||(r[u]=n[u]||{}),r[u][s]?r[u][s]=n[u][s]:r[u][s]=0}return r}function K(t,e,n,r){return t?V(e,n,r=r||{}):r}function H(t){return Object.keys(t).reduce((function(n,r){return n[r]=e(e({},t[r]),{avg:0,sum:0}),n}),{})}function G(t,e,n){return{results:t.map((function(t){return B(t,e[t.indexUid],n)}))}}function B(t,e,n){var r=t.processingTimeMs,i=t.query,a=t.indexUid,u=t.facetDistribution,s=void 0===u?{}:u,o=t.facetStats,c=void 0===o?{}:o,p=Object.keys(s),h=F(t,t.pagination),f=h.hitsPerPage,d=h.page,l=h.nbPages,v=C(t,n),_=M(t);return{index:a,hitsPerPage:f,page:d,facets:K(n.keepZeroFacets,p,e,s),nbPages:l,nbHits:_,processingTimeMS:r,query:i,hits:v,params:"",exhaustiveNbHits:!1,facets_stats:H(c)}}function Y(t){if(!t)return[];for(var e,n=/[^:]+:(?:asc|desc)/g,r=[];null!==(e=n.exec(t));)r.push(e[0]);return r.map((function(t){return t.replace(/^,+|,+$/,"")}))}function X(t,e,n){return{hitsPerPage:void 0===e?20:e,page:n||0,finite:!!t}}function W(t){var e=t.indexOf(":");return-1===e?{indexUid:t,sortBy:""}:{indexUid:t.substring(0,e),sortBy:t.substring(e+1)}}function Q(t,n){var r=t.query,i=t.indexName,a=t.params,u=W(i),s=u.indexUid,o=u.sortBy,c=X(n.finitePagination,null==a?void 0:a.hitsPerPage,null==a?void 0:a.page);return e(e(e(e({},n),{query:r}),a),{sort:Y(o),indexUid:s,pagination:c,placeholderSearch:!1!==n.placeholderSearch,keepZeroFacets:!!n.keepZeroFacets})}function z(t,n){var r=W(t.indexName),i=r.indexUid,a=r.sortBy,u=t.params,s=X(n.finitePagination,null==u?void 0:u.hitsPerPage,null==u?void 0:u.page);return e(e(e({},n),u),{sort:Y(a),indexUid:i,pagination:s,placeholderSearch:!1!==n.placeholderSearch,keepZeroFacets:!!n.keepZeroFacets})}function J(t){void 0===t&&(t={});var e=t;return{getEntry:function(t){if(e[t])try{return JSON.parse(e[t])}catch(n){return}},formatKey:function(t){return N(t)},setEntry:function(t,n){e[t]=JSON.stringify(n)},clearCache:function(){e={}}}}function Z(t){var n=S(e(e({},t),{placeholderSearch:!0,query:""}));return n.addFacets(),n.addPagination(),n.getParams()}function $(t,e,n){return i(this,void 0,void 0,(function(){var r,i,u,s,o,c;return a(this,(function(a){switch(a.label){case 0:return r=D("indexUid"),i=e.filter(r).filter((function(t){var e=t.indexUid;return!Object.keys(n).includes(e)})),0===i.length?[2,n]:[4,t.multiSearch(i,[])];case 1:for(u=a.sent(),s=0,o=u;s<o.length;s++)c=o[s],n[c.indexUid]=c.facetDistribution||{};return[2,n]}}))}))}function tt(t,n){for(var r=0,i=n;r<i.length;r++){var a=i[r];t[a.indexUid]=e(e({},a.facetDistribution||{}),t[a.indexUid]||{})}return t}var et="0.22.0",nt=function(t){void 0===t&&(t=[]);
1var e="Meilisearch instant-meilisearch (v".concat(et,")");return t.concat(e)};function rt(t,n,r){void 0===n&&(n=""),void 0===r&&(r={}),l(t,n,r);var u={host:t,apiKey:n=d(n),clientAgents:nt(r.clientAgents)};void 0!==r.httpClient&&(u.httpClient=r.httpClient),void 0!==r.requestConfig&&(u.requestConfig=r.requestConfig);var s=new o.MeiliSearch(u),c=J(),p=v(s,c),h={},_=f(r);return{meiliSearchInstance:s,setMeiliSearchParams:function(t){var n=r.meiliSearchParams;r.meiliSearchParams=void 0===n?t:e(e({},n),t)},searchClient:{clearCache:function(){return c.clearCache()},search:function(t){return i(this,void 0,void 0,(function(){var e,n,i,u,s,o,c,f,d,l,v;return a(this,(function(a){switch(a.label){case 0:for(a.trys.push([0,3,,4]),e=[],n=[],i=[],u=0,s=t;u<s.length;u++)o=s[u],c=Q(o,r),f=R(c),e.push(f),d=Z(c),i.push(d),n.push(c.pagination);return[4,$(p,i,h)];case 1:return h=a.sent(),[4,p.multiSearch(e,n)];case 2:return l=a.sent(),h=tt(h,l),[2,G(l,h,_)];case 3:throw v=a.sent(),console.error(v),new Error(v);case 4:return[2]}}))}))},searchForFacetValues:function(t){return i(this,void 0,void 0,(function(){var n,i,u,o,c,p,h,f,d,l;return a(this,(function(a){switch(a.label){case 0:n=[],i=0,u=t,a.label=1;case 1:return i<u.length?(o=u[i],c=z(o,r),p=R(c),delete(h=e(e({},p),{facetQuery:o.params.facetQuery,facetName:o.params.facetName})).indexUid,[4,s.index(c.indexUid).searchForFacetValues(h)]):[3,4];case 2:f=a.sent(),d=f.facetHits.map((function(t){return e(e({},t),{highlighted:t.value})})),l={facetHits:d,exhaustiveFacetsCount:!1,processingTimeMS:f.processingTimeMs},n.push(l),a.label=3;case 3:return i++,[3,1];case 4:return[2,n]}}))}))}}}}t.instantMeiliSearch=rt,t.meilisearch=p,Object.defineProperty(t,"__esModule",{value:!0})}(e)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.