1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="8ce43ea9-5734-4cf9-81b1-fadc392de493",t._sentryDebugIdIdentifier="sentry-dbid-8ce43ea9-5734-4cf9-81b1-fadc392de493")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8311],{28482:function(t,e,n){(function(t){"use strict";var e,r,i=function(){return(i=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}).apply(this,arguments)};function a(t,e,n,r){return new(n||(n=Promise))(function(i,a){function s(t){try{o(r.next(t))}catch(t){a(t)}}function u(t){try{o(r.throw(t))}catch(t){a(t)}}function o(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(s,u)}o((r=r.apply(t,e||[])).next())})}function s(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(o){return function(u){if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,o])}}}"function"==typeof SuppressedError&&SuppressedError,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var u=(e=r={exports:{}},function(t){var e={TASK_SUCCEEDED:"succeeded",TASK_PROCESSING:"processing",TASK_FAILED:"failed",TASK_ENQUEUED:"enqueued",TASK_CANCELED:"canceled"},n={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",INVA
1LID_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 r(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?r(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function a(){a=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",o=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function p(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,n){return t[e]=n}}function h(e,n,r,a){var s,u,o=Object.create((n&&n.prototype instanceof y?n:y).prototype);return i(o,"_invoke",{value:(s=new S(a||[]),u=l,function(n,i){if(u===f)throw Error("Generator is already running");if(u===v){if("throw"===n)throw i;return{value:t,done:!0}}for(s.method=n,s.arg=i;;){var a=s.delegate;if(a){var o=function e(n,r){var i=r.method,a=n.iterator[i];if(a===t)return r.delegate=null,"throw"===i&&n.iterator.return&&(r.method="return",r.arg=t,e(n,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+i+"' method")),_;var s=d(a,n.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,_;var u=s.arg;return u?u.done?(r[n.resultName]=u.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,_):u:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,_)}(a,s);if(o){if(o===_)continue;return o}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(u===l)throw u=v,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);u=f;var c=d(e,r,s);if("normal"===c.type){if(u=s.done?v:"suspendedYield",c.arg===_)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(u=v,s.method="throw",s.arg=c.arg)}})}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var l="suspendedStart",f="executing",v="completed",_={};function y(){}function g(){}function m(){}var w={};p(w,u,function(){return this});var x=Object.getPrototypeOf,b=x&&x(x(D([])));b&&b!==n&&r.call(b,u)&&(w=b);var k=m.prototype=y.prototype=Object.create(w);function A(t){["next","throw","return"].forEach(function(e){p(t,e,function(t){return this._invoke(e,t)})})}function I(t,e){var n;i(this,"_invoke",{value:function(i,a){function s(){return new e(function(n,s){!function n(i,a,s,u){var o=d(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,s,u)},function(t){n("throw",t,s,u)}):e.resolve(p).then(function(t){c.value=t,s(c)},function(t){return n("throw",t,s,u)})}u(o.arg)}(i,a,n,s)})}return n=n?n.then(s,s):s()}})}function T(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function D(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 TypeError(typeof e+" is not iterable")}return g.prototype=m,i(k,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=p(m,c,"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,m):(t.__proto__=m,p(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(I.prototype),p(I.prototype,o,function(){return this}),e.AsyncIterator=I,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var s=new I(h(t,n,r,i),a);return e.isGeneratorFunction(n)?s:s.next().then(function(t){return t.done?t.value:s.next()})},A(k),p(k,c,"Generator"),p(k,u,function(){return this}),p(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=D,S.prototype={constructor:S,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.forEac
1h(E),!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 u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],u=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var o=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(o&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(o){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.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 s=a?a.completion:{};return s.type=t,s.arg=e,a?(this.method="next",this.next=a.finallyLoc,_):this.complete(s)},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),E(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;E(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),_}},e}function s(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function u(t){return(u="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)}function o(t,e,n,r,i,a,s){try{var u=t[a](s),o=u.value}catch(t){n(t);return}u.done?e(o):Promise.resolve(o).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,u,"next",t)}function u(t){o(a,r,i,s,u,"throw",t)}s(void 0)})}}function p(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function h(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,s(r.key),r)}}function d(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){if("function"!=typeof e&&null!==e)throw 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&&_(t,e)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _(t,e){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function y(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function g(t,e,n){return(g=y()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&_(i,n.prototype),i}).apply(null,arguments)}function m(t){var e="function"==typeof Map?new Map:void 0;return(m=function(t){if(null===t||!function(t){try{return -1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw 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 g(t,arguments,v(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_(n,t)})(t)}function w(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t){var e=y();return function(){var n,r=v(t);return n=e?Reflect.construct(r,arguments,v(this).constructor):r.apply(this,arguments),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return w(t)}(this,n)}}function b(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(t,e)}}function k(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}var A=function(t){f(n,t);var e=x(n);function n(){var t;p(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return l(w(t=e.call.apply(e,[this].concat(i))),"name","MeiliSearchError"),t}return d(n)}(m(Error)),I=function(t){f(n,t);var e=x(n);function n(t,r){var i,a;return p(this,n),l(w(a=e.call(this,null!==(i=null==r?void 0:r.message)&&void 0!==i?i:"".concat(t.status,": ").concat(t.statusText))),"name","MeiliSearchApiError"),l(w(a),"cause",void 0),l(w(a),"response",void 0),a.response=t,void 0!==r&&(a.cause=r),a}return d(n)}(A),T=function(t){f(n,t);var e=x(n);function n(t,r){var i;return p(this,n),l(w(i=e.call(this,"Request to ".concat(t," has failed"),{cause:r})),"name","MeiliSearchRequestError"),i}return d(n)}(A),E=function(t){f(n,t);var e=x(n);function n(t){var r;return p(this,n),l(w(r=e.call(this,t)),"name","MeiliSearchTimeOutError"),r}return d(n)}(A);function S(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 D(t){return Object.entries(t).reduce(function(t,e){var n=function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,s,u=[],o=!0,c=!1;try{for(a=(n=n.call(t)).next;
1!(o=(r=a.call(n)).done)&&(u.push(r.value),2!==u.length);o=!0);}catch(t){c=!0,i=t}finally{try{if(!o&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return u}}(e,2)||b(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],i=n[1];return void 0!==i&&(t[r]=i),t},{})}function R(){return(R=c(a().mark(function t(e){return a().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 N(t){return Object.keys(t).reduce(function(e,n){var r=t[n];return void 0===r?e:Array.isArray(r)?i(i({},e),{},l({},n,r.join(","))):r instanceof Date?i(i({},e),{},l({},n,r.toISOString())):i(i({},e),{},l({},n,r))},{})}var O=function(){var t,e,n,r,s,u,o;function h(t){p(this,h),l(this,"headers",void 0),l(this,"url",void 0),l(this,"requestConfig",void 0),l(this,"httpClient",void 0),l(this,"requestTimeout",void 0),this.headers=function(t){var e,n,r="X-Meilisearch-Client",i="Meilisearch JavaScript (v".concat("0.42.0",")"),a="Authorization",s=function(t){if(Array.isArray(t))return t.reduce(function(t,e){return t[e[0]]=e[1],t},{});if(!("has"in t))return Object.assign({},t);var e={};return t.forEach(function(t,n){return e[n]=t}),e}(null!==(e=null===(n=t.requestConfig)||void 0===n?void 0:n.headers)&&void 0!==e?e:{});if(t.apiKey&&!s[a]&&(s[a]="Bearer ".concat(t.apiKey)),s["Content-Type"]||(s["Content-Type"]="application/json"),t.clientAgents&&Array.isArray(t.clientAgents)){var u=t.clientAgents.concat(i);s[r]=u.join(" ; ")}else if(t.clientAgents&&!Array.isArray(t.clientAgents))throw new A('Meilisearch: The header "'.concat(r,'" should be an array of string(s).\n'));else s[r]=i;return s}(t),this.requestConfig=t.requestConfig,this.httpClient=t.httpClient,this.requestTimeout=t.timeout;try{var e=function(t){try{var e,n;return(n=t=(e=t).startsWith("https://")||e.startsWith("http://")?e:"http://".concat(e)).endsWith("/")||(n+="/"),t=n}catch(t){throw new A("The provided host is not valid.")}}(t.host);this.url=new URL(e)}catch(t){throw new A("The provided host is not valid.")}}return d(h,[{key:"request",value:(t=c(a().mark(function t(e){var n,r,s,u,o,c,p,h,d,l,f,v,_,y;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.method,s=e.url,u=e.params,o=e.body,p=void 0===(c=e.config)?{}:c,h=new URL(s,this.url),u&&(d=new URLSearchParams,Object.keys(u).filter(function(t){return null!==u[t]}).map(function(t){return d.set(t,u[t])}),h.search=d.toString()),null!==(n=p.headers)&&void 0!==n&&n["Content-Type"]||(o=JSON.stringify(o)),l=i(i({},this.headers),p.headers),f=this.fetchWithTimeout(h.toString(),i(i(i({},p),this.requestConfig),{},{method:r,body:o,headers:l}),this.requestTimeout),t.next=9,f.catch(function(t){throw new T(h.toString(),t)});case 9:if(v=t.sent,!(void 0!==this.httpClient)){t.next=12;break}return t.abrupt("return",v);case 12:return t.next=14,v.text();case 14:if(y=""===(_=t.sent)?void 0:JSON.parse(_),v.ok){t.next=18;break}throw new I(v,y);case 18:return t.abrupt("return",y);case 19:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"fetchWithTimeout",value:(e=c(a().mark(function t(e,n,r){var i=this;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,a){var s,u=[(i.httpClient?i.httpClient:fetch)(e,n)];if(r){var o=new Promise(function(t,e){s=setTimeout(function(){e(Error("Error: Request Timed Out"))},r)});u.push(o)}Promise.race(u).then(t).catch(a).finally(function(){clearTimeout(s)})}));case 1:case"end":return t.stop()}},t)})),function(t,n,r){return e.apply(this,arguments)})},{key:"get",value:(n=c(a().mark(function t(e,n,r){return a().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(t,e,r){return n.apply(this,arguments)})},{key:"post",value:(r=c(a().mark(function t(e,n,r,i){return a().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(t,e,n,i){return r.apply(this,arguments)})},{key:"put",value:(s=c(a().mark(function t(e,n,r,i){return a().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(t,e,n,r){return s.apply(this,arguments)})},{key:"patch",value:(u=c(a().mark(function t(e,n,r,i){return a().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(t,e,n,r){return u.apply(this,arguments)})},{key:"delete",value:(o=c(a().mark(function t(e,n,r,i){return a().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(t,e,n,r){return o.apply(this,arguments)})}]),h}(),P=d(function t(e){p(this,t),l(this,"taskUid",void 0),l(this,"indexUid",void 0),l(this,"status",void 0),l(this,"type",void 0),l(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)}),q=d(function t(e){p(this,t),l(this,"indexUid",void 0),l(this,"status",void 0),l(this,"type",void 0),l(this,"uid",void 0),l(this,"canceledBy",void 0),l(this,"details",void 0),l(this,"error",void 0),l(this,"duration",void 0),l(this,"startedAt",void 0),l(this,"enqueuedAt",void 0),l(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)}),L=function(){var t,n,r,s,u,o;function h(t){p(this,h),l(this,"httpRequest",void 0),this.httpRequest=new O(t)}return d(h,[{key:"getTask",value:(t=c(a().mark(function t(e){var n,r;return a().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 q(r));case 5:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"getTasks",value:(n=c(a().mark(function t(){var e,n,r,s=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=s.length>0&&void 0!==s[0]?s[0]:{},n="tasks",t.next=4,this.httpRequest.get(n,N(e));case 4:return r=t.sent,t.abrupt("return",i(i({},r),{},{results:r.results.map(function(t){return new q(t)})}));case 6:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"waitForTask",value:(r=c(a().mark(function t(n){var r,i,s,u,o,c,p,h=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:s=void 0===(i=(r=h.length>1&&void 0!==h[1]?h[1]:{}).timeOutMs)?5e3:i,o=void 0===(u=r.intervalMs)?50:u,c=Date.now();case 2:if(!(Date.now()-c<s)){t.next=12;break}return t.next=5,this.getTask(n);
1case 5:if(p=t.sent,[e.TASK_ENQUEUED,e.TASK_PROCESSING].includes(p.status)){t.next=8;break}return t.abrupt("return",p);case 8:return t.next=10,function(t){return R.apply(this,arguments)}(o);case 10:t.next=2;break;case 12:throw new E("timeout of ".concat(s,"ms has exceeded on process ").concat(n," when waiting a task to be resolved."));case 13:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)})},{key:"waitForTasks",value:(s=c(a().mark(function t(e){var n,r,i,s,u,o,c,p,h,d,l=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=void 0===(r=(n=l.length>1&&void 0!==l[1]?l[1]:{}).timeOutMs)?5e3:r,u=void 0===(s=n.intervalMs)?50:s,o=[],c=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=b(t))){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 TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(e),t.prev=3,c.s();case 5:if((p=c.n()).done){t.next=13;break}return h=p.value,t.next=9,this.waitForTask(h,{timeOutMs:i,intervalMs:u});case 9:d=t.sent,o.push(d);case 11:t.next=5;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(3),c.e(t.t0);case 18:return t.prev=18,c.f(),t.finish(18);case 21:return t.abrupt("return",o);case 22:case"end":return t.stop()}},t,this,[[3,15,18,21]])})),function(t){return s.apply(this,arguments)})},{key:"cancelTasks",value:(u=c(a().mark(function t(){var e,n,r,i=arguments;return a().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,{},N(e));case 4:return r=t.sent,t.abrupt("return",new P(r));case 6:case"end":return t.stop()}},t,this)})),function(){return u.apply(this,arguments)})},{key:"deleteTasks",value:(o=c(a().mark(function t(){var e,n,r,i=arguments;return a().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,{},N(e));case 4:return r=t.sent,t.abrupt("return",new P(r));case 6:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})}]),h}(),C=function(){var t,e,n,r,s,o,h,f,v,_,y,g,m,w,x,b,k,E,R,N,q,C,M,U,F,j,V,K,H,G,B,Y,X,W,Q,z,J,Z,$,tt,te,tn,tr,ti,ta,ts,tu,to,tc,tp,th,td,tl,tf,tv,t_,ty,tg,tm,tw,tx,tb,tk,tA,tI,tT,tE,tS,tD,tR,tN,tO,tP,tq,tL,tC,tM,tU,tF,tj,tV,tK,tH,tG;function tB(t,e,n){p(this,tB),l(this,"uid",void 0),l(this,"primaryKey",void 0),l(this,"createdAt",void 0),l(this,"updatedAt",void 0),l(this,"httpRequest",void 0),l(this,"tasks",void 0),this.uid=e,this.primaryKey=n,this.httpRequest=new O(t),this.tasks=new L(t)}return d(tB,[{key:"search",value:(t=c(a().mark(function t(e,n,r){var s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s="indexes/".concat(this.uid,"/search"),t.next=3,this.httpRequest.post(s,D(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,n,r){return t.apply(this,arguments)})},{key:"searchGet",value:(e=c(a().mark(function t(e,n,r){var s,u,o,c,p,h,d,l,f,v;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return l="indexes/".concat(this.uid,"/search"),f=function(t){if("string"==typeof t)return t;if(Array.isArray(t))throw new A("The filter query parameter should be in string format when using searchGet")},v=i(i({q:e},n),{},{filter:f(null==n?void 0:n.filter),sort:null==n?void 0:null===(s=n.sort)||void 0===s?void 0:s.join(","),facets:null==n?void 0:null===(u=n.facets)||void 0===u?void 0:u.join(","),attributesToRetrieve:null==n?void 0:null===(o=n.attributesToRetrieve)||void 0===o?void 0:o.join(","),attributesToCrop:null==n?void 0:null===(c=n.attributesToCrop)||void 0===c?void 0:c.join(","),attributesToHighlight:null==n?void 0:null===(p=n.attributesToHighlight)||void 0===p?void 0:p.join(","),vector:null==n?void 0:null===(h=n.vector)||void 0===h?void 0:h.join(","),attributesToSearchOn:null==n?void 0:null===(d=n.attributesToSearchOn)||void 0===d?void 0:d.join(",")}),t.next=5,this.httpRequest.get(l,D(v),r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}},t,this)})),function(t,n,r){return e.apply(this,arguments)})},{key:"searchForFacetValues",value:(n=c(a().mark(function t(e,n){var r;return a().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,D(e),void 0,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"searchSimilarDocuments",value:(r=c(a().mark(function t(e){var n;return a().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,D(e),void 0);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)})},{key:"getRawInfo",value:(s=c(a().mark(function t(){var e,n;return a().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(){return s.apply(this,arguments)})},{key:"fetchInfo",value:(o=c(a().mark(function t(){return a().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(){return o.apply(this,arguments)})},{key:"fetchPrimaryKey",value:(h=c(a().mark(function t(){return a().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(){return h.apply(this,arguments)})},{key:"update",value:(f=c(a().mark(function t(e){var n,r;return a().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(t){return f.apply(this,arguments)})},{key:"delete",value:(v=c(a().mark(function t(){var e,n;return a().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 P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return v.apply(this,arguments)})},{key:"getTasks",value:(_=c(a().mark(function t(){var e,n=arguments;return a().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(){return _.apply(this,arguments)})},{key:"getTask",value:(y=c(a().mark(function t(e){return a().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(t){return y.apply(this,arguments)})},{key:"waitForTasks",value:(g=c(a().mark(function t(e){var n,r,i,s,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=void 0===(r=(n=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:r,u=void 0===(s=n.intervalMs)?50:s,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(t){return g.apply(this,arguments)})},{key:"waitForTask",value:(m=c(a().mark(function t(e){var n,r,i,s,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=void 0===(r=(n=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:r,u=void 0===(s=n.intervalMs)?50:s,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(t){return m.apply(this,arguments)})},{key:"getStats",value:(w=c(a().mark(function t(){var e;return a().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(){return w.apply(this,arguments)})},{key:"getDocuments",value:(x=c(a().mark(function t(){var e,n,r,s,u,o,c,p=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(void 0!==(e=D(e=p.length>0&&void 0!==p[0]?p[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 T?t.t0.message=S(t.t0.message,"getDocuments"):t.t0 instanceof I&&(t.t0.message=S(t.t0.message,"getDocuments")),t.t0;case 14:t.next=21;break;case 16:return o="indexes/".concat(this.uid,"/documents"),c=Array.isArray(null===(r=e)||void 0===r?void 0:r.fields)?{fields:null===(s=e)||void 0===s?void 0:null===(u=s.fields)||void 0===u?void 0:u.join(",")}:{},t.next=20,this.httpRequest.get(o,i(i({},e),c));case 21:case"end":return t.stop()}},t,this,[[3,10]])})),function(){return x.apply(this,arguments)})},{key:"getDocument",value:(b=c(a().mark(function t(e,n){var r,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents/").concat(e),s=function(){if(Array.isArray(null==n?void 0:n.fields)){var t;return null==n?void 0:null===(t=n.fields)||void 0===t?void 0:t.join(",")}}(),t.next=4,this.httpRequest.get(r,D(i(i({},n),{},{fields:s})));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}},t,this)})),function(t,e){return b.apply(this,arguments)})},{key:"addDocuments",value:(k=c(a().mark(function t(e,n){var r,i;return a().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 P(i));case 5:case"end":return t.stop()}},t,this)})),function(t,e){return k.apply(this,arguments)})},{key:"addDocumentsFromString",value:(E=c(a().mark(function t(e,n,r){var i,s;return a().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 s=t.sent,t.abrupt("return",new P(s));case 5:case"end":return t.stop()}},t,this)})),function(t,e,n){return E.apply(this,arguments)})},{key:"addDocumentsInBatches",value:(R=c(a().mark(function t(e){var n,r,i,s,u=arguments;return a().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=[],s=0;case 4:if(!(s<e.length)){t.next=13;break}return t.t0=i,t.next=8,this.addDocuments(e.slice(s,s+n),r);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:s+=n,t.next=4;break;case 13:return t.abrupt("return",i);case 14:case"end":return t.stop()}},t,this)})),function(t){return R.apply(this,arguments)})},{key:"updateDocuments",value:(N=c(a().mark(function t(e,n){var r,i;return a().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 P(i));case 5:case"end":return t.stop()}},t,this)})),function(t,e){return N.apply(this,arguments)})},{key:"updateDocumentsInBatches",value:(q=c(a().mark(function t(e){var n,r,i,s,u=arguments;return a().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=[],s=0;case 4:if(!(s<e.length)){t.next=13;break}return t.t0=i,t.next=8,this.updateDocuments(e.slice(s,s+n),r);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:s+=n,t.next=4;break;case 13:return t.abrupt("return",i);case 14:case"end":return t.stop()}},t,this)})),function(t){return q.apply(this,arguments)})},{key:"updateDocumentsFromString",value:(C=c(a().mark(function t(e,n,r){var i,s;return a().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 s=t.sent,t.abrupt("return",new P(s));case 5:case"end":return t.stop()}},t,this)})),function(t,e,n){return C.apply(this,arguments)})},{key:"deleteDocument",value:(M=c(a().mark(function t(e){var n,r;return a().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(t){return M.apply(this,arguments)})},{key:"deleteDocuments",value:(U=c(a().mark(function t(e){var n,r,i,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=(n=!Array.isArray(e)&&"object"===u(e))?"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 s=t.sent,t.abrupt("return",new P(s));case 10:throw t.prev=10,t.t0=t.catch(3),t.t0 instanceof T&&n?t.t0.message=S(t.t0.message,"deleteDocuments"):t.t0 instanceof I&&(t.t0.message=S(t.t0.message,"deleteDocuments")),t.t0;case 14:case"end":return t.stop()}},t,this,[[3,10]])})),function(t){return U.apply(this,arguments)})},{key:"deleteAllDocuments",value:(F=c(a().mark(function t(){var e,n;return a().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(){return F.apply(this,arguments)})},{key:"updateDocumentsByFunction",value:(j=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return j.apply(this,arguments)})},{key:"getSettings",value:(V=c(a().mark(function t(){var e;return a().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(){return V.apply(this,arguments)})},{key:"updateSettings",value:(K=c(a().mark(function t(e){var n,r;return a().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(t){return K.apply(this,arguments)})},{key:"resetSettings",value:(H=c(a().mark(function t(){var e,n;return a().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(){return H.apply(this,arguments)})},{key:"getPagination",value:(G=c(a().mark(function t(){var e;return a().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(){return G.apply(this,arguments)})},{key:"updatePagination",value:(B=c(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/pagination"),t.n
1ext=3,this.httpRequest.patch(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return B.apply(this,arguments)})},{key:"resetPagination",value:(Y=c(a().mark(function t(){var e,n;return a().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 P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return Y.apply(this,arguments)})},{key:"getSynonyms",value:(X=c(a().mark(function t(){var e;return a().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(){return X.apply(this,arguments)})},{key:"updateSynonyms",value:(W=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return W.apply(this,arguments)})},{key:"resetSynonyms",value:(Q=c(a().mark(function t(){var e,n;return a().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(){return Q.apply(this,arguments)})},{key:"getStopWords",value:(z=c(a().mark(function t(){var e;return a().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(){return z.apply(this,arguments)})},{key:"updateStopWords",value:(J=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return J.apply(this,arguments)})},{key:"resetStopWords",value:(Z=c(a().mark(function t(){var e,n;return a().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(){return Z.apply(this,arguments)})},{key:"getRankingRules",value:($=c(a().mark(function t(){var e;return a().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(){return $.apply(this,arguments)})},{key:"updateRankingRules",value:(tt=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tt.apply(this,arguments)})},{key:"resetRankingRules",value:(te=c(a().mark(function t(){var e,n;return a().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(){return te.apply(this,arguments)})},{key:"getDistinctAttribute",value:(tn=c(a().mark(function t(){var e;return a().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(){return tn.apply(this,arguments)})},{key:"updateDistinctAttribute",value:(tr=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tr.apply(this,arguments)})},{key:"resetDistinctAttribute",value:(ti=c(a().mark(function t(){var e,n;return a().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(){return ti.apply(this,arguments)})},{key:"getFilterableAttributes",value:(ta=c(a().mark(function t(){var e;return a().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(){return ta.apply(this,arguments)})},{key:"updateFilterableAttributes",value:(ts=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return ts.apply(this,arguments)})},{key:"resetFilterableAttributes",value:(tu=c(a().mark(function t(){var e,n;return a().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(){return tu.apply(this,arguments)})},{key:"getSortableAttributes",value:(to=c(a().mark(function t(){var e;return a().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(){return to.apply(this,arguments)})},{key:"updateSortableAttributes",value:(tc=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tc.apply(this,arguments)})},{key:"resetSortableAttributes",value:(tp=c(a().mark(function t(){var e,n;return a().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(){return tp.apply(this,arguments)})},{key:"getSearchableAttributes",value:(th=c(a().mark(function t(){var e;return a().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(){return th.apply(this,arguments)})},{key:"updateSearchableAttributes",value:(td=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return td.apply(this,arguments)})},{key:"resetSearchableAttributes",value:(tl=c(a().mark(function t(){var e,n;return a().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(){return tl.apply(this,arguments)})},{key:"getDisplayedAttributes",value:(tf=c(a().mark(function t(){var e;return a().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.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tf.apply(this,arguments)})},{key:"updateDisplayedAttributes",value:(tv=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tv.apply(this,arguments)})},{key:"resetDisplayedAttributes",value:(t_=c(a().mark(function t(){var e,n;return a().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(){return t_.apply(this,arguments)})},{key:"getTypoTolerance",value:(ty=c(a().mark(function t(){var e;return a().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(){return ty.apply(this,arguments)})},{key:"updateTypoTolerance",value:(tg=c(a().mark(function t(e){var n,r;return a().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(t){return tg.apply(this,arguments)})},{key:"resetTypoTolerance",value:(tm=c(a().mark(function t(){var e,n;return a().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(){return tm.apply(this,arguments)})},{key:"getFaceting",value:(tw=c(a().mark(function t(){var e;return a().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(){return tw.apply(this,arguments)})},{key:"updateFaceting",value:(tx=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tx.apply(this,arguments)})},{key:"resetFaceting",value:(tb=c(a().mark(function t(){var e,n;return a().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 P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return tb.apply(this,arguments)})},{key:"getSeparatorTokens",value:(tk=c(a().mark(function t(){var e;return a().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(){return tk.apply(this,arguments)})},{key:"updateSeparatorTokens",value:(tA=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tA.apply(this,arguments)})},{key:"resetSeparatorTokens",value:(tI=c(a().mark(function t(){var e,n;return a().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(){return tI.apply(this,arguments)})},{key:"getNonSeparatorTokens",value:(tT=c(a().mark(function t(){var e;return a().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(){return tT.apply(this,arguments)})},{key:"updateNonSeparatorTokens",value:(tE=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tE.apply(this,arguments)})},{key:"resetNonSeparatorTokens",value:(tS=c(a().mark(function t(){var e,n;return a().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(){return tS.apply(this,arguments)})},{key:"getDictionary",value:(tD=c(a().mark(function t(){var e;return a().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(){return tD.apply(this,arguments)})},{key:"updateDictionary",value:(tR=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tR.apply(this,arguments)})},{key:"resetDictionary",value:(tN=c(a().mark(function t(){var e,n;return a().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(){return tN.apply(this,arguments)})},{key:"getProximityPrecision",value:(tO=c(a().mark(function t(){var e;return a().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(){return tO.apply(this,arguments)})},{key:"updateProximityPrecision",value:(tP=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tP.apply(this,arguments)})},{key:"resetProximityPrecision",value:(tq=c(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3
1,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(){return tq.apply(this,arguments)})},{key:"getEmbedders",value:(tL=c(a().mark(function t(){var e;return a().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(){return tL.apply(this,arguments)})},{key:"updateEmbedders",value:(tC=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tC.apply(this,arguments)})},{key:"resetEmbedders",value:(tM=c(a().mark(function t(){var e,n;return a().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(){return tM.apply(this,arguments)})},{key:"getSearchCutoffMs",value:(tU=c(a().mark(function t(){var e;return a().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(){return tU.apply(this,arguments)})},{key:"updateSearchCutoffMs",value:(tF=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tF.apply(this,arguments)})},{key:"resetSearchCutoffMs",value:(tj=c(a().mark(function t(){var e,n;return a().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 P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return tj.apply(this,arguments)})},{key:"getLocalizedAttributes",value:(tV=c(a().mark(function t(){var e;return a().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(){return tV.apply(this,arguments)})},{key:"updateLocalizedAttributes",value:(tK=c(a().mark(function t(e){var n,r;return a().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 P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tK.apply(this,arguments)})},{key:"resetLocalizedAttributes",value:(tH=c(a().mark(function t(){var e,n;return a().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 P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return tH.apply(this,arguments)})}],[{key:"create",value:(tG=c(a().mark(function t(e){var n,r,s,u,o,c=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},r=c.length>2?c[2]:void 0,s="indexes",u=new O(r),t.next=6,u.post(s,i(i({},n),{},{uid:e}));case 6:return o=t.sent,t.abrupt("return",new P(o));case 8:case"end":return t.stop()}},t)})),function(t){return tG.apply(this,arguments)})}]),tB}(),M=function(t){f(n,t);var e=x(n);function n(t){return p(this,n),e.call(this,t)}return d(n)}(function(){var t,e,r,s,u,o,h,f,v,_,y,g,m,w,x,b,k,A,I,T,E,S,D,R,N,q,M;function U(t){p(this,U),l(this,"config",void 0),l(this,"httpRequest",void 0),l(this,"tasks",void 0),this.config=t,this.httpRequest=new O(t),this.tasks=new L(t)}return d(U,[{key:"index",value:function(t){return new C(this.config,t)}},{key:"getIndex",value:(t=c(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new C(this.config,e).fetchInfo());case 1:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"getRawIndex",value:(e=c(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new C(this.config,e).getRawInfo());case 1:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"getIndexes",value:(r=c(a().mark(function t(){var e,n,r,s=this,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=u.length>0&&void 0!==u[0]?u[0]:{},t.next=3,this.getRawIndexes(e);case 3:return r=(n=t.sent).results.map(function(t){return new C(s.config,t.uid,t.primaryKey)}),t.abrupt("return",i(i({},n),{},{results:r}));case 6:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)})},{key:"getRawIndexes",value:(s=c(a().mark(function t(){var e,n,r=arguments;return a().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(){return s.apply(this,arguments)})},{key:"createIndex",value:(u=c(a().mark(function t(e){var n,r=arguments;return a().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,C.create(e,n,this.config);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return u.apply(this,arguments)})},{key:"updateIndex",value:(o=c(a().mark(function t(e){var n,r=arguments;return a().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 C(this.config,e).update(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"deleteIndex",value:(h=c(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new C(this.config,e).delete();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t){return h.apply(this,arguments)})},{key:"deleteIndexIfExists",value:(f=c(a().mark(function t(e){return a().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!==n.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(t){return f.apply(this,arguments)})},{key:"swapIndexes",value:(v=c(a().mark(function t(e){var n;return a().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(t){return v.apply(this,arguments)})},{key:"multiSearch",value:(_=c(a().mark(function t(e,n){var r;return a().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(t,e){return _.apply(this,arguments)})},{key:"getTasks",value:(y=c(a().mark(function t(){var e,n=arguments;return a().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(){return y.apply(this,arguments)})},{key:"getTask",value:(g=c(a().mark(function t(e){return a().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(t){return g.apply(this,arguments)})},{key:"waitForTasks",value:(m=c(a().mark(function t(e){var n,r,i,s,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=void 0===(r=(n=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:r,u=void 0===(s=n.intervalMs)?50:s,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(t){return m.apply(this,arguments)})},{key:"waitForTask",value:(w=c(a().mark(function t(e){var n,r,i,s,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=void 0===(r=(n=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:r,u=void 0===(s=n.intervalMs)?50:s,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(t){return w.apply(this,arguments)})},{key:"cancelTasks",value:(x=c(a().mark(function t(e){return a().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(t){return x.apply(this,arguments)})},{key:"deleteTasks",value:(b=c(a().mark(function t(){var e,n=arguments;return a().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(){return b.apply(this,arguments)})},{key:"getKeys",value:(k=c(a().mark(function t(){var e,n,r,s=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=s.length>0&&void 0!==s[0]?s[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(){return k.apply(this,arguments)})},{key:"getKey",value:(A=c(a().mark(function t(e){var n;return a().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(t){return A.apply(this,arguments)})},{key:"createKey",value:(I=c(a().mark(function t(e){var n;return a().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(t){return I.apply(this,arguments)})},{key:"updateKey",value:(T=c(a().mark(function t(e,n){var r;return a().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(t,e){return T.apply(this,arguments)})},{key:"deleteKey",value:(E=c(a().mark(function t(e){var n;return a().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(t){return E.apply(this,arguments)})},{key:"health",value:(S=c(a().mark(function t(){var e;return a().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(){return S.apply(this,arguments)})},{key:"isHealthy",value:(D=c(a().mark(function t(){var e;return a().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(){return D.apply(this,arguments)})},{key:"getStats",value:(R=c(a().mark(function t(){var e;return a().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(){return R.apply(this,arguments)})},{key:"getVersion",value:(N=c(a().mark(function t(){var e;return a().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(){return N.apply(this,arguments)})},{key:"createDump",value:(q=c(a().mark(function t(){var e,n;return a().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 P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return q.apply(this,arguments)})},{key:"createSnapshot",value:(M=c(a().mark(function t(){var e,n;return a().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 P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return M.apply(this,arguments)})},{key:"generateTenantToken",value:function(t,e,n){var r=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)}}]),U}());t.ContentTypeEnum={JSON:"application/json",CSV:"text/csv",NDJSON:"application/x-ndjson"},t.ErrorStatusCode=n,t.Index=C,t.MatchingStrategies={ALL:"all",LAST:"last",FREQUENCY:"frequency"},t.MeiliSearch=M,t.MeiliSearchApiError=I,t.MeiliSearchError=A,t.MeiliSearchRequestError=T,t.MeiliSearchTimeOutError=E,t.Meilisearch=M,t.TaskStatus=e,t.TaskTypes={DOCUMENTS_ADDITION_OR_UPDATE:"documentAdditionOrUpdate",DOCUMENT_DELETION:"documentDeletion",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"},t.default=M,t.versionErrorHintMessage=S,Object.defineProperty(t,"__esModule",{value:!0})}(r.exports),r.exports),o=u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,c=Object.freeze(Object.assign(Object.create(null),u,{default:o}));function p(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}var h=/([\\"])/g;function d(t){return t.replace(h,"\\$1")}function l(t){var e=d(t),n=e.indexOf(":"),r=e.slice(0,n),i=e.slice(n+1);return'"'.concat(r,'"="').concat(i,'"')}function f(t){var e=function(){var e=t.match(/^([^<!>:=]*)([<!>:=]+)(.*)$/);if(e){var n=e.slice(1),r=n[0],i=n[1],a=n[2],s=(i.match(/^([<!>]?=|<|>|:){1}(.*)/)||["",""]).slice(1);return[r,s[0],s[1]+a]}return[t,"",""]}(),n=e[0],r=e[1],i=e[2],a=d(n);return'"'.concat(a.trim(),'"').concat(":"===r?" ":r).concat(i.trim())}function v(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 _(t){return"string"==typeof t?[t]:t}function y(t){var e,n,r,i,a,s=t.query,u=t.indexUid,o=t.facets,c=t.attributesToSnippet,p=t.snippetEllipsisText,h=t.filters,d=t.numericFilters,y=t.facetFilters,g=t.attributesToRetrieve,m=t.attributesToHighlight,w=t.highlightPreTag,x=t.highlightPostTag,b=t.placeholderSearch,k=t.pagination,A=t.sort,I=t.restrictSearchableAttributes,T=t.meiliSearchParams,E={indexUid:u},S=(e=void 0!==d?v(f,d):d,n=void 0!==y?v(l,y):y,r=_(e),i=_(n),a=[],void 0!==h&&a.push(h),void 0!==r&&a.push.apply(a,r),void 0!==i&&a.push.apply(a,i),a);return{getParams:function(){return E},addQuery:function(){E.q=s},addFacets:function(){void 0!==o&&(E.facets="string"==typeof o?[o]:o)},addAttributesToCrop:function(){var t,e=null!==(t=null==T?void 0:T.attributesToCrop)&&void 0!==t?t:c;void 0!==e&&(E.attributesToCrop=e)},addCropLength:function(){var t=null==T?void 0:T.cropLength;void 0!==t&&(E.cropLength=t)},addCropMarker:function(){var t,e=null!==(t=null==T?void 0:T.cropMarker)&&void 0!==t?t:p;void 0!==e&&(E.cropMarker=e)},addFilters:function(){S.length&&(E.filter=S)},addAttributesToRetrieve:function(){var t,e=null!==(t=null==T?void 0:T.attributesToRetrieve)&&void 0!==t?t:g;void 0!==e&&(E.attributesToRetrieve=e)},addAttributesToHighlight:function(){var t,e;E.attributesToHighlight=null!==(e=null!==(t=null==T?void 0:T.attributesToHighlight)&&void 0!==t?t:m)&&void 0!==e?e:["*"]},addPreTag:function(){var t,e;E.highlightPreTag=null!==(e=null!==(t=null==T?void 0:T.highlightPreTag)&&void 0!==t?t:w)&&void 0!==e?e:"__ais-highlight__"},addPostTag:function(){var t,e;E.highlightPostTag=null!==(e=null!==(t=null==T?void 0:T.highlightPostTag)&&void 0!==t?t:x)&&void 0!==e?e:"__/ais-highlight__"},addPagination:function(){var t=!(!b&&!s&&(!S||0===S.length));if(k.finite){var e,n,r=(e=k.page,n=k.hitsPerPage,t?{hitsPerPage:n,page:e+1}:{hitsPerPage:0,page:e+1}),i=r.hitsPerPage,a=r.page;E.hitsPerPage=i,E.page=a}else{var u,o,c=(u=k.page,o=k.hitsPerPage,t?{limit:o+1,offset:u*o}:{limit:0,offset:0}),p=c.limit,h=c.offset;E.limit=p,E.offset=h}},addSort:function(){(null==A?void 0:A.length)&&(E.sort=Array.isArray(A)?A:[A])},addGeoSearchFilter:function(){var e=function(t){var e,n,r,i=t.insideBoundingBox,a=t.aroundLatLng,s=t.aroundRadius,u=t.minimumAroundRadius;if(a){var o=a.split(",").map(function(t){return Number.parseFloat(t).toFixed(5)}),c=o[0],p=o[1];e=[c,p]}if((null!=s||null!=u)&&("all"===s?console.warn("instant-meilisearch is not compatible with the `all` value on the aroundRadius parameter"):n=null!=s?s:u),i&&"string"==typeof i){var h=i.split(",").map(function(t){return parseFloat(t)}),d=h[0],l=h[1],f=h[2],v=h[3];r="_geoBoundingBox([".concat(d,", ").concat(l,"], [").concat(f,", ").concat(v,"])")}else if(null!=e&&null!=n){var c=e[0],p=e[1];r="_geoRadius(".concat(c,", ").concat(p,", ").concat(n,")")}return r}({insideBoundingBox:t.insideBoundingBox,aroundLatLng:t.aroundLatLng,aroundRadius:t.aroundRadius,minimumAroun
1dRadius:t.minimumAroundRadius});void 0!==e&&(Array.isArray(E.filter)?E.filter.unshift(e):E.filter=[e])},addShowMatchesPosition:function(){var t=null==T?void 0:T.showMatchesPosition;void 0!==t&&(E.showMatchesPosition=t)},addMatchingStrategy:function(){var t=null==T?void 0:T.matchingStrategy;void 0!==t&&(E.matchingStrategy=t)},addShowRankingScore:function(){var t=null==T?void 0:T.showRankingScore;void 0!==t&&(E.showRankingScore=t)},addAttributesToSearchOn:function(){var t=(null==T?void 0:T.attributesToSearchOn)!==void 0?T.attributesToSearchOn:I;void 0!==t&&(E.attributesToSearchOn=t)},addHybridSearch:function(){var t=null==T?void 0:T.hybrid;void 0!==t&&(E.hybrid=t)},addDistinct:function(){var t=null==T?void 0:T.distinct;void 0!==t&&(E.distinct=t)},addRankingScoreThreshold:function(){var t=null==T?void 0:T.rankingScoreThreshold;void 0!==t&&(E.rankingScoreThreshold=t)}}}function g(t){var e=y(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 m(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 w(t,e,n){return{hitsPerPage:void 0===e?20:e,page:n||0,finite:!!t}}function x(t){var e=t.indexOf(":");return -1===e?{indexUid:t,sortBy:""}:{indexUid:t.substring(0,e),sortBy:t.substring(e+1)}}t.instantMeiliSearch=function(t,e,n){void 0===e&&(e=""),void 0===n&&(n={}),function(t,e,n){var r=n.requestConfig,i=n.httpClient;if("string"!=typeof t)throw TypeError("Provided hostUrl value (1st parameter) is not a string, expected string");if("string"!=typeof e&&"function"!=typeof e)throw TypeError("Provided apiKey value (2nd parameter) is not a string or a function, expected string or function");if(void 0!==r&&!p(r))throw TypeError("Provided requestConfig should be an object");if(i&&"function"!=typeof i)throw TypeError("Provided custom httpClient should be a function")}(t,e,n);var r,o,c,h,d={host:t,apiKey:e=function(t){if("function"==typeof t){var e=t();if("string"!=typeof e)throw TypeError("Provided apiKey function (2nd parameter) did not return a string, expected string");return e}return t}(e),clientAgents:(void 0===(r=n.clientAgents)&&(r=[]),r.concat("Meilisearch instant-meilisearch (v".concat("0.20.1",")")))};void 0!==n.httpClient&&(d.httpClient=n.httpClient),void 0!==n.requestConfig&&(d.requestConfig=n.requestConfig);var l=new u.MeiliSearch(d),f=(void 0===o&&(o={}),c=o,{getEntry:function(t){if(c[t])try{return JSON.parse(c[t])}catch(t){}},formatKey:function(t){return t.reduce(function(t,e){return t+JSON.stringify(e)},"")},setEntry:function(t,e){c[t]=JSON.stringify(e)},clearCache:function(){c={}}}),v={multiSearch:function(t,e){return a(this,void 0,void 0,function(){var n,r,a;return s(this,function(s){switch(s.label){case 0:if(n=f.formatKey([t]),r=f.getEntry(n))return[2,r];return[4,l.multiSearch({queries:t})];case 1:return a=s.sent().results.map(function(t,n){return i(i({},t),{pagination:e[n]||{}})}),f.setEntry(n,a),[2,a]}})})}},_={},b=(h=n,i(i({},{placeholderSearch:!0,keepZeroFacets:!1,clientAgents:[],finitePagination:!1}),h));return{meiliSearchInstance:l,setMeiliSearchParams:function(t){var e=n.meiliSearchParams;n.meiliSearchParams=void 0===e?t:i(i({},e),t)},searchClient:{clearCache:function(){return f.clearCache()},search:function(t){return a(this,void 0,void 0,function(){var e,r,u,o,c,h,d,l,f,k;return s(this,function(A){switch(A.label){case 0:for(A.trys.push([0,3,,4]),e=[],r=[],u=[],o=0,c=t;o<c.length;o++)d=g(h=function(t,e){var n=t.query,r=t.indexName,a=t.params,s=x(r),u=s.indexUid,o=s.sortBy,c=w(e.finitePagination,null==a?void 0:a.hitsPerPage,null==a?void 0:a.page);return i(i(i(i({},e),{query:n}),a),{sort:m(o),indexUid:u,pagination:c,placeholderSearch:!1!==e.placeholderSearch,keepZeroFacets:!!e.keepZeroFacets})}(c[o],n)),e.push(d),l=function(t){var e=y(i(i({},t),{placeholderSearch:!0,query:""}));return e.addFacets(),e.addPagination(),e.getParams()}(h),u.push(l),r.push(h.pagination);return[4,function(t,e,n){return a(this,void 0,void 0,function(){var r,i,a,u,o;return s(this,function(s){switch(s.label){case 0:var c,p;if(c="indexUid",p=[],r=function(t){return!p.includes(t[c])&&(p.push(t[c]),!0)},0===(i=e.filter(r).filter(function(t){var e=t.indexUid;return!Object.keys(n).includes(e)})).length)return[2,n];return[4,t.multiSearch(i,[])];case 1:for(a=0,u=s.sent();a<u.length;a++)n[(o=u[a]).indexUid]=o.facetDistribution||{};return[2,n]}})})}(v,u,_)];case 1:return _=A.sent(),[4,v.multiSearch(e,r)];case 2:var I;return f=A.sent(),I=_=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t[r.indexUid]=i(i({},r.facetDistribution||{}),t[r.indexUid]||{})}return t}(_,f),[2,{results:f.map(function(t){var e,n,r,a,s,u,o,c,h,d,l,f,v,_,y,g,m,w,x,k,A,T,E,S,D,R,N,O,P;return e=t,n=I[t.indexUid],r=b,m=e.processingTimeMs,w=e.query,x=e.indexUid,A=void 0===(k=e.facetDistribution)?{}:k,T=e.facetStats,E=Object.keys(A),D=(S=(s=(a=e.pagination).hitsPerPage,{page:a.page,nbPages:function(t,e){if(null!=t.totalPages)return t.totalPages;if(0===e)return 0;var n=t.limit,r=t.offset;return(void 0===r?0:r)/e+1+(t.hits.length>=(void 0===n?20:n)?1:0)}(e,s),hitsPerPage:s})).hitsPerPage,R=S.page,N=S.nbPages,O=(u=e.hits,o=e.pagination.hitsPerPage,c=r.finitePagination,h=r.primaryKey,!c&&u.length>
1o&&u.splice(u.length-1,1),function(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}(u.map(function(t){var e;if(Object.keys(t).length>0){var n=t._formatted,i=t._matchesPosition,a=Object.assign(function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}(t,["_formatted","_matchesPosition"]),function(t){if(!t)return{};var e=function t(e){return Array.isArray(e)?e.map(function(e){return t(e)}):p(e)?Object.keys(e).reduce(function(n,r){return n[r]=t(e[r]),n},{}):{value:"string"==typeof e?e:void 0===e?JSON.stringify(null):JSON.stringify(e)}}(t);return{_highlightResult:e,_snippetResult:e}}(n));return(null===(e=null==r?void 0:r.meiliSearchParams)||void 0===e?void 0:e.showMatchesPosition)&&(a._matchesPosition=i),h&&(a.objectID=t[h]),a}return t}))),P=(d=e.hitsPerPage,l=e.totalPages,f=e.estimatedTotalHits,v=e.totalHits,null!=f?f:null!=v?v:(void 0===d?0:d)*(void 0===l?0:l)),{index:x,hitsPerPage:D,page:R,facets:(_=r.keepZeroFacets,y=A,_?function(t,e,n){for(var r=t?"string"==typeof t?[t]:t:[],i={},a=0;a<r.length;a++){var s=r[a];for(var u in e[s])i[s]||(i[s]=n[s]||{}),i[s][u]?i[s][u]=n[s][u]:i[s][u]=0}return i}(E,n,y=y||{}):y),nbPages:N,nbHits:P,processingTimeMS:m,query:w,hits:O,params:"",exhaustiveNbHits:!1,facets_stats:Object.keys(g=void 0===T?{}:T).reduce(function(t,e){return t[e]=i(i({},g[e]),{avg:0,sum:0}),t},{})}})}];case 3:throw console.error(k=A.sent()),Error(k);case 4:return[2]}})})},searchForFacetValues:function(t){return a(this,void 0,void 0,function(){var e,r,a,u,o,c,p,h,d;return s(this,function(s){switch(s.label){case 0:e=[],r=0,a=t,s.label=1;case 1:var f,v,_,y,b,k,A;if(!(r<a.length))return[3,4];return f=u=a[r],v=n,y=(_=x(f.indexName)).indexUid,b=_.sortBy,k=f.params,A=w(v.finitePagination,null==k?void 0:k.hitsPerPage,null==k?void 0:k.page),c=g(o=i(i(i({},v),k),{sort:m(b),indexUid:y,pagination:A,placeholderSearch:!1!==v.placeholderSearch,keepZeroFacets:!!v.keepZeroFacets})),p=i(i({},c),{facetQuery:u.params.facetQuery,facetName:u.params.facetName}),delete p.indexUid,[4,l.index(o.indexUid).searchForFacetValues(p)];case 2:d={facetHits:(h=s.sent()).facetHits.map(function(t){return i(i({},t),{highlighted:t.value})}),exhaustiveFacetsCount:!1,processingTimeMS:h.processingTimeMs},e.push(d),s.label=3;case 3:return r++,[3,1];case 4:return[2,e]}})})}}}},t.meilisearch=c,Object.defineProperty(t,"__esModule",{value:!0})})(e,n(28697))}}]);
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.